a UAS sends one Route header that has 2 route , is separeted by comma. When it read Route header by Function PJSIP_HEADER , it shows only 1st Route . Probably , it is a bug
-- Executing [firat@default1:1] NoOp("PJSIP/test-00000008", "Default - 1") in new stack
-- Executing [firat@default1:2] Set("PJSIP//test-00000008", "routeheader=<sip:asterisk.test:5060;transport=tcp;lr>") in new stack
-- Executing [firat@default1:3] NoOp("PJSIP/test-00000008", "Route header : <sip:asterisk.test:5060;transport=tcp;lr> ") in new stack
Conceptually they are two Route headers, and PJSIP likely parses and stores them as such as it simplifies things quite a lot. The PJSIP_HEADER function gets its data from the parsed/stored values, not straight from the SIP request itself.
Hello,
Thanks for reply. i need that route header to pass other side/ B leg. As i understood from your answer, it is not a bug but is a pjsip behavior. Do you have any suggestion to get this route header?
Asterisk is not a SIP proxy, it doesn’t pass traffic like that through - each call leg is independent and in particular passing Route headers through may break the SIP signaling itself on the other side. If you really want to… then the PJSIP_HEADER function does allow you to get multiple instances of the same header[1].
* `number` - If there's more than 1 header with the same name, this specifies which header to read or update. If not specified, defaults to `1` meaning the first matching header. Not valid for `add` or `remove` .