[Asterisk-Users] NAT working outbound with Asterisk and ATA-186 phones

John Todd jtodd at loligo.com
Thu Mar 6 14:29:20 MST 2003


Thanks, Mark!

Here's a summary of what one needs to do in order to get NAT working 
with Asterisk.  Please note that I have a Cisco ATA-186, and your 
experience may be slightly different based on the equipment you're 
using.  You'll need to have a CVS updated version of Asterisk as 
2003-03-06 ~2:00 PM EST.

NOTE: This currently works for outbound calling only, not inbound. 
In other words, calls from Asterisk to your NAT-translated device 
will not make it through.

Configs in Asterisk:

sip.conf:
   Add the line "nat=1' to any users/friends/peers that you expect to 
be coming from behind a NAT device.  I have one client behind NAT, 
and here is what that that peer looks like:

[2410]
type=friend
username=2410
secret=somepasswordhere
host=dynamic
context=intern
canreinvite=no
nat=1



On your Cisco ATA-186:

Set your IP address information as usual (use DHCP, or static, 
whatever your site requires)
UID0: [your UID]
PWD0: [this UID's password]
UseSIP: 1
SIPRegInterval: 240
GkOrProxy: [ip address of your Asterisk server]
Gateway: [ip address of your Asterisk server]
ConnectMode: 0x00460400
OutBoundProxy: [ip address of your Asterisk server]


The ConnectMode flags are used in v2.14 and v2.15 to "re-register" 
phones with the correct data.  See 
http://www.cisco.com/univercd/cc/td/doc/product/voice/ata/atarn/186rn214.htm#xtocid17 
for details.

That should be all you need to get outbound calls working in their 
most basic sense.

JT



More information about the asterisk-users mailing list