Howwise RSS
VoIP & Phone Systems8 min read

VoIP Choppy Audio and Bufferbloat: Diagnose and Fix It

Short answer

VoIP choppy audio from bufferbloat happens when bulk traffic fills oversized modem or router buffers, so 20 ms RTP packets wait in line. Prove it with a loaded latency test, then shape to about 90 percent with fq_codel or CAKE.

Key takeaways
  • If calls break up only while an upload, backup or download runs, suspect a saturated queue (bufferbloat) before blaming the codec, the PBX or the ISP.
  • Compare idle and loaded ping: under about 30-50 ms of added latency is good, and over 100-200 ms explains choppy voice.
  • Fix the queue first with SQM (CAKE or fq_codel) shaped to about 85-95 percent of measured real throughput in both directions.
  • DSCP EF marking and a voice tin help only when the queue is in your router, and offloading or FastTrack can silently bypass the shaper.
  • Jitter buffers only treat symptoms, so raise them last and verify with a repeat loaded test and a call during saturation.

Why does bufferbloat cause VoIP choppy audio?

A G.711 call sends one small RTP packet every 20 ms, about 50 per second, and the receiver expects them at an even rhythm. Modems, ONTs and cheap routers sit in front of a slow link with large FIFO buffers. When a bulk TCP flow fills that buffer, every packet behind it, including your voice packets, waits for the whole queue to drain.

TCP keeps growing its sending rate until it sees loss, and a huge buffer delays that loss signal. The queue stays full and added delay can reach hundreds of milliseconds or even seconds. Voice packets then arrive with variable delay (jitter), or so late that the jitter buffer discards them. You hear gaps, clipped words or a robotic, metallic sound from the concealment algorithm.

Upload saturation is the most common culprit. Cable, DSL and many fixed wireless links have far less upstream than downstream, so a cloud backup or video upload fills the uplink buffer in seconds. Downloads can also hurt, because the ISP-side queue fills when the downlink saturates, but you can only manage that indirectly by shaping slightly below the line rate.

How do I tell bufferbloat from other causes and test for it?

Bufferbloat has a clear signature: audio is fine when the link is idle and degrades when something big is running. Start a large upload and place a call at the same time. If the audio breaks up within seconds and recovers shortly after the transfer ends, the queue is the cause.

The Waveform bufferbloat test and the loaded latency figure in the Cloudflare speed test are good first signals. The manual method below is better for VoIP because you can target your carrier or PBX address. Read the result as the difference between idle and loaded latency: under roughly 30-50 ms added is good, and over 100-200 ms is a problem for voice.

SymptomLikely causeQuick check
Breaks up only during uploads or downloadsBufferbloat on the WAN linkLoaded latency jumps by 100 ms or more
Constant loss at any time of dayFaulty line or ISP congestionping or mtr shows loss while idle
Bad only on wireless handsetsWi-Fi interferenceRepeat the call on Ethernet
Robotic voice, low jitter, no lossTranscoding or high PBX CPUCheck top and the codec in use
One-way or no audioNAT, firewall or RTP port issuertp set debug on to see each direction
  1. Ping the target while the link is idle for a baseline, for example ping -c 100 1.1.1.1 or your SIP carrier edge IP. Note the average and the maximum.
  2. On a second machine on the same network, start a saturating upload with iperf3 -c your.server -t 60 -P 4, and later a download with the -R flag.
  3. Run the same ping during each transfer and compare average, maximum and the spread, since each direction can be bloated independently.
  4. Make a test call during the load and note when audio breaks up.
# idle baseline
ping -c 100 1.1.1.1 | tail -2

# loaded: upload (run ping in another terminal)
iperf3 -c iperf.example.net -t 60 -P 4
# loaded: download
iperf3 -c iperf.example.net -t 60 -P 4 -R

# example reading
# idle:   rtt min/avg/max = 11/12/15 ms
# loaded: rtt min/avg/max = 14/310/640 ms   <- bufferbloat
Tip: Always test over Ethernet. Wi-Fi retransmissions create jitter of their own and will muddy the result.

How do I fix it with SQM (fq_codel or CAKE)?

Smart Queue Management moves the queue out of the modem and into your router, where a fair-queueing algorithm (fq_codel or CAKE) keeps delay low. This only works if your shaper is the slowest point on the path. Set the rate to roughly 85-95 percent of the real throughput you measured, in both directions.

Measure throughput with a speed test over Ethernet at a quiet time, not the figure on the contract. Start near 90 percent and raise it in small steps while watching loaded latency.

MistakeEffectFix
Rate set above the real line rateQueue stays in the modemLower to 85-90 percent and retest
Shaping upload onlyDownload load still bloats the ISP sideShape both directions
Hardware or flow offloading onPackets bypass the shaperDisable offloading or FastTrack for shaped traffic
Low-end CPU at gigabit speedsThroughput collapsesLower the rate or use a stronger router
Double NAT or a second buffering deviceHidden queue behind your shaperBridge the ISP modem or shape nearest the WAN
Wrong DSL overhead or ATM settingSmall voice packets under-countedMatch link layer and overhead to the line
  1. OpenWrt: install luci-app-sqm, open Network, SQM QoS, enable your WAN device, set download and upload in kbit/s (for example 90000 and 18000), and choose cake with piece_of_cake.qos.
  2. For DSL on OpenWrt, set link layer adaptation and per-packet overhead to match your encapsulation. PPPoE VDSL commonly needs about 34 to 44 bytes, and ATM-based ADSL needs the ATM option.
  3. pfSense or OPNsense: create limiters or shaper pipes for download and upload at the shaped rates with the FQ_CODEL scheduler, then add rules that send LAN traffic through them.
  4. UniFi: enable Smart Queues under internet settings and enter both rates. It can reduce top throughput on some gateways because it disables hardware offload.
  5. MikroTik: create a queue type using cake (RouterOS 7.1 or later) or fq_codel, apply it on the WAN, and exclude that traffic from FastTrack, or the queue sees only a fraction of packets.
