[OpenSIPS-Users] Fixing the Contact Header for NAT

Juan Backson juanbackson at gmail.com
Fri Nov 28 14:14:04 CET 2008

Hi Inaki,

Thanks again for your help.  I still have a bit of problem:

> > Record-Route that is not pointing back to opensips's public address and
> > instead it is using opensips private address.
> Well, which is the REAL IP of OpenSIPS? a private or public one? both?

 233.32.345.5:5060  is the real ip and is the private IP.

> If I changed that to /usr/local/sbin/opensips -l 233.32.345.5:5060 -f
> opensips.cfg, I am getting error saying: ERROR:core;udp_init:
> bind(5,0x76512c,16) on 233.32.345.5: Cannot assign requested address.

So OpenSIPS host has not that public IP, is it?

The opensips host does not have that IP.  The router points the public IP to
the opensips box only for port 5060.

> > Is this the place where my setup is having problem or is this something
> > else?
> In case OpenSIPS is behind NAT and the client has public IP is really
> difficult. The Record-Route added by OpenSIPS must point to the mapped
> public
> IP (the source IP the client will see). This can be achieved manually with
> a
> function in "rr" module.
> But be carefull if you also have natted clients since if they do a request,
> they must see a Record-Route (in the 200 OK they receive) pointing to the
> private address of the proxy, not the public one.

I tried using record_route_preset("233.32.345.5:5060") in the onreply_route,
so when 200OK passes through opensips, it will hange the record route to is
public IP, but it seems like this command can't be used in the block.  Is
there any other function that I can use to see the value of record route?

I am not sure about the last one.  In my situation, the SUC is inside one
nat and opensips is within another nat.  Can it work that way?

Thanks alot for all your help.


> --
>  Iñaki Baz Castillo
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.opensips.org/pipermail/users/attachments/20081128/e71d9a08/attachment.htm 

More information about the Users mailing list