[OpenSIPS-Users] nat_traversal fails on loose_route ACK

Iñaki Baz Castillo ibc at aliax.net
Sat Jul 11 15:07:11 CEST 2009


El Sábado, 11 de Julio de 2009, Jeff Pyle escribió:
> ¡Easy indeed!  I didn't have any NAT intelligence in the reply route.
>
> Here's what I tried first:
>
> onreply_route[1] {
>         if (client_nat_test("3")) {
>                 xlog("L_INFO", "NAT Reply\n");
>                 fix_contact();
>         } else {
>                 xlog("L_INFO", "Reply\n");
>         }
> }
>
> This appeared to work a bit "too" well.  The client_nat_test returned true
> even for non-NAT'd hosts.  I changed the test from "3" to "1" and it seems
> to be behaving as expected.

You cannot use test "2" for a reply:

-----------
2 - tests if client has contacted OpenSIPS from an address that is different 
from the one in the Via field. Both the IP and port are compared by this test.
-----------

Note that the Via headers in a reply are a *copy* of the Via headers in the 
request!


> None of the examples seem to use the number 4 "private IP address in the
> top Via field" test.  Is there any particular reason for that?  In my
> searches I haven't come across a discussion on the pros and cons of the
> various tests.

As above, it is not valid for replies.


-- 
Iñaki Baz Castillo <ibc at aliax.net>



More information about the Users mailing list