SIP Phone Echo on Calls: Find the Source and Fix It
SIP phone echo on calls is fixed by locating the leg that creates it: if the far end hears themselves, the echo comes from your side (phone, headset or gateway hybrid); if you hear yourself, it comes from theirs.
- The person who hears their own voice is never the source; the echo is created on the opposite side of the call.
- Asterisk cannot cancel echo on IP-to-IP RTP-bridged calls, so PJSIP and chan_sip need the fix at the phone, headset or gateway.
- Echo below about 25 ms round trip is masked as sidetone, but delay past about 50 ms makes existing echo clearly audible.
- Line echo on FXO, FXS, ATA and PRI gateways is fixed with a G.168 canceller, correct impedance and region, sensible tail length and Rx/Tx gain.
- A six-step test sequence (internal call, Echo() test, swap headset, mobile far end, trunk vs internal, different trunk) isolates phone, PBX or carrier.
Where does SIP phone echo on calls start? Ask who hears it
Echo is a delayed copy of someone's own voice returning to them. The copy is created on the far side of whoever hears it, because the signal has to travel out, leak into the return path, and come back.
So if the far end complains that they hear themselves, the leak is on your side: your phone's speaker feeding its microphone, or a hybrid in your analog gateway. If you hear your own voice, the leak is at the far end or on a PSTN hybrid beyond your carrier.
An echo canceller belongs on the side that creates the echo. It subtracts a model of the outgoing audio from what the microphone or line returns. A canceller on the wrong side sees no matching reference and does nothing useful.
Why does the echo only get annoying on VoIP?
Small leaks exist on every phone line. In traditional telephony the loop delay was so short that the copy blended into sidetone, the faint self-hearing in your own handset.
Echo under about 25 ms is masked this way. It becomes annoying past roughly 50 ms, and at 150 ms or more it makes talking difficult. VoIP adds delay at every stage: packetisation (20 ms per frame typically), the jitter buffer, codec lookahead, transcoding, long routes and satellite or mobile hops. ITU-T G.114 recommends a one-way delay under 150 ms.
That is why a faint hybrid or speaker leak that nobody noticed on an old PBX suddenly shows up after migration to SIP. The echo did not get louder; the delay moved it out of the masking window.
Packet loss is not an echo cause. Loss gives choppy or robotic audio, so do not chase the network if the voice is intact but repeated.
How do I isolate SIP phone echo on calls in six test calls?
Run these in order and note who hears the echo each time. Each one removes a layer from the suspect list.
- Call a known-good phone on the same PBX. If the echo is gone, your original phone, headset or room is the suspect. If it remains on both phones, look at the PBX or network.
- Dial an Echo() test extension (see the next section). You hear your own voice delayed by the round trip. A clean, short delay means your path is healthy; a long delay points to transcoding, a jitter buffer or a slow route.
- Swap the headset or handset on the affected phone, then toggle between speakerphone, handset and headset. Echo only on speaker is acoustic.
- Call a mobile phone as the far end. Mobile networks add delay, so existing echo shows up quickly, and mobile handsets have their own canceller, which helps tell you which side leaks.
- Compare an internal extension-to-extension call with a trunk call to the same person. Echo only on trunk calls points to the gateway hybrid or the carrier.
- Place the same call through a different line or trunk. If echo follows the trunk, escalate to the carrier; if it follows the phone, it is the phone.
What does the Asterisk Echo() application do, and can Asterisk cancel echo?
Echo() simply plays every audio frame it receives back to the caller. It is a loopback test, not a fix. It lets you hear the round trip delay of your own path and confirm that audio flows both ways.
For IP-to-IP calls bridged with RTP, Asterisk passes packets without decoding them (especially with direct_media=yes). There is no echo canceller in PJSIP or chan_sip for those calls, so 'enable echo cancellation in Asterisk' is not an option. The fix has to be on the phone, headset or gateway.
Only channels that use DAHDI hardware or a DAHDI-based gateway have a canceller inside the PBX.
; extensions_custom.conf (FreePBX) - echo test extension
[from-internal-custom]
exten => 7777,1,Answer()
same => n,Playback(demo-echotest)
same => n,Echo()
same => n,Playback(demo-echodone)
same => n,Hangup()How do I fix acoustic echo at the phone or headset?
Acoustic echo is speaker audio picked up by the microphone. It is worst on speakerphone, cheap USB or Bluetooth headsets, high volume, hard-walled rooms and when the mic sits close to the speaker.
Raising the volume to compensate for a quiet far end is the classic mistake: the louder speaker leaks more into the mic and overwhelms the phone's canceller.
Work through these checks:
| Check | Why it matters |
|---|---|
| Lower speaker volume, reposition the phone | Less acoustic coupling; hard walls and nearby surfaces add reflections |
| Use handset or headset instead of speaker | Mic is near the mouth and far from the speaker |
| Enable the phone's AEC | Some provisioning templates disable it; check the template, not just the phone menu |
| Disable duplicate suppression | Headset and phone both processing causes clipping and pumping |
| Reduce headset sidetone | Loud sidetone sounds like echo to the wearer |
| Check USB mic gain and AGC | High gain and AGC raise the noise floor and any leak |
| Update firmware | AEC bugs are regularly fixed on Yealink, Polycom, Grandstream and Cisco phones |
| Try VAD/CNG off | Silence suppression can clip word starts and confuse the canceller |
How do I fix line echo on an ATA, FXO/FXS or PRI gateway?
Line echo comes from the 2-wire to 4-wire hybrid on FXO/FXS ports, analog gateways (ATA) and T1/E1 or PRI gateways. A hybrid with an impedance mismatch reflects part of the outgoing signal back.
The usual fixes are: set the correct country impedance and tone region on the ATA, enable the line echo canceller (G.168), and set the tail length to cover the echo path (typically 32 to 128 ms). Then adjust Rx/Tx gain, because hot levels make the reflection louder.
On a DAHDI system, the canceller is configured per channel in chan_dahdi.conf and implemented by a kernel module such as MG2, OSLEC or HPEC.
; /etc/asterisk/chan_dahdi.conf (or dahdi_channels / chan_dahdi_additional.conf in FreePBX)
echocancel=yes
echocancelwhenbridged=yes
echotraining=800
; Gain adjust (small steps, re-test each time)
rxgain=0.0
txgain=0.0
; Apply and check
; dahdi_cfg -vv
; dahdi_toolHow do transcoding and jitter buffers make echo worse?
Every transcode adds encode and decode delay, and tandem codecs such as G.729 to G.711 or Opus to G.722 also distort the signal, which makes cancellers less effective. Check the codecs per leg in the CLI.
Fixed jitter buffers add delay equal to their size. A 100 ms fixed buffer on both ends adds up to 200 ms round trip. Use adaptive buffers and keep the maximum small.
Rule out looped or duplicated audio too: confirm the phone is not sending RTP back to itself, that two registered devices on one extension are not both answering, and that a conference or paging bridge is not mixing both inputs.
# Codecs per leg and any translation
asterisk -rx "core show channels verbose"
asterisk -rx "core show channel PJSIP/101-00000001" # look at ReadFormat / WriteFormat
asterisk -rx "pjsip show channelstats"
asterisk -rx "pjsip show endpoint 101"
# Watch signalling and RTP
asterisk -rx "pjsip set logger on"
asterisk -rx "rtp set debug on"
sngrep -d any port 5060
# Capture for Wireshark (RTP streams, check SSRC and direction)
tcpdump -i any -w /tmp/echo.pcap udp and portrange 10000-20000Symptom to cause decision table and carrier escalation
Use this table once you have the test results. If echo follows the trunk and the phone is clean, send the carrier a precise report.
| Symptom | Likely cause | Fix |
|---|---|---|
| Far end hears themselves, only when you use speaker | Acoustic echo at your phone | Use handset or headset, lower volume, enable AEC |
| Far end hears themselves, only on trunk calls to the PSTN | Hybrid or impedance mismatch on your gateway | Set impedance and region, enable G.168, tune tail and gain |
| You hear yourself, internal calls are fine | Far end or carrier hybrid | Escalate to the carrier with a sample call |
| Echo started after adding transcoding or a new codec | Added delay exposes existing echo | Align allow= order, remove transcoding, shrink jitter buffer |
| Echo only to certain destinations | Mobile or international route with long delay | Test other routes or carrier, raise to carrier |
| Echo appears on a Bluetooth headset only | Extra latency and the headset's own processing | Use wired headset, disable duplicate processing |
| Echo on softphone | Stereo Mix or 'listen to this device' enabled, two softphones running | Disable them in OS sound settings, run one client |
Carrier escalation template
Subject: Echo on outbound calls to <destination>
Trunk/account: <name/ID>
Call time (with time zone): 2026-11-11 14:32:10 UTC
Caller: <number> Called: <number> CDR/Call-ID: <value>
Who hears echo: <far end / our side>
Internal calls and other trunks: clean
Codec negotiated: <e.g. PCMA>
SIP capture attached: yes
Approximate echo delay: <ms from the Echo() test> Common questions
Why do I hear my own voice on VoIP calls?
A delayed copy of your voice is being returned by the far end, either from their speaker leaking into their microphone or from a hybrid on a PSTN leg. Extra delay from transcoding or buffers makes it audible instead of masked. Run the six-step isolation to find which leg is responsible.
Is echo caused by packet loss or jitter?
No. Loss and jitter cause choppy, robotic or dropped audio. Jitter buffers can indirectly worsen echo by adding delay, but the echo itself comes from an acoustic or hybrid leak.
Does a headset fix echo?
Often, because the mic sits near the mouth and away from the speaker. A poor USB or Bluetooth headset can still produce echo through high mic gain, loud sidetone or duplicate processing, so test a different headset.
Should I enable echocancel on SIP trunks?
The chan_dahdi echocancel options only apply to DAHDI channels. For SIP trunks and endpoints in RTP-bridged calls Asterisk does not process the audio, so you must fix the phone, ATA or gateway instead.
What delay makes echo noticeable?
Echo under about 25 ms is masked as sidetone and becomes annoying past roughly 50 ms. Aim for a one-way delay under 150 ms in line with ITU-T G.114.