[asterisk-dev] behavior of 'nat=yes' with 'directrtpsetup=yes'
Adam Gundy
arg at cyberscience.com
Tue Jul 31 09:14:55 CDT 2007
following on from a suggestion that a bug report I raised (10335) is at
least partly a feature request and should be discussed on -dev, I have a
question about the meaning of 'nat=yes', and a feature request...
basically, I have some NAT-blind SIP clients (OpenWengo) which do not
support SIP reinvites, and I was hoping the directrtpsetup option in
asterisk 1.4.x would help with this.
the problem is that it doesn't work, basically because of the way
'nat=yes' deals with RTP - asterisk waits for an incoming packet, then
sends all RTP to the IP/port that it came from. this works around the
fact that the NAT-blind SIP client put LAN IP/ports in the SIP packet.
so, when we get to directrtpsetup=yes, asterisk ends up sending the LAN
IP/ports of the two clients to each other, which obviously doesn't work
(unless they both happen to be behind the same NAT!), because asterisk
*never receives any RTP from the clients to fix its idea of the IP/ports*.
now here's the real question: what does 'nat=yes' mean? if it implies
'symmetric NAT' or 'router with ports forwarded', then we can actually
fix up this situation; we DO know the IP address that the SIP packet
came from, and if (as in my case) the SIP IP address is the same as the
RTP IP address, we could fix our idea of the RTP address without any
packets arriving, and the direct connection should work.
alternatively, if 'nat=yes' means 'dumb SIP client with no clue what its
IP/ports are', then we basically have to ban directrtp for this case,
and either use reinvites (if enabled), or proxy.
if that IS the case, can we have a 'nat=symmetric' which means
'symmetric NAT/router with ports forwarded' please? I'm sure there are
many SIP clients or hardware widgets out there which have no idea about
STUN and basically come with instructions to forward a range of ports
(I'm looking at the Polycom phone on my desk here as one example)
thanks..
More information about the asterisk-dev
mailing list