How can I send INVITE with public IP in SDP? My Asterisk is behind NAT and when I make a call I don’t hear the ringing tone. My operator says that this is due to the wrong (private Asterisk IP address) address being sent in INVITE packet. My Asterisk is 16.7.0 and use pjsip channel driver.
I tried to make it work by modifying:
[transport-udp]
type=transport
protocol=udp
bind=0.0.0.0
local_net=172.23.16.0/24
;external_media_address=78.xx.xx.117
;external_signaling_address=78.xx.xx.117
However when I uncomment the last two lines then no any call is possible.
My all endpoints also has:
from_domain=78.xx.xx.117
but I don’t see any difference.
Have you forwarded the ports to the Asterisk instance? Can you provide a log with the external options enabled (as that is how to place your public IP address in the signaling and SDP)?
When I enable external_media_address=78.xx.xx.117
then there is (null) instead of the IP address in the INVITE
and Warning: 301 87.xx.xx.4 “invalid transport IP address”
What is the output of /etc/hosts? What is the precise current configuration? What platform/distro are you using? As well your version of Asterisk is old, and if I recall there were some issues resolved in that area.