Asterisk is on a server behind a firewall. Calls made from extensions that are also behind the firewall have audio. Extensions outside the firewall will ring the number called but when answered there is no audio.
Initial thoughts were a firewall problem, but opening all ports with: iptables -I INPUT -j ACCEPT
UFW ports 5060, 10000-60000 are open for tcp and udp.
Can it be some setting in sip.conf?
Here are some of the values I tried.
If you get debugging with “sip set debug on”, are the correct IP addresses in the c lines, and the correct ports in the m lines, in the SDP from both sides.
nat=yes probably still works, but has been superseded by the combination of the two component settings: nat=force_rport,comedia, and is only relevant if the peer is sending the wrong addresses or ports.
You are missing type=peer.
Unless your system cannot make PSTN calls, having no authentication on internal devices is a really bad idea.
You should note that chan_sip is deprecated, unsupported, and scheduled for removal.
You are using an unsupported version of Asterisk. Please reproduce with 16.24.1 or 18.10.1. 13.1.0 is over seven years old, and even security fixes ended for Asterisk 13 last year.
The log show that Asterisk is ignoring the external IP address. Please use CLI commands to verify whether it has actually read it, although it may be because it isn’t a valid synonym for externaddr, although it does look like current versions recognize it, even though it isn’t documented. Did you put it in the general section?
(The peer doesn’t seem to need nat=, as it seems to be correctly presenting its public addresses, although force_rport may get it a little way in coping with the problem at the Asterisk end.)
How time passes. Didn’t realize how old my version of Asterisk is.
But I can’t upgrade Asterisk! Do I need to reinstall from scratch?
$ apt-get install asterisk
Reading package lists… Done
Building dependency tree
Reading state information… Done
asterisk is already the newest version (1:13.1.0~dfsg-1.1ubuntu4.1).
0 upgraded, 0 newly installed, 0 to remove and 8 not upgraded.
Just upgraded ubuntu and again got the same message for Asterisk.