Asterisk SIP NAT Config

Dear all,

I would appreciate it if you could teach me “Asterisk SIP NAT Config”. My Asterisk version is 1.8.3.3.
I’d like to include “exernaddr” configured in sip.conf into SIP Register transmitted by Asterisk to External SIP Server,
but the message with localip set in contact header could be transmitted. My experiment environment is as follows.

[My Environment]
X-Lite — Asterisk(SIP Server+SIP Client) — External SIP Server

  • I assume that there is a NAT router between Asterisk and External SIP Server.

[IP Configuration]
External SIP Server IP: 192.168.100.1
Asterisk: 192.168.100.3
X-Lite IP: 192.168.100.5

[My sip.conf in Asterisk]

[general]
; SIP Client Config - Start
localnet=192.168.100.0/255.255.255.0
externaddr=...

register => 1000:yagi@192.168.100.1/1234

; To make a call to a external SIP server
[mysipprovider-out]
type=friend
secret=yagi
username=1000
host=nwt.com
fromuser=1000
fromdomain=nwt.com
canreinvite=no
insecure=very
qualify=yes
nat=yes
context=from-mysipprovider
; is further defined in extensions.conf

; SIP Client Config - End

; SIP Server Config - Start
[1000]
type=friend
secret=yagi
aith=md5
nat=yes
host=dynamic
reinvite=yes
qualify=1000
dtmfmode=inband
callerid=“yagi1” <1000>
disallow=all
allow=ulaw
allow=alaw
context=default

Regards,
Yagishita