Getty Images/iStockphoto


VoIP codecs explained: How to optimize VoIP quality

The key to a high-quality VoIP call is the right codec. Explore common codecs, their features and potential drawbacks to choose the right one for VoIP optimization.

Voice over IP lets users make an internet-based phone call instead of a traditional analog phone-to-phone call. As VoIP calls use bandwidth, voice traffic must be encapsulated into packets for transmission over an IP network. The receiving end of the VoIP phone call must convert the digitally encoded voice traffic into analog form.

The process of speech encoding at the sender's endpoint and decoding at the receiver's endpoints in the VoIP call is a function of effective VoIP communication. Most organizations implement VoIP codecs to create a balance between low bandwidth and decent media quality to cut down on the high cost of unified communications.

What are VoIP codecs?

A VoIP codec sets up a pathway for exchanging media between two endpoints through compression and decompression in a format that determines the overall sound quality, compression rate and bandwidth use of the VoIP call. The format must be "agreed upon" by the involved parties for a successful call. Simply put, codec facilitates media transmission in compatible encoded format between two endpoints during a VoIP call.

The VoIP "compressor" converts analog voice signals into digital voice data packets and sends them over the IP network. The VoIP "decompressor" extracts the voice signal from the recipient data packets. In simple words, the function of a VoIP codec is to manipulate a particular voice signal at two endpoints to enhance the transmission and quality of a VoIP call.

A VoIP codec can exist either as a device or software. A proprietary VoIP codec can be a standalone device or hardware for an organization. Free and open source VoIP codecs are available as software or a computer program.

Two or more VoIP devices in an enterprise use the same codec to communicate. When the transmitter and receiver channels in a VoIP call use different codecs that aren't compatible, an intermediary device known as a transcoder bridges the gap between them.

The process of converting call media into a compatible codec for a VoIP device is called transcoding. The number of incompatible devices in a network increases the load on the transcoder. As a result, transcoding is costly and can cause latency in VoIP calls.

The common features of VoIP codecs include the following:

  • The sampling rate of most VoIP codecs is an integral multiple of 8000 Hz. Depending upon the sampling rate, VoIP codecs can be categorized into narrowband, wideband and super wideband codecs.
  • Some wideband codecs offer HD voice quality and sample rate up to 48 kHz.
  • Framing rates are in the order of 5 ms, 10 ms, 20 ms, 30 ms and so on.
  • Configurable packet sizes and bit rates depending on the requirements.
  • Pulse-code modulation, differential pulse-code modulation and code-excited linear prediction for coding and decoding media.

Common VoIP codecs


G.711 is a narrowband audio codec standard for pulse-code modulation over the IP protocol suite. There are two types of G.711 VoIP codecs: -law and -law. North America and Japan use the G711 -law VoIP codec and European countries, along with the rest of the world, use the G.711 -law codec. G.711 is sometimes referred to as the uncompressed codec because it does not use data compression techniques. The drawback of G.711 is a high bandwidth consumption of up to 64 kbps in exchange for HD features. Most VoIP providers support this codec.


G.722 is a licensed codec that offers audio quality over a wide range of compression rates and bandwidths. It operates at a higher bandwidth compared to G.711. The permissible bandwidth for G.722 includes 32 kbps, 48 kbps, 56 kbps and 64 kbps. G.722 has a high sampling frequency of 16,000 Hz for audio conferences, which results in VoIP calls with increased efficiency and audio clarity.


Global System for Mobile communication (GSM) is a popular mobile network in Europe and has its own codec. GSM is a proprietary codec compatible with most VoIP devices. The codec uses a high compression ratio to provide top-notch audio quality. In terms of call quality, GSM offers indistinguishable sound from others at a lesser bandwidth. Typically, the GSM codec can use 64 kbps of bandwidth but typically consumes less bandwidth -- up to 13 kbps or lower -- with negligible degradation in sound quality. The GSM codec is used in VoIP systems where GSM cellular compatibility is applicable.


