[Users] Rewriting Contact HF port

Klaus Darilion klaus.mailinglists at pernau.at
Mon Aug 7 08:42:51 CEST 2006


Justin Pearce wrote:
> I am wondering if there is a good way to rewrite the port in the contact 
> header in OpenSER 1.0.1

1. Why do you want to rewrite the port to fixed port? NAT problems?

> before it is stored in the location table?(I’m using the MySQL database 
> backend).
> 
> Thus far, I am using “subst(/^(Contact.+):[0-9]+(.+)$/\1:5060\2/ig);” 
> just before I do
> 
> “save(“location”);”, but that does not seem to be working.

subst will be applied before the message is forwarded. Thus, save() sees 
the original Contact header. You either loop the modified message to the 
SIP proxy again or you write your own function (similar to the function 
in nathelper module)

regards
klaus

> 
>  
> 
> Suggestions?
> 
>  
> 
> Justin Pearce
> 
> Information Technology/Programming
> 
> Price Video Productions
> 
> JustinP at PriceVideo.com <mailto:JustinP at PriceVideo.com>
> 
> 361-572-3810
> 
> 800-733-3810
> 
> Fax: 361-572-3894
> 
> www.PriceVideo.com
> 
>  
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Users mailing list
> Users at openser.org
> http://openser.org/cgi-bin/mailman/listinfo/users





More information about the sr-users mailing list