[asterisk-users] JITTERBUFFER function

amertel amertel at pipeline.com
Fri Jan 30 12:02:59 CST 2015


WTF is a jitterbuffer?


Sent from my Verizon Wireless 4G LTE smartphone


-------- Original message --------
From: Matthew Jordan <mjordan at digium.com> 
Date: 01/29/2015  10:41 AM  (GMT-05:00) 
To: Asterisk Users Mailing List - Non-Commercial Discussion <asterisk-users at lists.digium.com> 
Subject: Re: [asterisk-users] JITTERBUFFER function 

On Thu, Jan 29, 2015 at 4:56 AM, Torbjorn Abrahamsson
<torbjorn.abrahamsson at gmail.com> wrote:
> Hello!
>
>
>
> I am going to use the JITTERBUFFER function in a SIP (and local channels)
> only setup, but have some questions of how to use it:
>
>
>
> 1.       Do I need to activate jbenable in sip.conf? Or is it enough to call
> the JITTERBUFFER function?

You only need to use the JITTERBUFFER function.

The jbenable option will enable a jitter buffer on every channel
created for that peer (or, if global, for every peer in the system).
Depending on the version of Asterisk, it will also place the jitter
buffer on the write side of the channel, which is often not what you
want.

> 2.       What is the preferred way to invoke this function? Say I have
> channel A which is not in need of buffering, while channel B do need it. If
> A calls B and I do Set(JITTERBUFFER(fixed)=default), my guess is that it
> will be attached to channel A:s read side. This is not the desired outcome,
> as I would like to have it on B:s read side. How should I invoke this to
> make the buffer belong to channel B? Maybe using b option to Dial? So that
> when a JB-enabled device (B) calls out one just calls JITTERBUFFER from the
> normal dialplan flow, and if there is a call to the device (B) one need to
> use b option? Sound correct?
>

Invocation examples are on the wiki:

https://wiki.asterisk.org/wiki/display/AST/Asterisk+13+Function_JITTERBUFFER

The JITTERBUFFER function only affects the channel it is placed on,
and not any channel it may be bridged with. That means you have to
place it on the correct channel and not expect some magicry inside
Asterisk to try and manipulate things for you (which is almost always
a bad implementation decision). If you need it on an outbound channel,
that means using one of the pre-dial handlers
(https://wiki.asterisk.org/wiki/display/AST/Pre-Dial+Handlers) to
place the jitter buffer on the outbound channel after its creation.

Example:

[default]

exten => set_up_outbound,1,NoOp()
same => n,Set(JITTERBUFFER(adaptive)=default)
same => n,Return()

exten => outbound_dial,1,NoOp()
same => n,Dial(PJSIP/Alice,,b(default^set_up_outbound^1))
...

-- 
Matthew Jordan
Digium, Inc. | Engineering Manager
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
Check us out at: http://digium.com & http://asterisk.org

-- 
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
               http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20150130/2213501e/attachment.html>


More information about the asterisk-users mailing list