Hi,
Is there a function that can modify "Contact" field in SIP header?
Thanks, Alex
_________________________________________________________________ Windows Live Hotmail now works up to 70% faster. http://windowslive.com/Explore/Hotmail?ocid=TXT_TAGLM_WL_hotmail_acq_faster_...
The various NAT traversal modules modify the Contact to suit their ends, according to their own scheme.
There is a module that will allow you to modify any header to anything you want:
http://www.kamailio.org/docs/modules/1.4.x/textops.html
Alex R.S.M wrote:
Hi,
Is there a function that can modify "Contact" field in SIP header?
Thanks, Alex
Windows Live Hotmail now works up to 70% faster. Sign up today. http://windowslive.com/Explore/Hotmail?ocid=TXT_TAGLM_WL_hotmail_acq_faster_112008
Users mailing list Users@lists.kamailio.org http://lists.kamailio.org/cgi-bin/mailman/listinfo/users
I am trying to modify Contact: sip:8133740008@1.1.1.1;transport=udp;maddr=1.1.1.1
to Contact: sip:8133740008@2.2.2.2;transport=udp;maddr=2.2.2.2
I am using the following statement but it doesn't work: if ( subst('/^Contact:(.*)sip:[^@]*@([a-zA-Z0-9.]+);(.*)$/contact:\12.2.2.2;\2/ig') ) {};
Am I missing anything?
Thanks, Alex
Date: Wed, 19 Nov 2008 11:06:53 -0500 From: abalashov@evaristesys.com To: alex_rsm@hotmail.com CC: users@lists.kamailio.org Subject: Re: [Kamailio-Users] Contact field
The various NAT traversal modules modify the Contact to suit their ends, according to their own scheme.
There is a module that will allow you to modify any header to anything you want:
http://www.kamailio.org/docs/modules/1.4.x/textops.html
Alex R.S.M wrote:
Hi,
Is there a function that can modify "Contact" field in SIP header?
Thanks, Alex
Windows Live Hotmail now works up to 70% faster. Sign up today. http://windowslive.com/Explore/Hotmail?ocid=TXT_TAGLM_WL_hotmail_acq_faster_112008
Users mailing list Users@lists.kamailio.org http://lists.kamailio.org/cgi-bin/mailman/listinfo/users
-- Alex Balashov Evariste Systems Web : http://www.evaristesys.com/ Tel : (+1) (678) 954-0670 Direct : (+1) (678) 954-0671 Mobile : (+1) (706) 338-8599
_________________________________________________________________ Windows Live Hotmail now works up to 70% faster. http://windowslive.com/Explore/Hotmail?ocid=TXT_TAGLM_WL_hotmail_acq_faster_...
I am not sure. These are all nuances that differ among regex implementations.
Perhaps you need to escape the dots in the decimal IP notation, as they have a meaning in regex. Perhaps the $ end-of-line will never be matched. Different embedded regex implementations always work differently; just have to massage it until it works.
Alex R.S.M wrote:
I am trying to modify Contact: sip:8133740008@1.1.1.1;transport=udp;maddr=1.1.1.1
to Contact: sip:8133740008@2.2.2.2;transport=udp;maddr=2.2.2.2
I am using the following statement but it doesn't work: if ( subst('/^Contact:(.*)sip:[^@]*@([a-zA-Z0-9.]+);(.*)$/contact:\12.2.2.2;\2/ig') ) {};
Am I missing anything?
Thanks, Alex
Date: Wed, 19 Nov 2008 11:06:53 -0500 From: abalashov@evaristesys.com To: alex_rsm@hotmail.com CC: users@lists.kamailio.org Subject: Re: [Kamailio-Users] Contact field
The various NAT traversal modules modify the Contact to suit their ends, according to their own scheme.
There is a module that will allow you to modify any header to anything you want:
http://www.kamailio.org/docs/modules/1.4.x/textops.html
Alex R.S.M wrote:
Hi,
Is there a function that can modify "Contact" field in SIP header?
Thanks, Alex
Windows Live Hotmail now works up to 70% faster. Sign up today.
http://windowslive.com/Explore/Hotmail?ocid=TXT_TAGLM_WL_hotmail_acq_faster_112008
Users mailing list Users@lists.kamailio.org http://lists.kamailio.org/cgi-bin/mailman/listinfo/users
-- Alex Balashov Evariste Systems Web : http://www.evaristesys.com/ Tel : (+1) (678) 954-0670 Direct : (+1) (678) 954-0671 Mobile : (+1) (706) 338-8599
Windows Live Hotmail now works up to 70% faster. Sign up today. http://windowslive.com/Explore/Hotmail?ocid=TXT_TAGLM_WL_hotmail_acq_faster_112008
Here is a reference site about regular expressions: http://www.regular-expressions.info/
subst() uses POSIX compliat regexp.
Cheers, Daniel
On 11/19/08 19:03, Alex Balashov wrote:
I am not sure. These are all nuances that differ among regex implementations.
Perhaps you need to escape the dots in the decimal IP notation, as they have a meaning in regex. Perhaps the $ end-of-line will never be matched. Different embedded regex implementations always work differently; just have to massage it until it works.
Alex R.S.M wrote:
I am trying to modify Contact: sip:8133740008@1.1.1.1;transport=udp;maddr=1.1.1.1
to Contact: sip:8133740008@2.2.2.2;transport=udp;maddr=2.2.2.2
I am using the following statement but it doesn't work: if ( subst('/^Contact:(.*)sip:[^@]*@([a-zA-Z0-9.]+);(.*)$/contact:\12.2.2.2;\2/ig') ) {};
Am I missing anything?
Thanks, Alex
Date: Wed, 19 Nov 2008 11:06:53 -0500 From: abalashov@evaristesys.com To: alex_rsm@hotmail.com CC: users@lists.kamailio.org Subject: Re: [Kamailio-Users] Contact field
The various NAT traversal modules modify the Contact to suit their ends, according to their own scheme.
There is a module that will allow you to modify any header to anything you want:
http://www.kamailio.org/docs/modules/1.4.x/textops.html
Alex R.S.M wrote:
Hi,
Is there a function that can modify "Contact" field in SIP header?
Thanks, Alex
Windows Live Hotmail now works up to 70% faster. Sign up today.
http://windowslive.com/Explore/Hotmail?ocid=TXT_TAGLM_WL_hotmail_acq_faster_112008
Users mailing list Users@lists.kamailio.org http://lists.kamailio.org/cgi-bin/mailman/listinfo/users
-- Alex Balashov Evariste Systems Web : http://www.evaristesys.com/ Tel : (+1) (678) 954-0670 Direct : (+1) (678) 954-0671 Mobile : (+1) (706) 338-8599
Windows Live Hotmail now works up to 70% faster. Sign up today. http://windowslive.com/Explore/Hotmail?ocid=TXT_TAGLM_WL_hotmail_acq_faster_112008