Sponsor: VoiceMeUp - Corporate & Wholesale VoIP Services

VoIP Mailing List Archives
Mailing list archives for the VoIP community
 SearchSearch 

[asterisk-users] JITTERBUFFER function


 
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> Asterisk Users
View previous topic :: View next topic  
Author Message
torbjorn.abrahamsson a...
Guest





PostPosted: Thu Jan 29, 2015 5:57 am    Post subject: [asterisk-users] JITTERBUFFER function Reply with quote

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:

<![if !supportLists]>1. <![endif]>Do I need to activate jbenable in sip.conf? Or is it enough to call the JITTERBUFFER function?


<![if !supportLists]>2. <![endif]>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?

BR,
Torbjörn Abrahamsson
Back to top
mjordan at digium.com
Guest





PostPosted: Thu Jan 29, 2015 10:42 am    Post subject: [asterisk-users] JITTERBUFFER function Reply with quote

On Thu, Jan 29, 2015 at 4:56 AM, Torbjorn Abrahamsson
<torbjorn.abrahamsson@gmail.com> wrote:
Quote:
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.

Quote:
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
Back to top
torbjorn.abrahamsson a...
Guest





PostPosted: Thu Jan 29, 2015 2:56 pm    Post subject: [asterisk-users] JITTERBUFFER function Reply with quote

Quote:
Quote:
1. Do I need to activate jbenable in sip.conf? Or is it enough to
call
Quote:
Quote:
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.

Thank you very much. Two questions though: First, you say that if I set
jbenable=yes in sip.conf in the general section, this will add a JB to all
channels. But sip.conf says:

; jbenable = yes ; Enables the use of a jitterbuffer on the
receiving side of a
; SIP channel. Defaults to "no". An enabled
jitterbuffer will
; be used only if the sending side can create
and the receiving
; side can not accept jitter. The SIP channel
can accept jitter,
; thus a jitterbuffer on the receive SIP side
will be used only
; if it is forced and enabled.

; jbforce = no ; Forces the use of a jitterbuffer on the
receive side of a SIP
; channel. Defaults to "no".

I thought this meant that jbenable alone was not enough, and that you needed
to set jbforce=yes. Incorrect then?

Second, if I understand your statement correctly you say that the
jb-settings can be applied on peers as well as in the general context. As
the jb-settings are not a part of the list of peer-settings stated in
sip.conf I thought that it was a general-context-only setting, which is
actually why I am exploring the JITTERBUFFER function. If I can set the
jb-settings directly on the peer, things will be a lot easier. If the
settings are valid for peers, then maybe they should be added to the peer
settings list in sip.conf?

Quote:
Quote:
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
Quote:
Quote:
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,
Quote:
Quote:
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
Quote:
Quote:
when a JB-enabled device (B) calls out one just calls JITTERBUFFER from
the
Quote:
Quote:
normal dialplan flow, and if there is a call to the device (B) one need
to
Quote:
Quote:
use b option? Sound correct?


Invocation examples are on the wiki:


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

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))
...

Perfect, then I guessed correctly. Smile

I actually looked at the JITTERBUFFER wiki page, and found the examples you
mention. But they are only examples of how to start the buffer on the
calling channel. Maybe adding what you just told me here to that page would
make it easier for others to grasp as well?

Anyway, thank you very much. Very appreciated!

Keep up the good work.

BR,
Torbjörn Abrahamsson


--
_____________________________________________________________________
-- 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
Back to top
torbjorn.abrahamsson a...
Guest





PostPosted: Fri Jan 30, 2015 2:59 am    Post subject: [asterisk-users] JITTERBUFFER function Reply with quote

Quote:
I thought this meant that jbenable alone was not enough, and that you
needed to set jbforce=yes. Incorrect then

Answering myself, it seems I was incorrect, as jbenable is enough to
activate the buffers. I see the options different meanings now. Sorry about
the buzz.. Smile

Quote:
Second, if I understand your statement correctly you say that the
jb-settings can be applied on peers as well as in the general context.
As the jb-settings are not a part of the list of peer-settings stated in
sip.conf I thought that it was a general-context-only setting, which
is actually why I am exploring the JITTERBUFFER function. If I can set
the jb-settings directly on the peer, things will be a lot easier. If the
settings are valid for peers, then maybe they should be added to
the peer settings list in sip.conf?

The statement about using jb-settings in peer definitions does however seem
not to be true. I tried adding the settings to a friend definition and it
did not activate a jitter buffer for that friend. I added these settings:

jbenable=yes
jbforce=yes
jbimpl=fixed
jbmaxsize=1000

and when placing a call from the friend, I experienced no delay, which I did
when having activated the settings in the general context. The lack of delay
would indicate no active jitter buffer. Have I missed something?

BR,
Torbjörn Abrahamsson



--
_____________________________________________________________________
-- 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
Back to top
amertel at pipeline.com
Guest





PostPosted: Fri Jan 30, 2015 1:03 pm    Post subject: [asterisk-users] JITTERBUFFER function Reply with quote

WTF is a jitterbuffer?




Sent from my Verizon Wireless 4G LTE smartphone




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

On Thu, Jan 29, 2015 at 4:56 AM, Torbjorn Abrahamsson
<torbjorn.abrahamsson@gmail.com> wrote:
Quote:
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.

Quote:
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
Back to top
kevin.larsen at pionee...
Guest





PostPosted: Fri Jan 30, 2015 1:09 pm    Post subject: [asterisk-users] JITTERBUFFER function Reply with quote

Quote:
WTF is a jitterbuffer?

http://lmgtfy.com/?q=jitterbuffer
Back to top
jnovack at stromberg-c...
Guest





PostPosted: Fri Jan 30, 2015 1:12 pm    Post subject: [asterisk-users] JITTERBUFFER function Reply with quote

Google is your friend!!!

http://searchunifiedcommunications.techtarget.com/definition/jitter-buffer
http://www.voiptroubleshooter.com/problems/jitterbuffer.html
http://www.voip-info.org/wiki/view/Asterisk+new+jitterbuffer
http://www.webopedia.com/TERM/J/jitter_buffer.html


Peg Leg O'Brien

amertel wrote:

Quote:
WTF is a jitterbuffer?




Sent from my Verizon Wireless 4G LTE smartphone



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

On Thu, Jan 29, 2015 at 4:56 AM, Torbjorn Abrahamsson
<torbjorn.abrahamsson@gmail.com> (torbjorn.abrahamsson@gmail.com) wrote:
Quote:
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.

Quote:
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


--
Dog is my Co-Pilot
Back to top
Display posts from previous:   
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> Asterisk Users All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group

VoiceMeUp - Corporate & Wholesale VoIP Services