The Role of Codecs in Voice Transmissions

Author: Nancy Wilson

We have been hearing this term, very often in our Apayaa application system calling. Manytimes, we get this error,

SIP error: 488 Not Acceptable Here

We use to get stumped when this error occurs!!

Did you check what codecs allowed?

will be the question as an answer, mostly.

What exactly is a "Codec"

Codec usually refers to a computer or a system that does coding and decoding signals.

Now that is also used to refer

  • Coding / Decoding
  • Compression / Decompression
  • Compressor / Decompressor
What is it used for

The codecs have a main role in VOIP for voice transmission.

Human voice is nothing but a series of frequencies. When you inspect your speech, it will look like a wave like this,

We cannot transmit analog signals through a series of servers as such. We convert them into digital signals.

The digital signals are now ready to be transmitted. There are devices "Analog-to-Digital-Converters (ADC)" which does the function of analog to digital conversion.

The media codecs are a set of voice-compression algorithms (or mathematical model methods) that does the compression of digital signals, easy for transmission through many servers, also for streaming.

The level of compression decides the balance between efficiency and quality.

There are hundreds of codecs available today for audio and video. They have been further classified as narrow band and wideband codecs.

The most commonly used codecs are:

Audio:
  • G.711 a-law / u-law
  • G.726
  • G.729
  • GSM
  • iLBC
  • Speex
  • Silk
  • AMR and many more
Video:
  • FF MPEG
  • H 263 / 264
  • VP 8 and many more

The amount of compression decides the quality of the call.

The G.711 is nearly equal to real voice (as it takes 64 Kbps bandwidth for transmission per channel – as we know there are two channels for every call – one is caller and other is callee) G.711 is sometimes called the un-compressed codec. This is the base codec and used by PSTN telephones for voice transmission.

In G.711, your digitized voice data is divided into 8000 samples per second.Each sample is then encoded into 8 bits of memory.Simple Math:=> 8 bits X 8000 samples = 64000 bits per second (64 Kbps)

Here is the comparison of bandwidth used by different codecs.

  • Based on your Telco provider requirements, you can decide the codec to allow in your system considering your bandwdith requirements.
  • Every Telco provider supports the widely used codecs.
  • When your codec used for audio compression is not supported by the other end (or Telco provider), you will get this SIP:488 Unacceptable media error.

Codecs have been seen many advancements in recent years. We have many wide band codecs today. The wide band codec will give you a High Definition Voice quality. Eg. G.722 This doubles the usual frequency range of base audio codec. So you will get extreme audio quality. The recent codecs are designed to adapt the bandwidth fluctuations automatically, so that they reduce the compression if the bandwidth is good. They do high compression preserving quality to transmit even under low bandwidth conditions.