[asterisk-users] About Asterisk SIP NAT Config

Koichi Yagishita yagishita.koichi at jrc.co.jp
Mon Jun 6 05:57:11 CDT 2011


Dear all,

I would appreciate it if you could teach me "Asterisk SIP NAT Config".
I'm trying to capture SIP Register with externip that should set in
contact header at External SIP Server as shown below, but I haven't
seen it.
I need your help.

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
externip=*.*.*.*
localnet=192.168.100.0/255.255.255.0

register => 1000:jrcyagi at 192.168.100.1/1234

; To make a call to a external SIP server
[mysipprovider-out]
type=friend
secret=jrcyagi
username=1000
host=jrc.nwt.com
fromuser=1000
fromdomain=jrc.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=jrcyagi
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



More information about the asterisk-users mailing list