[asterisk-users] NAT solutions

Brad Templeton brad+aster at templetons.com
Sat Jan 27 00:34:19 MST 2007


On Fri, Jan 26, 2007 at 12:34:30PM +0000, Tim Panton wrote:
> >For a remote phone, not on the same network as the Asterisk
> >box (in which event the NAT worries are different) you definitely
> >want to use the same protocol for the phone as for your
> >term/orig provider.   Otherwise you will be forced to hairpin
> >your audio through your asterisk server, adding latency and
> >wasting bandwidth and cpu for little reason.
> 
> Unless you are monitoring calls, want full CDR  etc,
> then that's what you want anyway.

CDR are not affected by how the audio flows.  Monitoring
calls does require hairpin of the audio.  Most people who
are not call centers do not wish to monitor all calls or
even more than few calls.  (In fact in many states it is
illegal unless you inform the other party, mostly limiting
it to call center use.)

If you had a call center * server in the USA hairpinning
a call between India and the UK it would be really dumb,
but even over shorter links it's dumb.
> 
> I agree. Single SIP phones can usually be got to work behind
> a reasonable NAT router.

And with some work could be made to work without special
config with all but the rarest NATs.  Hopefully in 1.6.
> 
> For a single phone - you are quite right. For multiple phones,
> I'm not sure I agree - multiple SIP phones behind a NAT router
> is going to require some extensive config , or a SIP proxy in the  
> router.

Not really, other than the issue of NATS that won't hairpin
between the phones.

I have this situation, and our 2nd home I have 2 phones, on
the * server at my main home.  While I have linux computers at
the 2nd home, it would be silly to put up a * server for the
two phones if they can work through the NAT.  It's not a big
deal to tell the WRT54G I have to forward two ports to the 2
phones (well 3 if you include the wifi phone).  There is
no need at the 2nd house for intercom, so I would not put in
a local server just for that.

However, it does mean the remote location can't have SIP phones
without things like STUN.

> Ah, but it isn't just asterisk you have to change - it is
> all the SIP implementations and all the routers :-)

STUN is quite common in SIP phones, in fact the only major modern
ones to not do it seem to be the Ciscos, though I have not
tried the 8.0 firmware on them.


More information about the asterisk-users mailing list