G.729 requires a license as well as separate hardware for implementation. The G.729 codec can use bandwidth as low as 8 Kbps for a low-quality call. However, a low-quality call isn't always undesirable and G.729's audio call quality at low bandwidth is understandable to humans. G.729 is a suitable narrowband VoIP codec for enterprises handling large numbers of calls per second. The less bandwidth usage decreases the network congestion for decent audio quality.


Opus is a free, open source VoIP codec widely used in mobile applications for audio streaming, voice chat and recordings. Opus operates on a wide range of sampling frequencies from 8 kHz to 48 kHz for narrow, medium and wideband. Opus can consume bandwidths ranging as low as 6 kbps to large bandwidths of 500 kbps. The average bandwidth usage of Opus is about 42 kbps. In addition, Opus offers a variable bit rate that adjusts itself as per the change in network conditions of a VoIP infrastructure.

Other popular VoIP codecs

Codec Sampling rate Bandwidth License
G.723 8 kHz 5.3/6.3 kbps Required
G.726 8 kHz 16/24/32/40 kbps Required
SILK 8/12/16/24 kHz 6 to 40 kbps Required
iLBC 8 kHz 13.33/15.20 kbps Free and open source
Speex 8/16/32 kHz 2.15/44.2 kbps Free and open source

How to choose the right codec for VoIP optimization

Choosing the suitable codec for an enterprise depends on a variety of factors, but cost is often the most important. Opting for a low-cost codec can result in a trade-off in reduced VoIP call quality. Similarly, choosing a higher compression rate for a VoIP trunk requires more computational power, which increases overhead processing costs. In practice, smaller businesses can use free codecs with decent audio quality and low bandwidth consumption.

Efficiency in a VoIP codec means less bandwidth consumption and reasonable sound quality. Enterprises can use open source, proprietary or third-party VoIP codecs to support efficient VoIP infrastructure. Each codec can be chosen based on bandwidth, latency, tolerance and desired output signal quality. The factors critical to choosing a VoIP codec include the following:

1. Compatibility

Choosing a compatible codec is critical to the functioning of VoIP infrastructure. VoIP hardware must support the chosen codec. Some proprietary codecs do not work with every VoIP device. Enterprises tend to buy or rent additional hardware to support the codec.

2. Usability

Some VoIP codecs are free and open source while others require a license. Most enterprise VoIP servers have built-in codecs. Proprietary VoIP codecs require subscribing to a plan with a minimal fee for each device.

3. Sampling frequency

The sampling frequency determines the amount of "important" data in a VoIP call that needs to be sampled and sent over the channel. The unimportant data is unsampled and left out.

4. Bandwidth consumption

VoIP servers supporting many calls per second consume a large amount of bandwidth. It is important to note that VoIP codecs should not consume bandwidth larger than needed to maintain sound quantity.

5. Compression rate

Most VoIP codecs use lossy compression techniques to reduce latency in the network. This lets the codec eliminate unnecessary call data without affecting the sound quality. A high compression rate can improve a VoIP call's quality.

6. Quality of sound

A bit rate determines the amount of information sent and received in one cycle. In simple words, a bit rate translates to the amount of media information encoded from the transmitter's end for sending over the IP network.

7. Latency

Latency is the delay caused in data transmission from one point to another. Transcoding causes latency in a VoIP network. In addition, compressing large amounts of VoIP media at multiple points in the IP network can cause latency.

8. Complexity

Complex algorithms can remove network bottlenecks, such as jitter, packet loss, echo and noise reduction, from the VoIP call to achieve desired quality. Organizations that want higher sound quality and low bandwidth may choose more complex codecs with increased processing capabilities.

9. Pricing

Large enterprises opting for a proprietary VoIP codec pay a higher fee based on the number of calls as well as supporting hardware. A high call volume can risk network congestion and increased maintenance costs.

Venus Kohli is an electronics and telecommunications engineer, having completed her engineering degree from Bharati Vidyapeeth College of Engineering at Mumbai University in 2019. Kohli works as a technical writer for electronics, electrical, networking and various other technological categories.

Next Steps

Using generative AI to improve VoIP communications

What are the benefits of 5G VoIP?

Dig Deeper on VoIP and IP telephony