# OpenWrt /etc/config/sqm (equivalent of the LuCI form)
config queue 'wan'
    option enabled '1'
    option interface 'eth1'
    option download '90000'
    option upload '18000'
    option qdisc 'cake'
    option script 'piece_of_cake.qos'
    option linklayer 'ethernet'
    option overhead '44'

# apply and confirm
/etc/init.d/sqm restart
tc -s qdisc show dev eth1
Warning: Enabling SQM briefly restarts the WAN queue and can interrupt active calls. Do it outside business hours, and keep a note of the previous settings so you can roll back.

Does DSCP marking and prioritization help?

Marking RTP as DSCP EF (46) and SIP signaling as CS3 or AF31 lets your router put voice in a high-priority class. With CAKE, use diffserv4 so voice lands in the low-latency tin, or set a strict-priority queue on pfSense, OPNsense or MikroTik.

Prioritization is secondary to fixing the queue. If the standing queue is in the modem or the ISP device, your router cannot reorder those packets, so priority does nothing.

Fair queueing already protects a thin voice flow against bulk TCP flows, so many networks get most of the benefit from SQM alone. Add marking when several calls compete with heavy interactive traffic such as video meetings.

When should I tune jitter buffers, codecs and ptime?

A jitter buffer holds packets briefly and plays them out evenly, trading delay for smoothness. On phones, choose adaptive with a maximum of roughly 60-120 ms. A bigger buffer adds mouth-to-ear delay and cannot fix sustained congestion, only short bursts.

On Asterisk, bridged calls normally do not need a jitter buffer because the endpoints buffer. For chan_sip use jbenable, jbforce, jbmaxsize and jbimpl. With PJSIP, enable it per call with the JITTERBUFFER function, and only on legs where Asterisk decodes audio, such as voicemail, conferencing or transcoding.

Codec choice helps a little. G.711 has only basic loss concealment, while Opus has strong concealment and adapts its bitrate. Keep ptime at 20 ms, since 30 ms adds delay and makes each lost packet more audible.

; sip.conf (chan_sip) example
jbenable=yes
jbforce=no
jbimpl=adaptive
jbmaxsize=120

; extensions.conf (PJSIP): use only on legs Asterisk decodes
exten => s,1,Set(JITTERBUFFER(adaptive)=default)
Warning: Treat jitter buffers as a last resort. They hide symptoms and add delay, while the cause, a standing queue, remains and will hurt other applications too.

How do I verify the fix and what quality numbers should I aim for?

Repeat the same loaded test and a call during saturation, then compare with your earlier numbers. Good targets are jitter under 30 ms, one-way delay under 150 ms, packet loss under 1 percent and a MOS above about 4.0. Users start to complain below 3.6.

Your phone's call statistics page usually shows jitter, loss and round-trip time. On Asterisk with PJSIP, the CLI shows RTCP-based figures per channel, but Asterisk only sees the leg it terminates, so compare it with the phone's own stats.

If bufferbloat is gone but problems persist, run mtr toward your carrier's edge for a few minutes and keep the report. Loss that starts at a given hop is evidence your ISP or carrier can act on.

Test resultLikely fixNext step
Loaded latency +100 ms or more, clean when idleSQM in both directionsShape to about 90 percent, then retest
Latency fine, loss when idleLine or ISP faultCollect mtr data and open a ticket
SQM on but no changeOffload, wrong rate or hidden bufferCheck the mistakes table
Bursts of jitter after SQMSmall jitter buffer increaseAdaptive buffer, 60-120 ms maximum
asterisk -rvvv
*CLI> pjsip show channelstats
*CLI> rtp set debug on
*CLI> rtcp set stats on

# path check toward the carrier
mtr -rwzc 200 sip.carrier.example.net

Common questions

Why do VoIP calls break up when I am downloading?

A saturated downlink fills the buffer at the ISP side, which adds delay and jitter to the incoming voice packets. You cannot control that queue directly, so shape the download rate to about 85-90 percent of the real speed so the queue forms in your router, where fq_codel or CAKE manages it.

Is high ping or high jitter the real problem for robotic voice?

Variable delay (jitter) and loss matter more than a steady high ping. A constant 80 ms is fine for voice, but a delay that swings between 20 and 300 ms causes packets to arrive late and get discarded, which creates the robotic sound.

Does a faster internet plan fix bufferbloat?

Not reliably. A faster plan fills buffers more quickly and can lower the delay, but the oversized buffers remain, so any saturated direction can still cause jitter. SQM or a better modem and router address the actual cause.

Can I use QoS instead of SQM for VoIP?

Plain priority QoS only reorders packets in a queue you control, so it fails if the standing queue is in the modem or the ISP device. SQM caps the rate below the line speed first, which moves the queue into your router, and priority can then add on top.

How big should the CAKE or fq_codel shaping rate be on a gigabit line?

Start around 90 percent of measured throughput, for example 900 Mbps on a 1 Gbps line. Many low-end routers cannot shape that fast on the CPU, so if throughput collapses, lower the rate or use a router with the CPU capacity for it.

Related topics:voipbufferbloatsqmjitterasterisk