[Asterisk-Users] NAT problems

Chris Shaw chriss at watertech.com
Thu Aug 5 14:26:09 MST 2004


----- Original Message -----
From: "Bartosz Wegrzyn" <junk at lexon.ws>
To: <asterisk-users at lists.digium.com>
Sent: Thursday, August 05, 2004 2:00 PM
Subject: Re: [Asterisk-Users] NAT problems


> I didnot use that magic name, because lately there was a big discution
> regarding my post.  I will try to be as precise as as I can now.
>
> This is my sip conf file
>
> [general]
> externip=my DDNS Domain name
> bindaddr = 0.0.0.0
> port=5060
> localnet=192.168.1.0/255.255.255.0
> disallow=all
> allow=ulaw
> context=from-broad
> dtmfmode=inband
> register => 7734660101:mysecret at sip.broadvoice.com
> tos=0x18
> srvlookup=yes
> nat=yes
> insecure=yes
>
> [Broadvoice]
> type=peer
> username=7734660101
> fromuser=7734660101
> secret=mysecret
> host=sip.broadvoice.com
> context=sip
> fromdomain=sip.broadvoice.com
> canreinvite=no
> dtmfmode=inband
> nat=yes
>
> [broadvoice-incoming]
> type=peer
> dtmfmode=inband
> host=147.135.8.128
> context=from-broad
> qualify=yes
> canreinvite=no
> disallow=all
> allow=ulaw
> nat=yes
>
> [broadvoice-incoming2]
> type=peer
> dtmfmode=inband
> host=147.135.0.128
> context=from-broad
> qualify=yes
> canreinvite=no
> disallow=all
> allow=ulaw
> nat=yes
>
> What is happening is that when this IP change occurs,
> asterisk answers incoming call, but on the other side the caller does not
> here anything (only 2-3 rings) and then it goes directly to the provider
> voicemail. When I look at the asterisk console while it is happening the
> asterisk executes everything in the context till the end.
>
> Bart,

Hmmmm if BV is answering voicemail that means that * is loosing registration
or cannot contact the SIP proxy, not necessarily NAT related...

One thing you should do, if you are not doing port forwarding for 5060 and
your RTP ports, be sure you're doing that, it fixes a lot of things... right
now since * does not do STUN it dosen't (at least not to me) seem to handle
NAT very well...

if you are using port forwarding, make sure you set NAT=NO or NAT=NEVER
under all of the broadvoice contexts and in [general].

the insecure=yes belongs in the [broadvoice-incoming] contexts, but you
don't really need that since you've created 2 separate contexts...

In the [broadvoice] context, you're gonna want to change it from saying
host=sip.broadvoice.com to host=147.135.8.129. The reason for this is that
sip.broadvoice.com resolves to both 147.135.8.129 and 147.135.0.129 and
0.129 is not accepting connections right now... maybe never, I don't know
BV's plans... *I believe that this is the reason why your calls are not
working some of the time...*


    -Chris






More information about the asterisk-users mailing list