carriers-sip
Codec
The method that compresses and decompresses voice audio for a VoIP call, trading off between sound quality and how much network bandwidth each call uses.
A codec is the method that compresses voice on the way out of a call and decompresses it on the way in. The word is short for coder-decoder. Every VoIP call uses one, and the choice you make sets the balance between how clear the audio sounds and how much network bandwidth each call eats.
The compressed audio is what fills each RTP packet, so the codec directly controls call size and quality. Two endpoints must agree on a codec before they can talk, the same way two people need a shared language. If both sides do not support at least one common codec, the call fails to set up even though everything else looks fine.
The two you will meet most
- G.711 codec — barely compressed, excellent quality, but uses the most bandwidth per call.
- G.729 codec — heavily compressed, slightly thinner sound, but lets you fit far more calls on the same connection.
The practical trade-off is simple. If your internet link has plenty of bandwidth, a lighter codec keeps audio crisp. If you are pushing a high number of Concurrent calls through a tight pipe, a compressing codec stretches your capacity further at a small cost to clarity. That clarity is often measured with a score called MOS (mean opinion score), which rates how a human would judge the sound. For most call centers the choice comes down to: do I have bandwidth to spare, or seats to fill?
A couple of things are worth knowing when you set codecs up. First, both sides of a call negotiate which codec to use from a list each end supports, so it is wise to allow at least one common option to avoid calls that fail before they even ring. Second, if the two halves of a call use different codecs, the system has to convert the audio in the middle — a process called transcoding that quietly burns extra processing power and can add a little delay. Keeping the same codec end to end avoids that cost. For a newcomer, a sensible starting point is to list a high-quality codec first and a compressing one as a fallback, then let the negotiation pick whichever both ends share. That way you get the best sound when the network allows it and graceful degradation when it does not.
Related terms
Concurrent calls
The number of separate phone calls running at the same moment on your system, which sets the real ceiling on how busy your call center can get.
G.711 codec
A barely-compressed voice codec that delivers excellent call quality at about 64 kilobits per second, using more bandwidth than compressing codecs.
G.729 codec
A compressing voice codec that shrinks each call to about 8 kilobits per second, fitting many more calls on a connection at a small cost to audio clarity.
MOS (mean opinion score)
MOS, or mean opinion score, is a one-to-five rating of call audio quality, where five is perfect and anything below about three sounds noticeably bad.
RTP
Real-time Transport Protocol, the stream of small packets that carries the actual voice audio of a VoIP call between the two endpoints.
VoIP
Voice over Internet Protocol, the technology that sends phone calls as data packets over the internet instead of over traditional copper phone lines.