[Asterisk-Users] SIP and NAT - best practices?

Trevor G. Hammonds trevor at concipient.net
Sat Jan 21 18:42:26 MST 2006


How about when you have four or five SIP devices at a single location?  Do
you manually assign each phone a separate port and add firewall/router
rules?  I am looking for an inexpensive device or method that will allow
this happen automatically.  Rather than going that route, my current
solution is to put an Asterisk server at the client's location to handle the
SIP clients and do an outbound trunked IAX connection back to the main
server.  

		Sincerely,
		Trevor Hammonds

Mark Phillips wrote on Saturday, 21 January 2006 12:36 PM:

> Most often the simple addition of nat=yes in the relevant sip.conf
> stanza is all that's required to make a remote SIP phone work from
> behind a firewall.  
> 
> for example
> 
> [2201]
> user=blah
> secret=blah
> auth=blah
> allow=blah
> host=dynamic
> nat=yes
> 
> I've been running 4 remote SIP phones across the internet from my
> families houses all over the world in this manner. The only issues I
> get are those of bandwidth availability or rather occasional lack of
> it.   
> 
> Hosted PBX's are no different. The hosting service should be
> providing a similar mechanism (although it might not be Asterisk
> based).  
> 
> Mark, G7LTT/KC2ENI
> Randolph, NJ
> http://www.g7ltt.com
> 
> 
> Michaël Gaudette wrote:
>> Thanks Moises.  I was kind of hoping that, at least if I hosted my
>> Asterisk server somewhere where there was no NAT for the * box that
>> the SIP phones wouldn't create any issues.
>> 
>> How do you people with Hosted PBX handle the deployment of SIP phones
>> behind NAT firewalls? Is it just elbow grease and configuring every
>> single phone for the customer, or is there a way?
>> 
>> Mike
>> 
>> 
>> 
>> you can redirect the ports of the router as well. Or you can
>> configure your SIP phone to use a STUN server. Please read in
>> voip-info.org about SIP NAT, there are good suggestions.
>> 
>> regards
>> 
>> On 1/20/06, Michakl Gaudette <michael.gaudette at virtutel.ca> wrote:
>> 
>>> Hello,
>>> 
>>> I'm a bit new to SIP, and I've set up a SIP line with Asterisk and
>>> my wholesale provider.  That worked, fine.  I ahd to open up the
>>> ports on my router, forward them to the correct box, again fine.
>>> 
>>> Now, if I get one of my customers to connect his SIP phone to my
>>> Asterisk box, and HE'S behind a NAT firewall, does he have to go
>>> through the same process, or is it just the Asterisk box that needs
>>> to translate the SIP
>> 
>> and
>> 
>>> RTP port?
>>> 
>>> In other words: if my SIP phone is behind a Linksys router, do I
>>> need to configure the Router for any reason?
>>> 
>>> Mike




More information about the asterisk-users mailing list