[OpenSIPS-Users] nat_traversal fails on loose_route ACK
Jeff Pyle
jpyle at fidelityvoice.com
Sat Jul 11 01:28:07 CEST 2009
¡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.
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.
- Jeff
On 7/10/09 5:03 PM, "Iñaki Baz Castillo" <ibc at aliax.net> wrote:
> Easy: you must ensure that the proxy performs NAT detection for reply routes
> (onreply_route) for in-dialog requests, and fix the Contact (fix_contact()) in
> onreply_route.
>
> This is:
>
> - The UA sends INVITE behind NAT.
> - OpenSIPS fixed Contact and routes it to Asterisk.
> - Asterisk replies 200 => proxy => UA.
> - UA sends ACK => proxy => Asterisk.
> - Now Asterisk sends re-INVITE (in-dialog request) to the proxy.
> - The proxy routes it to UA.
> - UA replies 200.
> - Proxy *fixes Contact* for the 200 and routes to Asterisk.
> - Asterisk now will send ACK to proxy with RURI containing the fixed Contact
> address (UA's public IP:port).
More information about the Users
mailing list