On 08/29/2016 08:32 AM, John Nash wrote: > I am looking for some way to read value of a custom SIP header (starting > with X-). I have access to object ssip_t. Which function I can use to > extract custom SIP header and use its value? > > > > ------------------------------------------------------------------------------ > > > _______________________________________________ > Sofia-sip-devel mailing list > Sofia-sip-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel
The sip structure contains a member of 'sip_unknown'. You can use it like this to iterate custom (or "unknown") SIP headers: sip_unknown_t* unknown_header = sip->sip_unknown; while( unknown_header ) { if( 0 == strcmp( unknown_header->un_name, "X-MyCustomHeader" ) ) { /* whatever... */ } unknown_header = unknown_header->un_next; } Regards ------------------------------------------------------------------------------ _______________________________________________ Sofia-sip-devel mailing list Sofia-sip-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel