implemeting jitterbuffer
What exactly does jitter buffer do?
It trades a slight bit of latency to compensate for jitter, allowing a sort amount of time for late packets to be added into the stream that would otherwise have been dropped.
Is jitter buffer supported with asterisk 1.2?
IIRC, only in IAX. The SIP jitter buffer was added in 1.4. I haven't googled to verify, so you may want to.
Here is the way to find anything you are looking for in the config files.
All of the Asterisk config files are located in /etc/asterisk
So if you navigate to that directory you can use grep to find what you are looking for:
Here are some examples, hope they help.
[b]CAUTION: This suggestion requires independent thought capability on behalf of the user[b/]
[root@skytrixhome asterisk]#
[root@skytrixhome asterisk]# # first we navigate to the configuration file direcotry with the cd command
[root@skytrixhome asterisk]# cd /etc/asterisk
[root@skytrixhome asterisk]# # verify what directory we are in
[root@skytrixhome asterisk]# pwd
/etc/asterisk
[root@skytrixhome asterisk]# # now we look for the jitter buffer stuff jbenable looks like a good place to start
[root@skytrixhome asterisk]# # the grep command searches a files in the current directory
[root@skytrixhome asterisk]# # for the pattern in the first argument.
[root@skytrixhome asterisk]# grep jbenable *
sip.conf:; jbenable=yes
[root@skytrixhome asterisk]# # ok we saw it is in sip.conf
[root@skytrixhome asterisk]#
# now we take a look in sip.conf with the editor
[root@skytrixhome asterisk]# # nano is the simplest editor, I am going to use VI
[root@skytrixhome asterisk]# vi sip.conf
; enable and force the sip jitterbuffer. If these settings are desired
; they should be set in the sip_general_custom.conf file as this file
; will get overwritten during reloads and upgrades.
;
; jbenable=yes
; jbforce=yes
; #, in this configuration file, is NOT A COMMENT. This is exactly
; how it should be.
#include sip_general_custom.conf
# ok we see by default that the files are commendted our in the sip.conf
[root@skytrixhome asterisk]# # we also know that sip.conf is written by FreePBX when you update
[root@skytrixhome asterisk]# # your configuration so we can't change it here
[root@skytrixhome asterisk]# # All files with custom in them are for user add ons
[root@skytrixhome asterisk]# # We see that sip_general_custom.conf is right below the jitter buffer
[root@skytrixhome asterisk]# # since the order can sometimes be important you should look at
[root@skytrixhome asterisk]# # where the include statements are in the file your are trying to customize
[root@skytrixhome asterisk]# # so now we edit sip_general_custom.conf
[root@skytrixhome asterisk]# # since I am lazy I have already copied the variables from the forum post
[root@skytrixhome asterisk]# # to my clipboard. They can be quickly pasted into the file
[root@skytrixhome asterisk]# vi sip_general_custom.conf
;Enable Jitter Settings
jitterbuffers=4
jbenable=yes
jbforce=no
jbimpl=fixed
;jbimpl=adaptive
jbmaxsize=500
jbresyncthreshold=100
jblog=yes
;tos=0x18
; Jitter Buffer test added by SH 5/18 --
~
~
~
~
# now I have written the changes to the file
[root@skytrixhome asterisk]# # Now we have made our chages so we restart the Asterisk stuff
# At the end it should finish with this: Look for errors:
Asterisk Ready.
Asterisk Started
# now we can have a look at the jitter buffer stats in the Asterisk CLI
# In 1.2 only IAX trunks used the jitter buffer. I am running 1.2
[root@skytrixhome asterisk]# # start asterisk cli
[root@skytrixhome asterisk]# asterisk -r
Asterisk 1.2.26.1 svn rev 79171, Copyright (C) 1999 - 2007 Digium, Inc. and others.
Created by Mark Spencer <markster@digium.com>
Asterisk comes with ABSOLUTELY NO WARRANTY; type 'show warranty' for details.
This is free software, with components licensed under the GNU General Public
License version 2 and other licenses; you are welcome to redistribute it under
certain conditions. Type 'show license' for details.
=========================================================================
Connected to Asterisk 1.2.26.1 svn rev 79171 currently running on skytrixhome (pid = 20360)
Verbosity is at least 1
skytrixhome*CLI> # turn off console logging so we don't clutter ourselves
No such command '#' (type 'help' for help)
skytrixhome*CLI> set verbose 0
Verbosity is now OFF
skytrixhome*CLI> iax2 show netstats
-------- LOCAL --------------------- -------- REMOTE --------------------
Channel RTT Jit Del Lost % Drop OOO Kpkts Jit Del Lost % Drop OOO Kpkts
IAX2/IAX to Halle-5 25 -1 0 -1 -1 0 -1 1 0 40 0 0 0 0 0
1 active IAX channel
skytrixhome*CLI>
skytrixhome*CLI> set verbose 0
Verbosity is now OFF
skytrixhome*CLI> iax2 show netstats
-------- LOCAL --------------------- -------- REMOTE --------------------
Channel RTT Jit Del Lost % Drop OOO Kpkts Jit Del Lost % Drop OOO Kpkts
IAX2/IAX to Halle-5 25 -1 0 -1 -1 0 -1 1 0 40 0 0 0 0 0
1 active IAX channel
skytrixhome*CLI> exit
[root@skytrixhome asterisk]# # so now I have tested that my jitter buffer is working
[root@skytrixhome asterisk]#
This concept works for any config file changes you wish to make in the Asterisk conf files.




Member Since:
2007-03-21