[OpenSIPS-Users] nat_traversal fails on loose_route ACK

Iñaki Baz Castillo ibc at aliax.net
Fri Jul 10 23:03:35 CEST 2009


El Viernes, 10 de Julio de 2009, Jeff Pyle escribió:
> Hello,
>
> On Opensips 1.5.1, the scenario is this:  A subscriber behind NAT places a
> call through the proxy that gets relayed to Asterisk whose canreinvite=yes.
> The call goes is answered and Asterisk reinvites the RTP endpoints
> together.
>
> The call starts to go badly when Asterisk ACKs the subscriber's 200 OK to
> its reinvite.  Opensips tries to relay the ACK to the private IP of the
> endpoint, not the public.  Everything up to this point has been to the
> public.

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).



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



More information about the Users mailing list