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.
| Codec | Bitrate | Sample rate | Audio quality | CPU cost | Universal support |
|---|---|---|---|---|---|
| G.711 (PCMU/PCMA) | 64 kbps | 8 kHz | Good (toll quality) | Negligible | Yes |
| G.722 | 64 kbps | 16 kHz | Excellent (HD voice) | Low | Most modern endpoints |
| G.729 | 8 kbps | 8 kHz | Acceptable | Moderate | Common but licensed |
| Opus | 6-510 kbps adaptive | 8-48 kHz adaptive | Best in class | Moderate | WebRTC 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.
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.
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.
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.
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.
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.
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.
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.
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.
The decision tree:
Use G.711. Avoiding transcoding preserves quality and reduces processing cost. PSTN endpoints expect G.711.
Use G.722. Same bandwidth as G.711, much better audio. Requires PBX/SBC awareness so PSTN-bound calls fall back to G.711.
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.
Opus. Mandatory in WebRTC. Universal browser support.
Opus. With good bandwidth, Opus at 32-48 kbps produces audio quality indistinguishable from a same-room conversation.
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.
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.
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.
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.
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.