[Asterisk-Users] Sip behind the NAT

Michael George george at mutualdata.com
Tue Dec 13 06:25:39 MST 2005


On Fri, Dec 09, 2005 at 03:23:31PM -0500, Tom Rymes wrote:
> On 12/8/05, chawki hammoud <cyhammoud at yahoo.com > wrote:
> 
> >Hi:
> >
> >i added these two lines to my general context ,but
> >nothing happened the same result the sound came in one
> >way for 3 seconds and stopped but it didnt hangup.
> >
> >--- Jeffery Chen <jeffery9 at gmail.com> wrote:
> >
> >> If your Astersik server behind NAT too, your need
> >> modify SIP.conf like
> >> this....
> >>
> >> externalIP= x.x.x.x
> >> localnet= x.x.x.
> >>
> >> hope this can help you....
> 
> Make sure that you have ports 5060 and ports 10000-20000 UDP  
> forwarded to your Asterisk server. (Asterisk uses UDP for SIP, not  
> TCP!!!)
> 
> Also, in addition to the externip and localnet entries in sip.conf,  
> You need to add a "nat=yes" entry

I have a similar problem with a client's system.  They have * 1.0.x
behind a NAT with all the SIP phones on the local network.  Their VoIP
provider is outside the NAT (a Metaswitch at their ISP, connected to the
phone lines from there).

Their network guy has the firewall passing traffic on ports 5060 and
10000-20000 to the * system.

I have externalIP and localnet set, but "nat=no" (default) is the case
for this one.

Occasionally they will place outgoing calls and the other party does not
hear anything.  Usually another attempt at the call will pass audio
normally.

One person who makes about 100 calls a day remembers having this happen
on about 7 calls one day.

No one recalls this ever happening on incoming calls (though this client
primarily makes outgoing calls, I believe).

Apparently this has been happening for a while and they just now
mentioned it to me.

Would "nat=yes" in the general section of sip.conf make a difference in
this case?

Is there anything else I could look at that might alleviate this
problem?

Thank you.

-- 
-M

There are 10 kinds of people in this world:
	Those who can count in binary and those who cannot.



More information about the asterisk-users mailing list