A codec (short for coder-decoder) is the method a phone or app uses to turn the sound of your voice into digital data for the network, and to turn the data it receives back into sound. On a VoIP call, the codec decides how much bandwidth the call uses, how natural voices sound and how well the call copes with network trouble, and both ends must agree on one before the call can connect.
Most business users never pick a codec. The phone system, the provider and the devices negotiate it on every call. Codecs still matter when you size a connection, connect a fax machine or alarm panel, or chase a quality problem that only shows up on some calls.
How a codec works on a VoIP call
A microphone produces a continuous analog signal. The codec samples it many times a second, turns each sample into numbers and, in most codecs, compresses those numbers. The phone then packs a slice of audio, commonly 20 milliseconds, into each packet and sends it across the network, usually as an RTP stream. At the far end the codec rebuilds the sound.
When a call is set up over SIP, each side lists the codecs it supports in order of preference, and the two sides settle on one they share. If they share none, the call fails, often with a SIP response such as 488 Not Acceptable Here. That negotiation happens on desk phones, softphones, SIP trunks and the provider's network alike. Our page on VoIP covers the rest of how a call travels.
The common VoIP codecs
| Codec | Audio range | Payload bit rate | Where you see it | Notes |
|---|---|---|---|---|
| G.711 (μ-law in North America and Japan, A-law elsewhere) | Narrowband, like a traditional phone line | 64 kbps | Almost every phone, trunk and carrier interconnect | No compression, so little processing and the widest compatibility |
| G.729 | Narrowband | 8 kbps | Links where bandwidth is tight, older systems | Compressed; slightly lower quality and poor for fax or modem tones |
| G.722 | Wideband (HD voice) | 64 kbps | Many desk phones and hosted platforms | Clearer voices at about the same bandwidth as G.711 |
| Opus | Narrowband up to fullband | Adaptive, from 6 kbps upward | Softphones, browsers (WebRTC), meeting apps | Adjusts to network conditions and hides some packet loss |
| AMR-WB (G.722.2) | Wideband | Variable, low | Mobile networks' HD voice | Mostly seen inside mobile carriers' networks |
G.711 is the same coding the digital telephone network has used for decades, which is why calls that leave a VoIP system for an ordinary phone number commonly end up in G.711 at the handoff. Opus is defined in IETF RFC 6716 and is required for WebRTC, so browser-based calling and many apps use it by default.
Narrowband vs wideband (HD voice)
A traditional phone line carries a narrow slice of the frequencies in a human voice, roughly 300 to 3,400 Hz. That is enough to understand words, but sounds such as "s" and "f" blur together, which is why spelling a name over the phone needs "S as in Sam". Wideband codecs such as G.722 carry roughly 50 to 7,000 Hz, and voices sound noticeably closer to being in the room.
The catch is that HD voice only works when both ends and everything between them support a wideband codec. Calls between two phones on the same hosted system often get it. Calls that cross to another carrier or the public phone network often drop to narrowband at the handoff, whatever the phones support. A provider claiming HD voice usually means it is available inside its own platform; check what happens on outside calls.
How much bandwidth a call really uses
The payload rate is only part of the story. Every packet also carries IP, UDP and RTP headers, about 40 bytes in total, and at 50 packets a second those headers add about 16 kbps in each direction regardless of codec. Ethernet framing, VPN tunnels and encryption add more on top.
| Codec at 20 ms packets | Payload | Rough total per call, each direction |
|---|---|---|
| G.711 | 64 kbps | About 80 to 90 kbps |
| G.722 | 64 kbps | About 80 to 90 kbps |
| G.729 | 8 kbps | About 25 to 40 kbps |
| Opus | Varies with the app's settings | Depends on the bit rate chosen; ask the provider |
These are planning estimates, since the exact figure depends on the packet size, the link type and any tunnel the calls pass through. The practical point stays the same: even uncompressed calls are small next to a business internet connection. Calls usually suffer because other traffic fills the link and the voice packets wait behind it, which is what QoS addresses. Our guide to QoS for VoIP covers the setup.
Codecs and call quality
No codec repairs a congested or lossy network. The choice of codec does change how those problems sound to the people on the call.
- Packet loss. Each lost packet removes a slice of audio. Highly compressed codecs pack more speech into each byte, so a lost packet can do more damage. Opus has built-in loss concealment and optional forward error correction, which help on Wi-Fi and home connections.
- Jitter. Packets arriving unevenly are held in a jitter buffer before playback. Jitter comes from the network, and a larger buffer smooths it at the cost of added delay.
- Latency. Compressed codecs add a few milliseconds of processing, which is small next to network delay on most calls.
- Transcoding. When the two ends do not share a codec, a gateway or session border controller converts between them. Each conversion adds a little delay and loses a little quality, and converting between two compressed codecs is worst. Keeping one codec end to end, where possible, avoids it.
What latency, jitter and loss are, and what voice can tolerate, is explained in latency, jitter and packet loss, explained.
Fax, alarm panels and T.38
Fax machines, alarm panels and card terminals talk in tones designed for analog phone lines. Compressed codecs such as G.729 are built for speech and distort those tones badly. G.711 carries them better, an approach called passthrough, but a single lost packet or a burst of jitter can still break a fax page.
T.38 is an ITU standard for fax over IP. Instead of sending the fax tones as audio, the gateway on each side demodulates the fax into data, sends it with redundancy and rebuilds the tones at the other end. It is more tolerant of network problems, but the device, the phone system and the provider all need to support it. Analog devices usually connect through an analog telephone adapter, which is where these settings live. Alarm panels are a separate question for the alarm company, since many will not support a panel on an ordinary VoIP line.
How to check which codec a call used
- Many IP desk phones show the active codec on a call status or call info screen while a call is in progress.
- Hosted phone portals often list the codec, along with jitter and loss figures, in per-call quality records.
- A packet capture of the call shows the codec offered and accepted in the SIP messages and in the RTP stream's payload type.
- Your provider's support team can usually look up the codec for a specific call if you give them the time and the numbers.
If quality problems only affect some calls, compare the codecs on good and bad calls first. Our guide to VoIP call quality troubleshooting walks through the rest of the diagnosis.
What to ask a phone provider about codecs
- Which codecs do your phones, apps and trunks support, and in what order of preference?
- Do you support wideband audio, and does it work on calls to outside numbers or only on calls inside the platform?
- How much bandwidth per call should we plan for, including overhead?
- Do you transcode calls anywhere in your network, and when?
- Do you support T.38 for fax, and which adapters do you certify for it?
- Can we see the codec and quality figures for individual calls in the portal?
How FiberX helps
When FiberX quotes hosted phones or UCaaS and SIP trunking, we ask each provider about codec support, HD voice on outside calls and fax handling, and size the internet connection for the calls you expect to carry. We get quotes from several carriers, and the carrier pays us, so there is no markup. Request a quote, or call or text 478-758-8091.