A codec (coder-decoder) turns voice into digital data for the network and back into sound at the other end. The codec you choose affects audio quality, bandwidth use, CPU load and compatibility. Three codecs cover most business VoIP: G.711, G.729 and Opus.
G.711 (ulaw and alaw)
- Quality: "toll quality", the same as a traditional phone line.
- Bandwidth: 64 kbps of audio, roughly 80–100 kbps per call with network overhead.
- CPU: very light; no compression.
- Compatibility: supported by virtually every carrier and device. ulaw is used in North America and Japan; alaw in most other countries.
Best for: SIP trunks, office phones and call centers with good bandwidth. It is the safe default.
G.729
- Quality: slightly below G.711, still clear for speech.
- Bandwidth: 8 kbps of audio, roughly 25–40 kbps per call with overhead.
- CPU: heavier, because it compresses audio. Transcoding many calls between G.729 and G.711 uses significant server resources.
- Notes: patents on G.729 have expired, so licensing is no longer a barrier.
Best for: links with limited bandwidth, such as some international connections or small branch offices.
Opus
- Quality: excellent, including wideband (HD) voice, and it adapts its bitrate to network conditions.
- Bandwidth: flexible, from very low rates to high-quality audio.
- Resilience: handles packet loss and jitter better than older codecs.
- Compatibility: standard in WebRTC (browser calling); support among traditional carriers is limited.
Best for: WebRTC agents, apps and internal calls where both ends support it.
Wideband (HD) voice
G.722 is another option for internal calls between desk phones: it gives noticeably clearer "HD" audio at the same bandwidth as G.711. Calls to the public phone network are usually narrowband anyway.
Avoid unnecessary transcoding
When two sides use different codecs, the server must convert (transcode) between them. This uses CPU and can reduce quality. Where possible, use the same codec end to end, for example G.711 from the agent phone through the server to the carrier.
What to choose
- SIP trunks to carriers: G.711 (ulaw or alaw as your carrier expects).
- Call center agents on good connections: G.711.
- WebRTC agents and apps: Opus, with the server handling conversion if the carrier needs G.711.
- Low-bandwidth links: G.729.
Summary
G.711 is the reliable default, G.729 saves bandwidth at the cost of CPU and some quality, and Opus gives the best quality and resilience where it's supported. Keep codecs consistent to avoid transcoding. If audio is poor regardless of codec, check the network: see jitter, latency and packet loss.
Need help with VICIdial, Asterisk or AI voice agents?
SmartAiCalls sets up, secures and supports calling systems for call centers and growing businesses. Talk to us or request a free demo.