[asterisk-users] SIP provider and NAT

Alex Balashov abalashov at evaristesys.com
Wed Nov 12 15:13:34 CST 2008


Investigate the externip= option for your SIP peers to the provider.

Jim Dickenson wrote:

> I have an Asterisk server, running 1.6.0, on my home network. It has an 
> IP address of 192.168.0.201. The server is behind my Linksys router that 
> does NAT for my home devices. I have a softphone on my Mac that is on 
> the same NATed network as the Asterisk server. It has an IP address of 
> 192.168.0.1. I have tried this with a Grandstream phone with the same 
> results.
> 
> The Asterisk server registers with a SIP provider and seems to maintain 
> a registration.
> 
> When I try to dial out from the soft phone or the Grandstream via the 
> SIP provider I get a "Bad Request" response from the provider. I am 
> guessing that many of the packets have my internal address and need my 
> public address.
> 
> Is there some way to resolve this?
> 
> Here is the relevant entry in extensions.conf:
> 
> exten => _88X.,1,Dial(SIP/${EXTEN:2}@proxy01.sipphone.com,20,r)
> exten => _88X.,n,Hangup()
> 
> 
> Here are my entries in sip.conf:
> 
> [proxy01.sipphone.com]
> type=peer
> context=mine
> disallow=all
> allow=ulaw
> dtmfmode=rfc2833
> host=proxy01.sipphone.com
> fromdomain=proxy01.sipphone.com
> insecure=port,invite
> qualify=yes
> fromuser=myid
> authuser=myid
> defaultuser=myid
> secret=mypwd
> canreinvite=no
> 
> [GXP280]   
> type=friend
> context=mine
> nat=no
> canreinvite=no
> host=dynamic
> secret=mypwd
> callerid=GXP280 <109>
> mailbox=109 at ourvm
> busylevel=2
> 
> [dickenson]
> type=friend
> context=empl
> nat=no
> canreinvite=no
> host=dynamic
> secret=mypwd
> callerid=Jim Dickenson <108>
> mailbox=108 at ourvm
> 
> Looking at the SIP debug transaction I do not see my public IP address 
> at all. There must be some setting about the server having at NATed address.
> 
> -- 
> Jim Dickenson
> mailto:dickenson at cfmc.com
> 
> CfMC
> http://www.cfmc.com/
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
> 
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>    http://lists.digium.com/mailman/listinfo/asterisk-users


-- 
Alex Balashov
Evariste Systems
Web    : http://www.evaristesys.com/
Tel    : (+1) (678) 954-0670
Direct : (+1) (678) 954-0671
Mobile : (+1) (706) 338-8599



More information about the asterisk-users mailing list