[OpenSIPS-Users] Fixing the Contact Header for NAT

Juan Backson juanbackson at gmail.com
Thu Nov 27 14:48:34 CET 2008

Hi Inaki,

Thank you for your kindness in helping me out.
I think your diagnosis of the problem is exactly what I am facing right
I tried to solve it by putting in :

    if (nat_uac_test("19")) {
        xlog("nat client detected\n");
            if (method=="REGISTER") {
            } else {

        xlog("record route with nat = yes\n");
            } else {
        xlog("normal record route\n");

But it is still not working.  My opensips and B2BUA are within on NAT and my
xlite is within another NAT, is this going to work?


On Thu, Nov 27, 2008 at 9:20 PM, Iñaki Baz Castillo <ibc at aliax.net> wrote:

> El Jueves, 27 de Noviembre de 2008, Juan Backson escribió:
> > In the 200OK received by the nated client, the Contact is :Contact:
> > <sip:1000 at>
> > Opensips did not add the Record-Route even
> > though I did specify fix_nated_contact in on_reply_route.
> Perhaps you don't understand the meaning of adding Record-Route, it has
> *nothing* to do with fix_nated_contact.
> Adding Record-Route means that in-dialog requests (as the ACK for the 200
> OK)
> will pass through the proxy, so the ACK will contain a Route header and a
> RURI with the value of the Contact received in the 200 OK:
>  ACK sip:1000 at
>  From: zzzzzzz
>  To: zzzz
>  Route: <sip:ip_proxy>
> This ACK will arrive to the proxy (it has a Route so the device/phone MUST
> send the request there), but whe this ACK arrives to the proxy it will
> remove
> the Route header and route it based on the RURI, this is: the proxy will
> forward this ACK to IP
> Do you understand the problem? Most probably, the proxy is in a different
> network (hopefully with public IP) so it cannot reach that private IP.
> To solve it, the proxy must run "fix_nated_contact" in on_reply_route. This
> will replace the IP in the Contact of the 200 OK with the received public
> IP.
> In your case, this last point is not working since the UAS receives a
> Contact
> with a private IP. Verify it.
> --
>  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/20081127/37213f3b/attachment.htm 

More information about the Users mailing list