Your next contact center starts here.40 free tools
Telephony

What Is a Voice Codec (G.711, G.729, Opus)?

A voice codec encodes speech for digital calls. Compare G.711, G.729 and Opus, see how codec choice changes bandwidth and learn what to test.

The short answer

A voice codec is the method a phone system uses to turn speech into digital data and back. It sets the bit rate, the audio bandwidth and how well speech survives packet loss. Common contact-center codecs are G.711 at 64 kbit/s, G.729 at 8 kbit/s and Opus. Both ends must agree on a codec, or a transcoder must convert between them.

Common codecs compared

The codec rate is only the speech payload. Network headers add more, as the next section shows.

Codecs often seen on contact-center calls
CodecDefined inRateNotes
G.711 (PCMU, PCMA)ITU-T G.71164 kbit/s8 bits per sample at 8,000 samples per second; mu-law or A-law
G.729ITU-T G.7298 kbit/s10 ms frames; default RTP packet is 20 ms (two frames)
OpusIETF RFC 67166 to 510 kbit/sVariable rate; required in WebRTC with G.711

How does the codec change bandwidth?

This is the method used by the ContactCenter.me VoIP bandwidth calculator. Packets per second = 1000 ÷ packet interval in ms. Payload bytes = codec rate × packet interval ÷ 8. Each packet adds 40 bytes of IPv4, UDP and RTP headers, plus link-layer bytes. Bandwidth per call = packet size × 8 × packets per second, in each direction.

Worked example with 20 ms packets: G.711 payload = 64,000 × 0.020 ÷ 8 = 160 bytes. With 40 header bytes and 18 Ethernet bytes, the packet is 218 bytes, so 218 × 8 × 50 = 87,200 bit/s, about 87.2 kbps. G.729 payload is 20 bytes, so (20 + 58) × 8 × 50 = 31,200 bit/s, about 31.2 kbps. For 20 concurrent calls that is 1.74 Mbps versus 0.62 Mbps per direction.

Trade-offs to weigh

Lower bandwidth is not free.

  • Compressed codecs can distort DTMF tones and may hurt speech recognition used by analytics or AI agents.
  • Every transcoding step adds delay and can reduce quality.
  • Wideband codecs such as Opus can sound clearer, but only if every leg keeps the wideband audio.
  • Header overhead matters most for low-rate codecs.

How to choose

Match the codec on every leg where you can, to avoid transcoding. Check what your carrier, platform and agent softphones each support. RFC 3551 lists the standard RTP payload types, such as 0 for PCMU and 18 for G.729. Then confirm the negotiated codec in real call traces, not only the configured list.

Questions about Codec

Which codec gives the best call quality?

No codec is best everywhere. G.711 is uncompressed narrowband audio and is widely supported. Opus can carry wideband speech and adapts its rate. Quality also depends on transcoding, packet loss and jitter, so test the full call path with your carriers.

Why is my VoIP bandwidth higher than the codec rate?

Each packet carries IP, UDP and RTP headers plus link-layer framing. With 20 ms packets that is 50 packets per second. For G.729 the headers are larger than the 20-byte voice payload, so the per-call rate is about 31.2 kbps on Ethernet.

What is transcoding?

Transcoding is converting audio from one codec to another, for example from Opus in a browser softphone to G.729 on a carrier trunk. It uses processing power, adds delay and can reduce quality, so it is best kept to one point in the call path.

Sources

Reviewed by the ContactCenter.me editorial team. How we write definitions

Related terms

Related questions

What would you like to solve?

A resource finder grounded in this website’s content. Press Escape to close.

DialerBee product preview

Expanded DialerBee product preview

Published product interface · illustrative demonstration data