Choppy audio, delays, and dropped words are almost always caused by one of three underlying network issues. This guide covers diagnosing and addressing each.
The Three Core Culprits
Latency — delay between speaking and being heard; noticeable above roughly 150ms, disruptive to natural conversation above 300ms.
Jitter — inconsistent packet arrival timing, causing choppy or garbled audio even when average latency is acceptable.
Packet Loss — dropped audio packets, causing gaps or robotic-sounding audio artifacts.
Step 1 — Measure Baseline Network Quality
ping -c 100 YOUR_SIP_TRUNK_PROVIDER_IP
Review average latency, and specifically the variation between minimum and maximum times (an indicator of jitter).
Step 2 — Use MTR for a Detailed Path Analysis
mtr YOUR_SIP_TRUNK_PROVIDER_IP
Shows packet loss and latency at each network hop, helping identify whether an issue originates in your own network, your provider's network, or somewhere in between.
Step 3 — Check Asterisk's Own RTP Statistics
asterisk -rx "rtp set debug on"
Provides detailed packet-level statistics during an active call, useful for correlating a reported quality issue with actual measured packet behavior.
Common Cause: Insufficient Bandwidth
See Understanding VoIP Codecs and Bandwidth Requirements — verify your actual available bandwidth comfortably exceeds current concurrent call demand, especially during peak usage periods.
Common Cause: Network Congestion from Other Traffic
Other bandwidth-heavy activity sharing the same network connection (large downloads, backups running during business hours) can starve VoIP traffic of the consistent bandwidth it needs — consider Quality of Service (QoS) prioritization for VoIP traffic.
Implementing QoS to Prioritize VoIP Traffic
See How to Set Up Network Traffic Shaping and QoS on a VPS — prioritizing RTP traffic (voice) over less time-sensitive traffic on the same connection can meaningfully improve call quality during periods of network congestion.
Common Cause: Jitter Buffer Misconfiguration
[general]
jbenable=yes
jbmaxsize=200
Asterisk's jitter buffer smooths out inconsistent packet timing by briefly buffering incoming audio — too small a buffer doesn't adequately smooth jitter; too large introduces noticeable additional latency. Tune based on observed network characteristics.
Common Cause: Wrong Codec for Available Bandwidth
Using G.711 (high bandwidth) on a connection that can't reliably sustain it causes quality issues that a more efficient codec (Opus, G.729) might avoid — see Understanding VoIP Codecs and Bandwidth Requirements.
Common Cause: One-Way or No Audio (NAT-Related)
Often caused by NAT traversal issues rather than genuine network quality problems — verify your Asterisk NAT settings correctly reflect your actual network configuration:
[general]
external_media_address=YOUR_PUBLIC_IP
local_net=192.168.0.0/16
Testing from Different Network Conditions
If quality issues are inconsistent, test calls from different networks/locations to determine whether the problem is specific to one particular network path or genuinely server-side.
Common Errors
Quality is fine internally but poor for external callers — investigate the specific network path to affected external callers; the issue may be entirely outside your own infrastructure's control.
Continue Reading
- Understanding VoIP Codecs and Bandwidth Requirements
- How to Set Up Network Traffic Shaping and QoS on a VPS
- How to Diagnose and Fix High Network Latency
Browse more articles in VoIP & Communication Servers.