[OpenSIPS-Users] How to change Contact header

2010-10-05 Thread David Santiago
Hi all, I need to modify the host part of a contact header. I'm trying something like: if ( subst('/^Contact: /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

Re: [OpenSIPS-Users] How to change Contact header

2010-10-06 Thread David Santiago
Solved! Adding a \r did the thing... if ( subst('/^Contact: \r/ig') ) { xlog("contact modified!"); }; On Tue, Oct 5, 2010 at 6:34 PM, David Santiago < david.santi...@almiralabs.com> wrote: > Hi all, > > I need to modify the host part of a contact header. I'm trying somethi

Re: [OpenSIPS-Users] How to change Contact header

2010-10-06 Thread Bogdan-Andrei Iancu
Hi David, take when using such regexps as the contact hdr may have multiple syntaxes: Contact: sip:u...@domain Contact: sip:u...@domain;hdr_params Contact: ;hdr_params Contact: ;hdr_params Contact: "display" ;hdr_params Contact: display ;hdr_params etc So having a

Re: [OpenSIPS-Users] How to change Contact header

2010-10-06 Thread Andrew Pogrebennyk
David, Also if rewriting Contact with the opensips address is what you want to achieve, you should look no further than b2b_logic "top hiding" scenario: http://www.opensips.org/Resources/B2buaTutorial16#toc12 On 06.10.2010 14:15, Bogdan-Andrei Iancu wrote: > Hi David, > > take when using such re

Re: [OpenSIPS-Users] How to change Contact header

2010-10-06 Thread David Santiago
Fair enough, I'll check it. Thx Andrew! On Wed, Oct 6, 2010 at 2:58 PM, Andrew Pogrebennyk < andrew.pogreben...@portaone.com> wrote: > David, > Also if rewriting Contact with the opensips address is what you want to > achieve, you should look no further than b2b_logic "top hiding" > scenario: ht

Re: [OpenSIPS-Users] How to change Contact header

2010-10-12 Thread Stefano Pisani
Why don't you explain the problem you want to solve? Maybe that to modify contact in this way is not the right solution. s Il 05/10/2010 18:34, David Santiago ha scritto: > Hi all, > > I need to modify the host part of a contact header. I'm trying something like: > > if ( subst('/^Contact: /ig