Re: [OpenSIPS-Users] [OpenSIPS-News] How modify Contact header

2009-11-12 Thread Schober Walter
Hi!

I don't know why, but this works:
$var(ct) = $ct;
Modify $var(ct) as needed, eg by Transformations {regex,bla}
remove_hf(Contact);
append_hf(Contact: $var(ct)\r\n); 

But be carefull what you are doing here! The initial side UA won't understand 
in dialog messages then... But I guess you know that ...

br Walter

-Ursprüngliche Nachricht-
Von: news-boun...@lists.opensips.org [mailto:news-boun...@lists.opensips.org] 
Im Auftrag von Alex Balashov
Gesendet: Mittwoch, 21. Oktober 2009 03:23
An: Ariadne Ramos
Cc: n...@lists.opensips.org; 'users'
Betreff: Re: [OpenSIPS-News] How modify Contact header

Try escaping the : as well.  They have special meaning in regex.

Ariadne Ramos wrote:

 Hello
 
  
 
 I'm trying to modify the contact header in onreply route
 
  
 
 I'm using
 
  
 
 if(subst('/^Contact:(.*)@proxy.yy.com/Contact:\...@proxy.xx.com/')) {
 
xlog(L_INFO, SUBST OK $ct \n);
 
 }
 
  
 
  
 
 And the contact still being the same
 
  
 
  
 
 Logs
 
 [15224]: SUBST OK sip:001x...@proxy.yy.com
 
  
 
 Can you help me to understand what I'm missing?
 
  
 
 Thanks in advanced
 
  
 
 Ariadne
 
  
 
 P BE CARBON CONSCIOUS. PLEASE CONSIDER OUR ENVIRONMENT BEFORE PRINTING 
 THIS E-MAIL
 
  
 
  
 
 
 --
 --
 
 ___
 News mailing list
 n...@lists.opensips.org
 http://lists.opensips.org/cgi-bin/mailman/listinfo/news


--
Alex Balashov - Principal
Evariste Systems
Web : http://www.evaristesys.com/
Tel : (+1) (678) 954-0670
Direct  : (+1) (678) 954-0671

___
News mailing list
n...@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/news

___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] [OpenSIPS-News] How modify Contact header

2009-10-21 Thread Brett Nemeroff
I'm not sure if it's a real good idea to rerwrite the contact header.
That may break loose routing? Do you have a good reason to do this?


On Tue, Oct 20, 2009 at 8:22 PM, Alex Balashov
abalas...@evaristesys.com wrote:
 Try escaping the : as well.  They have special meaning in regex.

 Ariadne Ramos wrote:

 Hello



 I’m trying to modify the contact header in onreply route


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] [OpenSIPS-News] How modify Contact header

2009-10-20 Thread Alex Balashov
Try escaping the : as well.  They have special meaning in regex.

Ariadne Ramos wrote:

 Hello
 
  
 
 I’m trying to modify the contact header in onreply route
 
  
 
 I’m using
 
  
 
 if(subst('/^Contact:(.*)@proxy.yy.com/Contact:\...@proxy.xx.com/')) {
 
xlog(L_INFO, SUBST OK $ct \n);
 
 }
 
  
 
  
 
 And the contact still being the same
 
  
 
  
 
 Logs
 
 [15224]: SUBST OK sip:001x...@proxy.yy.com
 
  
 
 Can you help me to understand what I’m missing?
 
  
 
 Thanks in advanced
 
  
 
 Ariadne
 
  
 
 P BE CARBON CONSCIOUS. PLEASE CONSIDER OUR ENVIRONMENT BEFORE PRINTING 
 THIS E-MAIL
 
  
 
  
 
 
 
 
 ___
 News mailing list
 n...@lists.opensips.org
 http://lists.opensips.org/cgi-bin/mailman/listinfo/news


-- 
Alex Balashov - Principal
Evariste Systems
Web : http://www.evaristesys.com/
Tel : (+1) (678) 954-0670
Direct  : (+1) (678) 954-0671

___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users