I am trying to setup a cloud Asterisk server that is behind a NAT with the hello-world example. I have NAT issues. The IP address Asterisk is supplying to the client through the SDP is its local address behind the NAT, not the external address.
I have attempted to set the externip
value in sip.conf
, but this seems to have no effect.
[general]
externip=xxx.yyy.zzz.vvv
nat=yes
tcpenable=yes
The SDP received at the client is not consistent with the server externip
setting:
v=0
o=root 291445984 291445984 IN IP4 172.31.46.110
s=Asterisk PBX 11.7.0~dfsg-1ubuntu1
c=IN IP4 172.31.46.110
t=0 0
m=audio 10078 RTP/AVP 0 101
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=sendrecv
m=video 0 RTP/AVP 96
I expect the address in the SDP to match that provided in the externip
field. I have tried both the actual IP address, as well as the server name, which correctly resolves to the IP address through DNS.
Am I setting the externip
value incorrectly? Or is there a different setting that is required to have Asterisk advertise its external IP address?