No audio on internal calls

I have an Asterisk server running in Azure and my endpoints are on a private network behind NAT. While outgoing and incoming calls work fine with audio, there’s no audio for internal calls. How can I troubleshoot and fix this issue?

Azure Asterisk private IP: 10.0.0.4
Local network: 10.0.0.0/24

[transport-udp]
type=transport
protocol=udp
bind=0.0.0.0
external_media_address=Azure Public IP
external_signaling_address=Azure Public IP
local_net=10.0.0.0/24

[111]
type=endpoint
transport=transport-udp
context = outgoing
allow=!all,alaw
auth=111
aors=111
rtp_symmetric=yes
force_rport=yes
ice_support=no
rewrite_contact=yes
media_use_received_transport=yes

[111]
type=auth
auth_type=userpass
password=password
username=111

[111]
type=aor
max_contacts=1
remove_existing=yes
qualify_frequency=60

[116]
type=endpoint
transport=transport-udp
context = outgoing
allow=!all,alaw
auth=116
aors=116
rtp_symmetric=yes
force_rport=yes
ice_support=no
rewrite_contact=yes

[116]
type=auth
auth_type=userpass
password= password
username=116

[116]
type=aor
max_contacts=1
remove_existing=yes
qualify_frequency=60

You can use “rtp set debug on” to see if media is being received by Asterisk. If it isn’t, then it is firewalled or the SDP is incorrect. You can then check the SDP using “pjsip set logger on” to examine what IP address is going into it. If that’s correct then the problem is most likely outside of Asterisk, and is firewall related.

Here are the debug messages for two calls.

Internal call with no audio (111 phoning 114)

Got  RTP packet from    Local_net_public_ip:10022 (type 08, seq 000000, ts 2261103561, len 000160)
Sent RTP packet to      Local_net_public_ip:10172 (type 08, seq 001457, ts 2261103560, len 000160)
Got  RTP packet from    Local_net_public_ip:10022 (type 08, seq 000001, ts 2261103721, len 000160)
Sent RTP packet to      Local_net_public_ip:10172 (type 08, seq 001458, ts 2261103720, len 000160)
Got  RTP packet from    Local_net_public_ip:10022 (type 08, seq 000002, ts 2261103881, len 000160)
Sent RTP packet to      Local_net_public_ip:10172 (type 08, seq 001459, ts 2261103880, len 000160)
Got  RTP packet from    Local_net_public_ip:10022 (type 08, seq 000003, ts 2261106121, len 000160)
Sent RTP packet to      Local_net_public_ip:10172 (type 08, seq 001460, ts 2261106120, len 000160)
Got  RTP packet from    Local_net_public_ip:10022 (type 08, seq 000004, ts 2261106281, len 000160)
Sent RTP packet to      Local_net_public_ip:10172 (type 08, seq 001461, ts 2261106280, len 000160)
Got  RTP packet from    Local_net_public_ip:10022 (type 08, seq 000005, ts 2261106441, len 000160)
Sent RTP packet to      Local_net_public_ip:10172 (type 08, seq 001462, ts 2261106440, len 000160)
Got  RTP packet from    Local_net_public_ip:10172 (type 08, seq 000000, ts 2622573185, len 000160)
Sent RTP packet to      Local_net_public_ip:10022 (type 08, seq 016688, ts 2622573184, len 000160)
Got  RTP packet from    Local_net_public_ip:10172 (type 08, seq 000001, ts 2622573345, len 000160)
Sent RTP packet to      Local_net_public_ip:10022 (type 08, seq 016689, ts 2622573344, len 000160)
Got  RTP packet from    Local_net_public_ip:10172 (type 08, seq 000002, ts 2622573505, len 000160)
Sent RTP packet to      Local_net_public_ip:10022 (type 08, seq 016690, ts 2622573504, len 000160)
Got  RTP packet from    Local_net_public_ip:10172 (type 08, seq 000003, ts 2622573665, len 000160)
Sent RTP packet to      Local_net_public_ip:10022 (type 08, seq 016691, ts 2622573664, len 000160)

Incoming call with audio

Got  RTP packet from    Local_net_public_ip:10176 (type 08, seq 000000, ts 1804219260, len 000160)
Sent RTP P2P packet to 41.193.38.17:53502 (type 08, len 000160)
Got  RTP packet from    Local_net_public_ip:10176 (type 08, seq 000001, ts 1804219420, len 000160)
Sent RTP P2P packet to 41.193.38.17:53502 (type 08, len 000160)
Got  RTP packet from    Local_net_public_ip:10176 (type 08, seq 000002, ts 1804221580, len 000160)
Sent RTP P2P packet to 41.193.38.17:53502 (type 08, len 000160)
Got  RTP packet from    Local_net_public_ip:10176 (type 08, seq 000003, ts 1804221740, len 000160)
Sent RTP P2P packet to 41.193.38.17:53502 (type 08, len 000160)
Got  RTP packet from    Local_net_public_ip:10176 (type 08, seq 000004, ts 1804221900, len 000160)
Sent RTP P2P packet to 41.193.38.17:53502 (type 08, len 000160)
Got  RTP packet from    Local_net_public_ip:10176 (type 08, seq 000005, ts 1804222060, len 000160)
Sent RTP P2P packet to 41.193.38.17:53502 (type 08, len 000160)
Got  RTP packet from    Local_net_public_ip:10176 (type 08, seq 000006, ts 1804222220, len 000160)
Sent RTP P2P packet to 41.193.38.17:53502 (type 08, len 000160)
Got  RTP packet from    Local_net_public_ip:10176 (type 08, seq 000007, ts 1804222380, len 000160)
Sent RTP P2P packet to 41.193.38.17:53502 (type 08, len 000160)
Got  RTP packet from    41.193.38.17:53502 (type 08, seq 053074, ts 1252963048, len 000160)
Sent RTP P2P packet to Local_net_public_ip:10176 (type 08, len 000160)

The call doesn’t seem to be internal to your private network, If it should be, your local networks setting is wrong.

What is the significance of the difference between Local_net_public_ip and Azure Public IP?

Here are the pjsip messages: PJSIP messages - Pastebin.com

I dont see anything wrong. Is there something else I can check?

The first call is an internal call within the private network with no audio, 111 phoning 114.

The second call is from external number calling 111 with the audio working.

I shared the internal IP address of my Asterisk PBX hosted on Azure because I’m not sure if that could be causing the issue. Interestingly, both my private network and the Azure network have the same 10.0.0.0/24 range, even though they communicate over public IPs (local_net_public_ip and Azure_public_IP). Could this be a potential cause of the audio problem during internal calls? I’d appreciate any insights.

What does this mean/represent?

The local network (Private network) public IP address XXX.134.199.115.

Local to WHERE? Local to the phones? Local to Asterisk?

Local to the phones.

And what is “41.193.38.17”?

The IP address belong to the sip provider. The incoming call was coming from an external number to 111. The call had audio.

From the perspective of Asterisk I don’t see anything, then. We are receiving audio and forwarding it to IP address and port.

I have set up another extension (116) at my home. When I call an extension on the private network using my phone, the call goes through and we have audio.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.