[asterisk-dev] behavior of 'nat=yes' with 'directrtpsetup=yes'

Klaus Darilion klaus.mailinglists at pernau.at
Tue Jul 31 11:11:58 CDT 2007


You can make things even complicater - e.g. if you Answer() before 
Dialing out to the other client (e.g. for some announcements) - then 
directrtp wont work without reINVITE.

regards
klaus

Adam Gundy wrote:
> 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..
> 
> 
> _______________________________________________
> --Bandwidth and Colocation Provided by http://www.api-digital.com--
> 
> asterisk-dev mailing list
> To UNSUBSCRIBE or update options visit:
>    http://lists.digium.com/mailman/listinfo/asterisk-dev



More information about the asterisk-dev mailing list