[SR-Users] "remove_hf" and "append_hf" one after the other , twice, issue.

Uri Shacked ushacked at gmail.com
Tue Mar 27 14:01:26 CEST 2012


Hi,



In the scenario i am using, the flow is as followed:

1. Getting the INVITE from the user

2. Sending an INVITE with RURI changes to the NP server (sip NP server)

3. Getting a 301 reply (using the reply for the NP code)

4. Sending the call to the destination.



My problem is that the NP server needs some parameters in the contact
header.

So, here is what i do :



First, before sending the invite to the NP:



remove_hf("Contact");

append_hf("Contact :<sip:XXX at server_ip
:port;param1=p1;param2=p2>\r\n","Contact");



(The invite is sent perfectly and works great)



After the NP reply i do:



remove_hf("Contact");

append_hf("Contact :$ct","Contact");



Now I notice there are two contact headers. It seems that the remove_hf
didn’t work this time.

Any ideas?



Thanks,

Uri
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20120327/5a093fe5/attachment.htm>


More information about the sr-users mailing list