Hi,
I set up Asterisk behind NAT. SIP-Phones are in the same subnet. It works perfectly with inbound and outbound calls. But why ?
Don’t get me wrong - I love it, but I need to document what I’ve done. Well and now I can’t explain it any more
Please take a look into my configuration:
sip.conf
[general]
language=de
useragent=Asterisk PBX
bindport=5080
bindaddr=0.0.0.0
disallow=all
disable=all
allow=alaw
allow=ulaw
allow=g729
allow=gsm
allow=slinear
;srvlookup=yes
nat=no
;externhost=asterisk.dyndns.org
;externrefresh=180
;localnet=192.168.178.0/255.255.255.0
host=sipgate.de
;host=217.10.79.9
register=><username>:<pw>@sipgate.de/<username>
canreinvite=no
dtmfmode=rfc2833
;qualify=yes
fromdomain=sipgate.de
[sipgate]
type=peer
insecure=port,invite
nat=yes
username=<username>
fromuser=<username>
fromdomain=sipgate.de
secret=<pw>
host=sipgate.de
qualify=yes
canreinvite=no
dtmfmode=rfc2833
context=sipgate-in
[telefone](!); Template
type = friend
context = meine-telefone
host = dynamic
[200](telefone); Hausmeister
callerid="Hausmeister Krause"<200>
secret = 1234
extensions.conf
[general]
[meine-telefone]
exten=>_0.,1,Dial(SIP/${EXTEN:1}@sipgate)
exten =>_0.,n,Hangup
As you might see, I commented (every?) setting for NAT out.
From which setting does the Asterisk know the routers official (routable) IP address ? I’d also disable any port-forwarding and dyndns in my router.
But it keeps working. What I need to document is a comparison between Asterisk with NAT and without NAT configuration.
Could someone please help me with that ?
Thanks a lot in advance