[Asterisk-Users] SIP behind NAT - use of "externip" option

Patrick Lidstone (Personal E-mail) patrick at lidstone.net
Mon Jan 26 11:30:48 MST 2004


I am having difficulty configuring SIP behind NAT (using latest CVS).

Using sip.conf:

[general]
port=5060                       ; Port to bind to
externip=ww.xx.yy.zz
bindaddr=0.0.0.0
nat=yes
register=>[userid]:[password]@voiptalk.org/2000
[voiptalk.org]
nat=yes
externip=ww.xx.yy.zz
type=friend
secret=[password]
nat=yes
reinvite=no
canreinvite=no

I fail to register. SIP Debug gives:

SIP Debugging Enabled
Jan 26 18:20:04 NOTICE[9226]: chan_sip.c:3126 sip_reg_timeout:
Registration for
 '[userid]@82.145.32.73' timed out, trying again
11 headers, 0 lines
 Reliably Transmitting:
REGISTER sip:voiptalk.org SIP/2.0
Via: SIP/2.0/UDP 192.168.0.89:5060;branch=z9hG4bK02c0373f
From: <sip:[userid]@voiptalk.org>;tag=as5548d275
To: <sip:[userid]@voiptalk.org>
Call-ID: 31f5cfdd49c26a3523f55d3b7503a587 at 192.168.0.89
CSeq: 103 REGISTER
User-Agent: Asterisk PBX
Expires: 120
Contact: <sip:2000 at 192.168.0.89>
Event: registration
Content-length: 0

 (no NAT) to 82.145.32.73:5060
Retransmitting #1 (no NAT):
REGISTER sip:voiptalk.org SIP/2.0
Via: SIP/2.0/UDP 192.168.0.89:5060;branch=z9hG4bK02c0373f
From: <sip:[userid]@voiptalk.org>;tag=as5548d275
To: <sip:[userid]@voiptalk.org>
Call-ID: 31f5cfdd49c26a3523f55d3b7503a587 at 192.168.0.89
CSeq: 103 REGISTER
User-Agent: Asterisk PBX
Expires: 120
Contact: <sip:2000 at 192.168.0.89>
Event: registration
Content-length: 0


 to 82.145.32.73:5060
Retransmitting #2 (no NAT):
... as previous frame ...

I would expect (perhaps wrongly?) that the externip would be reflected
in the Via: header (it seems to be when I look at the traces from a SNOM
100 successfully registery with voiptalk behind the same firewall). And
the (no NAT) comments in the debug trace also look suspicious, given the
explicit nat=yes in the config.

Any hints? I guess the externip might be in the wrong place or
conflicting with one of my other options, but neither the docs don't
seem to offer much by way of advice (I've checked the wiki, googled
etc).
Thanks
Patrick




More information about the asterisk-users mailing list