Asterisk 1.4 not only adds features to your PBX, it also adds enhanced voice quality for VoIP. The new and improved jitterbuffer implementation covers all RTP-based VoIP channels. Previoiusly, only the IAX2 channel driver had a jitter buffer implementation.

Jitter – variations in transmission time between the media packets

Jitter is something that happens on a IP connection. The sender of packet data sends out with regular intervals and nice pacing between the packets. During the transmission, packets are sent intermixed with other kinds of data – web page downloads, YouTube videos and maybe even FaceBook updates. On the receiving side, there can be variation in the delays between packets, they might even arrive out of order. This is perfectly all right, according to the rules of an IP network. But it does affect the experience of an IP telephony conversation.

Adding a jitter buffer to sort out the mess

Enter the Jitter buffer. The jitter buffer adds a small amount of delay and uses this to reorder packets and feed the application packets in a timely well-paced fashion. Normally the delay is so small, so no-one notices and the quality of the call ends up much higher than without this delay caused by the jitter buffer manager.

As you understand, the jitter buffer is on the receiving end of the IP session. It’s implemented in all VoIP phones, as well as in most gateways to the PSTN. And now, also in Asterisk.

Automatic activation when enabled

Asterisk activateses the jitter buffer when you leave VoIP and connect the call to another channel driver that requires a clean channel without jitter. On calls from SIP to Zaptel, the zaptel driver initiates the jitter buffer and enhances the audio stream going out on the PSTN connection – ISDN PRI or analogue phone line (FXS/FXO). You can also force the jitter buffer if you need to, but avoid doing it in the middle of a VoIP call path. If you do force it, you will end up with two jitter buffer handlers in one voice path, adding too much latency. Like candy, too much of the good stuff ends up being bad.

In Asterisk 1.4, the IAX2 channel driver still uses the old adaptive jitter buffer. The MISDN driver seems to have it’s own implementation. All RTP-based channels support the new fixed jitter buffer. To make configuration simple, all you normally have to do is enable the jitter buffer in zapata.conf (“jbenable=yes”). It’s disabled by default. When you have it enabled, Asterisk activates jitter buffer handling on the channels that need it, so there’s no harm with enabling it.