VOIPNOX

Audio

G.711, G.729 and Opus: which codec, and why it matters

  1. Home
  2. Blog
  3. Codecs

Codec choice is one of those settings that gets picked once during installation and never revisited, which is a shame — it is also one of the few settings where the wrong answer is audible on every single call.

What a codec does

Your voice arrives at the microphone as a continuous waveform. A codec turns it into a stream of packets small enough to send, and turns it back at the far end. Everything else is a trade between how small those packets are and how much of the original survives.

G.711 — the one to use on a UK trunk

G.711 barely compresses at all. It uses about 64 kbps of payload, roughly 87 to 100 kbps once network headers are counted, and it is what the traditional telephone network itself has always carried.

Because it is uncompressed, it costs almost no processing power and it survives being passed between networks without further loss. On a modern connection the bandwidth is trivial. If you are terminating in the UK, this is the answer.

G.729 — small, and it shows

G.729 gets a call down to about 8 kbps of payload, roughly a third of the total once overheads are counted. That was transformative when trunks were expensive, and it is why so much older equipment defaults to it.

The cost is quality. Speech is intelligible but noticeably thinner, background noise turns to mush, and music on hold sounds poor. It also costs real processing power on the PBX, which is why a server that handled sixty G.711 calls may struggle with the same number on G.729.

Compressing twice is what actually ruins a callA call encoded as G.729, decoded, then re-encoded somewhere else in the path loses quality at every hop. This is what people usually mean when they say a route sounds bad — the codec on your handset was fine; it was what happened to the audio in the middle.

Opus — the modern one

Opus adapts to the connection, from a few kbps up to full wideband audio that sounds better than a traditional phone call. It handles packet loss more gracefully than either of the others, which makes it a strong choice for remote workers on unpredictable connections.

The catch is reach. Opus is excellent between endpoints that both support it — softphones, apps, WebRTC — but a call leaving for the public telephone network gets converted to G.711 anyway. Use it inside your own estate, and let it convert at the edge.

How to choose

  • UK calls over a normal broadband connection: G.711, and stop thinking about it.
  • Internal calls between softphones or apps: Opus, for the better audio and its resilience to loss.
  • Genuinely constrained links — a remote site on a poor connection, or a heavily contended mobile data path: G.729 is a reasonable trade, accepted knowingly.
  • Anything recorded for compliance: G.711, so the recording is not a compressed copy of a compressed copy.

Check what is really being negotiated

Your handset offers a list, your PBX offers a list, and your provider offers a list. What you get is whatever appears first in the overlap, which is often not what anyone intended.

Look at the SDP in a real call rather than at the configuration screen. It is common to find a platform configured for G.711 quietly settling on G.729 because a device further down the chain put it first.

Our UK routes carry G.711 end to end, so nothing is recompressed in the middle.

See our voice routes

Keep reading

More from the blog

Two agents wearing headsets at a call centre desk

How many SIP channels do you actually need?

Channels are concurrent calls, not staff. How to size a SIP trunk from your own call data, what happens when you run out, and why buying per-head wastes money.

Read article

Calls not sounding right?

Tell us what you hear and on which route, and we will look at what your platform is actually negotiating.

Chat on WhatsApp