[OpenSIPS-Users] How to change Contact header

David Santiago david.santiago at almiralabs.com
Tue Oct 5 18:34:24 CEST 2010


Hi all,

I need to modify the host part of a contact header. I'm trying something like:

if ( subst('/^Contact: <sip:([0-9]+)@(.*)$/Contact:
<sip:\1 at NEW_IP_ADDRESS_HERE>/ig') ) {
                xlog("contact modified!");
        };

but the resulting Contact header is wrong and cannot be processed.

Having a look at the header with wireshark shows that the "Contact
Binding" entry is missing the ending ">", but the "Contact", "URI" or
"SIP contact address" have the ">" at the end  :L

May be this is not the right way to modify a Contact header...


Thanks in advance,
David



More information about the Users mailing list