Glossary · VoIP and call quality
Codec
In one sentence
A codec is the algorithm that digitises and compresses your voice during a VoIP call and turns it back into sound at the other end. It sets both the audio quality and the bandwidth used.
Also known as : codecs · audio codec · audio codecs · voice codec
What is a codec?
Codec is short for coder-decoder. In a VoIP call it turns the microphone signal into digital data, compresses it to a greater or lesser extent, and reverses the process at the other end. Both ends must use the same codec, which they agree at the start of the call.
Every codec strikes a balance between voice quality, bandwidth and how well it copes with lost packets. The frequency range matters too. Traditional telephony carries only 300 to 3,400 Hz, known as narrowband; wideband or “HD voice” codecs go up to 7,000 Hz or beyond, which is why some calls sound as if the other person is in the room.
How it works
When a call is set up over SIP, each device lists the codecs it supports in order of preference, and the first one they share is chosen. The ones you will meet most often:
| Codec | Band | Audio bitrate | Typical use |
|---|---|---|---|
| G.711 (A-law in Europe, μ-law in North America) | narrowband | 64 kbps | Universal baseline, carrier interconnects |
| G.722 | wideband (HD) | 64 kbps | HD voice between compatible handsets |
| G.729 | narrowband | 8 kbps | Low-bandwidth links, slightly lower quality |
| Opus | narrow to fullband | 6–510 kbps | WebRTC, variable networks |
Add IP, UDP and RTP headers on top of those bitrates: a G.711 call uses about 80 to 90 kbps per direction on the wire.
If two devices share no codec, a server has to transcode between them, which costs processing time and a little quality. Heavy compression on a network that drops packets also pulls down the MOS score users perceive.
Example
A Bristol marketing agency notices that its Teams meetings sound better than calls between its own desk phones. The handsets all support G.722 but have been negotiating G.711 because of the default order on the phone system. Moving G.722 to the top of the list on both phone system and handsets gives HD voice for internal calls at no extra bandwidth. Calls out to customers stay in G.711, which is what the public network uses.
Codecs at Universal Telecom
Our SIP trunk and virtual PBX support the standard business telephony codecs, including G.711 and G.722. When you migrate, we check your PBX’s codec settings with you to avoid needless transcoding.
Frequently asked questions
Which codec gives the best call quality?
Wideband codecs such as G.722 or Opus sound noticeably clearer than narrowband G.711, at similar or lower bandwidth. But calls to ordinary phones usually end up in G.711, because that is what the public network expects.
How much bandwidth does a G.711 call use?
The audio is 64 kbps, but packet headers push it to roughly 80 to 90 kbps in each direction on the network. G.729 brings that down to around 30 kbps at some cost in quality.
Related terms
- VoIP
VoIP (voice over internet protocol) carries phone calls as packets of data over an IP network, such as the internet or an office LAN, instead of over the copper lines of the traditional phone network.
- SIP
SIP (Session Initiation Protocol) is the standard signalling protocol that sets up, changes and ends VoIP calls. It handles ringing, answering and hanging up; the voice itself travels separately.
- MOS (mean opinion score)
MOS (mean opinion score) rates perceived call quality on a scale of 1 to 5. In VoIP it is estimated from latency, jitter, packet loss and the codec in use, without anyone listening.
- Latency
Latency is the time your voice takes to travel from your mouth to the other person's ear. In VoIP, once one-way delay passes about 150 ms, conversations start to feel stilted.
- SIP trunk
A SIP trunk is a voice-over-IP connection between a business phone system and a carrier. It replaces ISDN lines and carries calls and numbers over your internet connection.
- WebRTC
WebRTC is an open standard built into web browsers that lets people make voice and video calls from a web page with no plug-in or app to install, with encryption always switched on.
Updated on