Asterisk Jitterbuffer support for Applications

In a post on asterisk.org, I described how the generic jitterbuffer works in Asterisk 1.4. Because of the way it was designed, it does not work when a call is connected to an Asterisk application such as Voicemail or MeetMe. It will only work when two channels are bridged together. So, it has been extremely useful for people who are terminating SIP calls to the PSTN, for example.

Someone at Astricon asked me about this, and it made me think of a way to enable the use of the jitterbuffer for calls connected to Asterisk applications. It was quite simple to implement, too. I added support for the generic jitterbuffer to the Local channel driver, which provides a channel interface back into the local Asterisk dialplan.

Since this is a new feature, it was only added to trunk, our development tree, which will soon become Asterisk 1.6. However, I have posted an unofficial backport of the patch to Asterisk 1.4.

To use the feature, you simply use the new ‘j’ option in the Dial() string, in addition to the ‘n’ option that already existed for chan_local. For example:


exten => 5551212,1,Dial(Local/1234@somecontext/nj)


[somecontext]
exten => 1234,1,MeetMe(1234)

See the commit of the code here.

Download instructions for Asterisk 1.4:

$ svn co http://svncommunity.digium.com/svn/russell/asterisk-1.4 1.4-backports

There is a file in there called chan_local_jitterbuffer.patch.txt. To apply the patch:

$ cd asterisk-1.4
$ patch -p0 < /path/to/chan_local_jitterbuffer.patch.txt.
$ make
$ sudo make install

Enjoy!

2 thoughts on “Asterisk Jitterbuffer support for Applications

  1. Pingback: Soporte para Jitterbuffer en aplicaciones de Asterisk at Mi Brain-Training Personal

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.