Interop

VoIP Codec Comparison

6 min read  ·  Updated April 2026

G.711 is universal, G.722 doubles audio quality at the same bandwidth, G.729 is the bandwidth-efficient legacy choice, and Opus is the modern best-in-class option. Each has tradeoffs in bandwidth, quality, processing cost, and interop. Choosing the right codec for the deployment matters.

In this guide

1. Overview at a glance

CodecBitrateSample rateAudio qualityCPU costUniversal support
G.711 (PCMU/PCMA)64 kbps8 kHzGood (toll quality)NegligibleYes
G.72264 kbps16 kHzExcellent (HD voice)LowMost modern endpoints
G.7298 kbps8 kHzAcceptableModerateCommon but licensed
Opus6-510 kbps adaptive8-48 kHz adaptiveBest in classModerateWebRTC mandatory, growing in SIP

The choice between them is rarely about “best codec” in isolation. It is about constraints — bandwidth, processing budget, interop requirements, licensing, and quality target. Each codec has scenarios where it is the right answer.

2. G.711 — the baseline

G.711 is the codec of the legacy telephone network. It samples audio at 8 kHz, encodes each sample with 8 bits using a logarithmic compression curve (PCMU in North America, PCMA elsewhere), and produces 64 kbps. No further compression.

Pros

Cons

When to use it

Default for any deployment where bandwidth is not a concern and interop is the priority. PSTN bridges almost always use G.711 to avoid transcoding. SIP trunks usually default to it.

3. G.722 — wideband over the same bandwidth

G.722 doubles the audio bandwidth (sample rate 16 kHz, frequency response up to 7 kHz) while staying at 64 kbps total. It uses ADPCM (adaptive differential pulse code modulation) to compress wideband audio into the same payload size as G.711.

Pros

Cons

When to use it

Internal calls between IP endpoints where both sides support it and PSTN bridging is not involved. Modern PBXes often default to G.722 internally and switch to G.711 at PSTN boundaries.

4. G.729 — low bandwidth at the cost of quality

G.729 compresses 8 kHz audio to 8 kbps using CS-ACELP (conjugate structure algebraic code-excited linear prediction). The compression is lossy and significantly reduces audio quality compared to G.711, but cuts payload bandwidth to one-eighth.

Pros

Cons

When to use it

Bandwidth-constrained deployments — remote sites with limited WAN, high-density trunks where each saved kbps matters. Legacy interop with systems that prefer or require G.729. Increasingly being replaced by Opus for bandwidth efficiency in modern deployments.

5. Opus — the modern default

Opus is a modern, royalty-free codec specified in RFC 6716. It uses a hybrid of SILK (for speech) and CELT (for music) and adapts dynamically to bitrate, sample rate, and content type.

Pros

Cons

When to use it

WebRTC, modern UCaaS platforms, browser-based softphones, and any IP-only deployment where both sides support it. Opus's adaptive nature makes it especially good for unpredictable network conditions like mobile or remote work scenarios.

6. Choosing between them

The decision tree:

If the call touches PSTN at any point

Use G.711. Avoiding transcoding preserves quality and reduces processing cost. PSTN endpoints expect G.711.

If both sides are IP-only and support G.722

Use G.722. Same bandwidth as G.711, much better audio. Requires PBX/SBC awareness so PSTN-bound calls fall back to G.711.

If bandwidth is severely constrained

G.729 if both sides require it for legacy reasons; Opus at low bitrate (8-12 kbps) if both sides support it. Opus produces noticeably better quality than G.729 at the same bitrate.

If the call is browser-based or WebRTC

Opus. Mandatory in WebRTC. Universal browser support.

If quality matters more than bandwidth

Opus. With good bandwidth, Opus at 32-48 kbps produces audio quality indistinguishable from a same-room conversation.

Multi-codec offers

Most production deployments offer multiple codecs in priority order (e.g., Opus, G.722, PCMU, G.729). The negotiation picks the best mutually supported option. This handles interop with diverse endpoints automatically.

Frequently asked questions

What is the best VoIP codec?

There is no single best codec — the right choice depends on the deployment. Opus is the highest-quality option for any IP-to-IP scenario where both sides support it, especially over unreliable networks. G.711 is universal and required for PSTN bridging without transcoding. G.722 doubles audio quality at the same bandwidth as G.711 for IP-only calls. G.729 is the legacy low-bandwidth option, increasingly being replaced by Opus.

Why does G.711 use so much bandwidth?

G.711 uses 64 kbps because it does not compress audio — it samples at 8 kHz and uses 8 bits per sample with logarithmic encoding (mu-law for PCMU or A-law for PCMA). The lack of compression means negligible CPU cost and zero quality loss, but every call uses ~80-100 kbps per direction including RTP/UDP/IP overhead. Codecs like G.729 (8 kbps) and Opus (adaptive 6-510 kbps) compress to use less bandwidth at the cost of CPU and some quality.

Should I use Opus or G.729 for low-bandwidth calls?

Opus, if both sides support it. At equivalent low bitrates (8-12 kbps), Opus produces noticeably better audio quality than G.729. Opus also handles packet loss better through built-in forward error correction. G.729 remains relevant only for legacy interop where Opus is not available. For new deployments needing low bandwidth, Opus is the better choice.

Codec issues affecting call quality?

Paste your SIP trace into SIPSymposium. The analyzer identifies the negotiated codecs, audio quality issues by codec, and the impact of codec choice on the call.

Analyze my trace Create free account
Related guides