[OpenSIPS-Users] Fixing the Contact Header for NAT

Iñaki Baz Castillo ibc at aliax.net
Fri Nov 28 13:43:24 CET 2008


El Viernes, 28 de Noviembre de 2008, Juan Backson escribió:
> Thank you for taking a look at the problem.  I get that it is the
> 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?


> The only place that I specified the private address 192.168.1.101 is when I
> start up opensips with the command: /usr/local/sbin/opensips -l
> 192.168.1.101:5060 -f opensips.cfg
> 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?


> 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ñaki Baz Castillo



More information about the Users mailing list