Hi all, I am having some issues with editing remote party header. I understand that changes are saved as a diff and are sent when packet goes on wire. In my current config rpid is edited when invite is received and it seems to work fine.
There is one scenario where I need to edit rpid or remove rpid altogether before relaying it. "remove_hf" did not remove the header after it was edited earlier.
Is there a way to do this?
Thanks in advance for your help.
Hi Zahid,
try to review the logic on RPID processing to avoid multiple ops on the hdr. Keep state (use flags, avps, variables), and do only one change at the end, before relay.
regards, bogdan
zm23 wrote:
Hi all, I am having some issues with editing remote party header. I understand that changes are saved as a diff and are sent when packet goes on wire. In my current config rpid is edited when invite is received and it seems to work fine.
There is one scenario where I need to edit rpid or remove rpid altogether before relaying it. "remove_hf" did not remove the header after it was edited earlier.
Is there a way to do this?
Thanks in advance for your help.
--Zahid
Users mailing list Users@openser.org http://openser.org/cgi-bin/mailman/listinfo/users
I have a somewhat similar situation to this. I use remove_hf and append_hf to modify the RPID in the Request_Route, which works fine, but then if I try it in Failure_Route I end up with two RPID headers.
Is it possible the revert_uri() is doing something to it? If not, can you just not do a remove/append like this?
Here are some snippets from my config:
route { ... ... if (method=="INVITE") { perl_exec("command", "0"); /*sets rpid and ouri vars*/ if (is_avp_set("$avp(rpid)")){ if(is_present_hf("Remote-Party-ID")){ remove_hf("Remote-Party-ID"); } append_hf("$avp(rpid)"); } avp_pushto("$ru","$avp(ouri)"); ... ... failure_route[1]{ if(method == "INVITE" ....blah blah blah revert_uri(); perl_exec("command", "1"); /*sets rpid and ouri vars*/
if (is_avp_set("$avp(rpid)")){ if(is_present_hf("Remote-Party-ID")){ remove_hf("Remote-Party-ID"); } append_hf("$avp(rpid)"); } avp_pushto("$ru","$avp(ouri)"); ... ...
Best regards,
Mik Cheez
Bogdan-Andrei Iancu wrote:
Hi Zahid,
try to review the logic on RPID processing to avoid multiple ops on the hdr. Keep state (use flags, avps, variables), and do only one change at the end, before relay.
regards, bogdan
zm23 wrote:
Hi all, I am having some issues with editing remote party header. I understand that changes are saved as a diff and are sent when packet goes on wire. In my current config rpid is edited when invite is received and it seems to work fine.
There is one scenario where I need to edit rpid or remove rpid altogether before relaying it. "remove_hf" did not remove the header after it was edited earlier.
Is there a way to do this?
Thanks in advance for your help.
--Zahid
Users mailing list Users@openser.org http://openser.org/cgi-bin/mailman/listinfo/users
Users mailing list Users@openser.org http://openser.org/cgi-bin/mailman/listinfo/users