<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"></head><body ><div>WTF is a jitterbuffer?</div><div><br></div><div><br></div><div><div style="font-size:9px;color:#575757">Sent from my Verizon Wireless 4G LTE smartphone</div></div><div></div><br><br>-------- Original message --------<br>From: Matthew Jordan <mjordan@digium.com> <br>Date: 01/29/2015 10:41 AM (GMT-05:00) <br>To: Asterisk Users Mailing List - Non-Commercial Discussion <asterisk-users@lists.digium.com> <br>Subject: Re: [asterisk-users] JITTERBUFFER function <br><br>On Thu, Jan 29, 2015 at 4:56 AM, Torbjorn Abrahamsson<br><torbjorn.abrahamsson@gmail.com> wrote:<br>> Hello!<br>><br>><br>><br>> I am going to use the JITTERBUFFER function in a SIP (and local channels)<br>> only setup, but have some questions of how to use it:<br>><br>><br>><br>> 1. Do I need to activate jbenable in sip.conf? Or is it enough to call<br>> the JITTERBUFFER function?<br><br>You only need to use the JITTERBUFFER function.<br><br>The jbenable option will enable a jitter buffer on every channel<br>created for that peer (or, if global, for every peer in the system).<br>Depending on the version of Asterisk, it will also place the jitter<br>buffer on the write side of the channel, which is often not what you<br>want.<br><br>> 2. What is the preferred way to invoke this function? Say I have<br>> channel A which is not in need of buffering, while channel B do need it. If<br>> A calls B and I do Set(JITTERBUFFER(fixed)=default), my guess is that it<br>> will be attached to channel A:s read side. This is not the desired outcome,<br>> as I would like to have it on B:s read side. How should I invoke this to<br>> make the buffer belong to channel B? Maybe using b option to Dial? So that<br>> when a JB-enabled device (B) calls out one just calls JITTERBUFFER from the<br>> normal dialplan flow, and if there is a call to the device (B) one need to<br>> use b option? Sound correct?<br>><br><br>Invocation examples are on the wiki:<br><br>https://wiki.asterisk.org/wiki/display/AST/Asterisk+13+Function_JITTERBUFFER<br><br>The JITTERBUFFER function only affects the channel it is placed on,<br>and not any channel it may be bridged with. That means you have to<br>place it on the correct channel and not expect some magicry inside<br>Asterisk to try and manipulate things for you (which is almost always<br>a bad implementation decision). If you need it on an outbound channel,<br>that means using one of the pre-dial handlers<br>(https://wiki.asterisk.org/wiki/display/AST/Pre-Dial+Handlers) to<br>place the jitter buffer on the outbound channel after its creation.<br><br>Example:<br><br>[default]<br><br>exten => set_up_outbound,1,NoOp()<br> same => n,Set(JITTERBUFFER(adaptive)=default)<br> same => n,Return()<br><br>exten => outbound_dial,1,NoOp()<br> same => n,Dial(PJSIP/Alice,,b(default^set_up_outbound^1))<br> ...<br><br>-- <br>Matthew Jordan<br>Digium, Inc. | Engineering Manager<br>445 Jan Davis Drive NW - Huntsville, AL 35806 - USA<br>Check us out at: http://digium.com & http://asterisk.org<br><br>-- <br>_____________________________________________________________________<br>-- Bandwidth and Colocation Provided by http://www.api-digital.com --<br>New to Asterisk? Join us for a live introductory webinar every Thurs:<br> http://www.asterisk.org/hello<br><br>asterisk-users mailing list<br>To UNSUBSCRIBE or update options visit:<br> http://lists.digium.com/mailman/listinfo/asterisk-users<br></body>