I configured asterisk in sip.conf like that:
register => username:email@example.com:5060/number
But all I get on CLI is:
[Jan 19 15:59:55] NOTICE: chan_sip.c:12104 sip_reg_timeout: —
Registration for ‘firstname.lastname@example.org’ timed out, trying again (Attempt #1)
My first impression was that there must be a NAT related issue, so I
captured some SIP debug packets and got:
Retransmitting #6 (NAT) to 220.127.116.11:5060:
OPTIONS sip:sipgate.de SIP/2.0
Via: SIP/2.0/UDP 192.168.23.30:5060;branch=z9hG4bK4c5e9a7f;rport
From: “asterisk” ;tag=as669e138a
CSeq: 102 OPTIONS
User-Agent: Asterisk PBX 18.104.22.168
Date: Thu, 19 Jan 2012 15:00:55 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces, timer
As you can see, asterisk writes the local ip address in the VIA header.
Is this the supposed behaviour?
As far as my understanding of the NAT problem goes, this is exactly what
I don’t want to be happening.
I’m familiar with the general NAT problem with layer 7 protocols relying
on ip addresses in the content of a layer 3 packet, but I thought,
asterisk would replace the local ip with the WAN ip.
Even setting “externip=xx.xx.xx.xx” does not change anything.
Anyone can give me advice?