4 VoIP Codecs You Can Try If G.711 Isn't Giving You Clear Calls


VoIP codecs have a direct impact on the quality, compression, and bandwidth usage of VoIP calls. The most common is G.711, which is a narrowband codec configured to provide crystal-clear voice communication.

G.711 has its advantages, but it is not always the best. In fact, some other VoIP codecs have advanced features that are better suited for certain situations.

What do VoIP codecs do?

The term codec means compression and decompression, or encoding and decoding.

During a call, voice signals are converted into digital data packets before being transmitted over the Internet. VoIP codecs further compress that data to ensure it reaches the receiver quickly. Their goal is to maintain optimal bandwidth usage without sacrificing audio quality. At the receiving end, the compressed data is decompressed and converted back into voice signals.

VoIP providers support multiple codecs, so the sender and receiver will often have to “negotiate” and decide which is the best codec to use. For communication to work, both the sender and receiver must use the same codec, one that is supported by both devices.

VoIP codecs rely on several important components, including:

  • Sampling frequency: During a call, analog voice data is “sampled” at regular intervals and converted into data packets. Each sample contains a piece of digital audio data. The sample rate is the frequency (in Hz) at which a VoIP codec can measure and collect samples. Higher sample rates produce higher fidelity audio, but require more bandwidth. Lower sample rates require less bandwidth, but capture less detail, resulting in poor call quality.
  • Bandwidth: Measured in bits per second (bps), bandwidth represents the amount of data that can be transmitted over a network channel. While most VoIP bandwidth requirements are low, some codecs require high bandwidth usage, which can result in latency.
  • Bit rate: This is the amount of data captured in one sample. It determines the quality of the audio. Codecs with higher bit rates will produce better sound quality.

Why is G.711 such a popular choice?

People use it because it's a safe bet: it's simple, free, and designed specifically for telephony.

Narrowband codecs, such as G.711, prioritize voice over music, making them suitable for situations where clear, low-latency voice communication is the top priority.

Unlike other codecs, it does not compress voice data. Instead, it uses PCM, or pulse control modulation, which operates at a fixed bit rate of 64 kbps with a sampling rate of 8 kHz. Since voice data has a narrow frequency range of up to 4 kHz, it can accurately capture human voices with minimal distortion.

There are two variants of the G.711 codec: μ-law and A-law. The μ-law variant is used in Japan and North America, while the A-law variant is predominantly used in Europe.

However, this poses a problem. Since G.711 does not compress voice, it uses more data and has a relatively high bandwidth requirement. This can be a problem when there is limited available bandwidth or the telephone network has low capacity. In this case, it is better to use a codec that is optimized for bandwidth.

Four additional VoIP codecs and when to use them

Each codec has its strengths and weaknesses, giving you the option to choose one that suits your needs. Here are four alternative VoIP codecs you can try if G.711 isn't enough.

G.722: Superior audio quality

G.722 is a royalty-free wideband codec that covers a frequency range of 50 Hz to 7 kHz and delivers high-definition audio. Compared to G.711, which only covers up to 4 kHz, this codec captures a wider range of human voice.

Naturally, G.722 requires a lot of bandwidth, as it operates at three different bit rates: 48 kbps, 56 kbps, and 64 kbps. Its sampling rate is 16 kHz, which is twice the sampling rate of G.711. However, both codecs use a similar amount of bandwidth; the main difference is that G.711 is fixed at 64 kbps, while G.722 has a variable bit rate.

G.722 uses a compression technique known as Subband Adaptive Differential Pulse Code Modulation (SB-ADPCM).

With it, audio signals are separated into subbands. Higher frequency signals are compressed separately from lower frequency signals. This helps produce high-quality audio that sounds natural while optimizing the use of available bandwidth.

The main disadvantage of G.722 is compatibility: it does not have wide support among VoIP providers.

However, there are some that support it. When your devices allow it, it is a reliable VoIP codec, ideal for situations that require superior voice quality or when the connection is unstable.

Opus: Low latency in low bandwidth situations

Opus is an ultra-wideband codec with a frequency range of 50 Hz to 20 kHz. Like G.722, it is (more than) capable of transmitting HD voice.

It is also open source and royalty-free, with no recurring licensing fees – anyone can use it at no cost.

Opus supports both wideband and narrowband and has a variable bit rate ranging from as low as 8 kbps to as high as 512 kbps. It can also adjust bandwidth usage to the state of your network, plus a very high sampling rate of up to 48 kHz.

Despite its growing popularity, Opus is not as widely supported as G.711 nor is it as wide-ranging as G.722.

Its main drawback is complexity: it uses advanced compression techniques that require more processing power. However, it still produces better audio than G.711 at low bit rates.

Ultimately, Opus is ideal for situations requiring low latency over a narrow bandwidth. It is also useful when you need to stream music, which operates in a much wider frequency range than human speech, i.e. 20 Hz to 20 kHz.

G.729: Moderate quality in high network traffic scenarios

Unlike Opus, G.729 is a narrowband VoIP codec that operates at a fixed bit rate of just 8 kbps, which is significantly lower than the 64 kbps of G.711 and G.722.

But it has a sampling rate of 8 kHz, which is the same as G.711.

G.729 uses an aggressive compression technique that produces micro-packets of data from analog voice signals. As a result, it only offers moderate audio quality compared to the others.

Its true potential lies in high-traffic, low-bandwidth environments, as it can support a higher volume of simultaneous calls, much like what you might see in a call center. G.729 can also ensure good voice communication in situations where the network is severely constrained.

AMR-WB: To capture more than just voice

AMR-WB stands for Adaptive Multi-Rate Wideband. It is also known as G.722.2, which is a more advanced version of the G.722 codec.

G.722.2 operates in a frequency range of 50 Hz to 7 kHz and can capture high-definition audio. It also has variable bit rates from 6.6 kbps to 23.85 kbps, meaning it can adapt to changing network conditions.

This codec is ideal for both voice and music, which is why it is widely used in mobile phone networks. In contrast, G.711 was intended for use in traditional telephone communications over the PSTN.

G.722.2 is also widely supported, ensuring interoperability between different VoIP devices and systems.

Summary of high-level VoIP codecs

G.711 is a reliable codec for traditional voice communication, but it is not the only option. Other high-quality codecs include:

  • G.722: Superior audio quality and flexibility.
  • Opus: Low latency when dealing with network instability.
  • G.729: Acceptable quality in high traffic environments.
  • AMR-WB: Capture voice and music in HD.
scroll to top