[Asterisk-Users] SIP, Asterisk and NAT

Olle E. Johansson oej at edvina.net
Wed Apr 27 00:27:21 MST 2005


Irakli Natsvlishvili wrote:
> 100k question - does asterisk correctly handle following situations:
There are plenty of good documents on Asterisk, SIP and NAT on the
voip-info.org wiki. Please look them up. There are also information
within the configs/sip.conf.sample file within Asterisk.

> 1. Asterisk is on a public IP
>    Two SIP clients on separate networks, each of them are behind dynamic NAT
> gateway. Nat gateway does not have ALG. Media stream SHOULD NOT go thought
> asterisk.
If the media stream SHOULD NOT go through Asterisk, then it's up to the 
phones
to support NAT traversal properly and handle this, it's not an Asterisk 
problem. From Asterisk's point of view, we should not see that they are 
in fact behind NAT. Modern phones in combination with STUN and a decent 
NAT device supports this.

> 2. Even worst case -  three clients, two of them on one site, second is on
> another site. For example extensions 500 and 600 are on the same site and in
> the same subnet and extension 1000 is on another site/network. There are PAT
> FW/gateways with dynamic public IP in front of clients and those are
> symmetric NAT/FW.
> 
> The task - clients registering on Asterisk server, calling each other and
> RTP should not go via asterisk. So, media stream should go directly from one
> client to another.
If Asterisk is on a public IP, again: it's up to the phones. It's still not
an Asterisk problem.

> I want to know:
> 
> 1. Is it possible? - yes/no. Implementation should involve asterisk and SIP
> clients and not involving third party hardware products - ALG, session
> border controllers or so on.
Yes, but you need to pick the right phone, the right NAT/FW and have a 
lot of patience :-)
> 2. If it is possible, what are requirements for SIP clients.
Good NAT traversal support.

> 3. What configuration changes should be done on Asterisk server and on a sip
> clients.
 From Asterisk's point of view, all of these phones are on a public IP 
and we
do not give them any NAT traversal support. If you want detailed 
configurations, there are several consultants available that can help 
you with that (including my company).

> And final question - if it is NOT possible with Asterisk, do you know an
> open source product which works in above stated scenarios and you've
> actually tested it. 
It is possible with Asterisk and every other SIP server. With your 
requirements, it's completely a client-side problem.

Best regards,
/Olle



More information about the asterisk-users mailing list