VoIP

Why Do VoIP Calls Have No Audio? Common Fixes and CLI Troubleshooting

Himanshu Pal

Himanshu Pal

Why Do VoIP Calls Have No Audio? Common Fixes and CLI Troubleshooting

Why Do VoIP Calls Have No Audio? Common Fixes and CLI Troubleshooting

1. Introduction

Voice over IP (VoIP) has changed the way businesses handle calls. Instead of relying on traditional PSTN lines, platforms like Asterisk, FreePBX, 3CX, SIP phones, and softphones use IP networks to deliver flexible and cost-effective communication.

But one of the most frustrating issues VoIP admins face is simple: the call connects, but there’s no audio. SIP signaling works fine, but the actual voice stream never makes it through. This disrupts support centers, remote work setups, and live business operations.

This guide explains why this happens, how audio works in VoIP, and how to troubleshoot the problem using real CLI commands.


2. How Audio Works in VoIP

SIP vs RTP

  • SIP (Session Initiation Protocol) handles call setup, modification, and teardown.

  • RTP (Real-Time Protocol) carries the actual audio or video during the call.

SIP can work perfectly while RTP fails, leading to one-way or no audio.

Common Reasons for Audio Loss

  • NAT Issues – private IPs and public endpoints can’t reach each other

  • Firewall Restrictions – RTP ports blocked or misconfigured

  • Codec Mismatch – endpoints can’t agree on a common audio format

Typical Symptoms

  • One-way audio: only one side can hear

  • No audio: neither side hears anything

Check RTP traffic directly:

sudo tcpdump -i eth0 udp port 10000-20000

3. Diagnosing the Issue

Step 1: Check SIP Registration

asterisk -rvvv
sip show peers
pjsip show endpoints
  • Look for OK status and valid IPs.

  • If the endpoint isn’t registered, audio will never work.


Step 2: Check RTP/Audio Streams

sudo tcpdump -i eth0 udp and portrange 10000-20000 -vv
  • You should see RTP packets flowing in both directions.

  • If not, it’s likely a NAT or firewall problem.


Step 3: Check Firewall Rules

sudo iptables -L -n -v
sudo ufw status verbose
  • Make sure 5060 (SIP) and 10000–20000 (RTP) UDP ports are allowed.


Step 4: Check Codecs

asterisk -rvvv
core show codecs
  • Ensure both endpoints share at least one common codec.


4. Common Causes and Fixes

4.1 NAT Traversal Issues

Problem: Devices behind NAT can’t receive audio from the public side.
Fix: Configure Asterisk for NAT.

; /etc/asterisk/sip.conf
nat=force_rport,comedia
externip=<Your_Public_IP>
localnet=192.168.0.0/255.255.255.0
asterisk -rx "sip reload"

4.2 Firewall Blocking RTP Ports

Problem: RTP packets are blocked.
Fix: Open RTP and SIP ports.

sudo ufw allow 5060/udp
sudo ufw allow 10000:20000/udp
sudo ufw reload

4.3 Codec Mismatch

Problem: Endpoints don’t share a compatible codec.
Fix: Force a common codec like ulaw/alaw.

disallow=all
allow=ulaw
allow=alaw

Reload and retest the call.


4.4 Wrong IP in SIP Headers

Problem: The PBX advertises a private IP in SDP to public endpoints.
Fix: Bind to the correct external address.

; sip.conf
bindaddr=0.0.0.0
externaddr=<Your_Public_IP>
localnet=192.168.1.0/255.255.255.0

4.5 One-Way Audio

Enable RTP debug and watch the flow:

asterisk -rvvv
rtp set debug on

If you see packets in one direction only, check NAT and firewall rules.


4.6 Advanced Network Debugging

sudo tcpdump -i eth0 host <remote_ip> and udp
traceroute <remote_ip>

This helps confirm if packets are getting stuck or misrouted.


5. Testing and Verification

  • Local calls working but remote calls failing usually means NAT/firewall issues.

  • Use Wireshark to inspect RTP streams and verify codec negotiation.

  • Check that audio payload types match your configuration.


6. Best Practices to Prevent Audio Issues

  • Always configure externip and localnet in NAT environments.

  • Open only the necessary SIP and RTP ports.

  • Use matching codecs on all endpoints.

  • Disable SIP ALG on routers whenever possible.

  • Increase verbosity during debugging:

asterisk -rvvv
core set verbose 5
core set debug 5

7. Conclusion

No-audio VoIP issues almost always come down to NAT, firewall, or codec problems. By following a structured approach—checking SIP registration, inspecting RTP flow, verifying network paths, and confirming codec compatibility—you can fix these issues fast.

With proper configuration, VoIP audio becomes stable, reliable, and business-ready.