]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Merged revisions 249893 via svnmerge from
authorDavid Vossel <dvossel@digium.com>
Tue, 2 Mar 2010 19:20:05 +0000 (19:20 +0000)
committerDavid Vossel <dvossel@digium.com>
Tue, 2 Mar 2010 19:20:05 +0000 (19:20 +0000)
https://origsvn.digium.com/svn/asterisk/trunk

........
  r249893 | dvossel | 2010-03-02 13:08:38 -0600 (Tue, 02 Mar 2010) | 11 lines

  fixes adaptive jitterbuffer configuration

  When configuring the adaptive jitterbuffer, the target_extra
  value not only could not be set from the configuration, but was
  not even being set to its proper default.  This value is required
  in order for the adaptive jitterbuffer to work correctly.  To resolve
  this a config option has been added to expose this value to the conf
  files, and a default value is provided when no config specific value
  is present.
........

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.0@249907 65c4cc65-6c06-0410-ace0-fbb531ad65f3

24 files changed:
channels/chan_alsa.c
channels/chan_console.c
channels/chan_dahdi.c
channels/chan_gtalk.c
channels/chan_h323.c
channels/chan_jingle.c
channels/chan_local.c
channels/chan_mgcp.c
channels/chan_oss.c
channels/chan_sip.c
channels/chan_skinny.c
channels/chan_unistim.c
channels/chan_usbradio.c
channels/misdn_config.c
configs/alsa.conf.sample
configs/chan_dahdi.conf.sample
configs/console.conf.sample
configs/mgcp.conf.sample
configs/misdn.conf.sample
configs/oss.conf.sample
configs/sip.conf.sample
configs/usbradio.conf.sample
include/asterisk/abstract_jb.h
main/abstract_jb.c

index 5a375c5c0aaf03fa50547be35ca537bc538926de..1975df0caf408f5a7c426220c3533b72712f5194 100644 (file)
@@ -62,7 +62,8 @@ static struct ast_jb_conf default_jbconf = {
        .flags = 0,
        .max_size = -1,
        .resync_threshold = -1,
-       .impl = ""
+       .impl = "",
+       .target_extra = -1,
 };
 static struct ast_jb_conf global_jbconf;
 
index 0d2d6360b9604a4b1e01b44fc08ee3fb365e8ee7..935c081edfa2224be955cd5ef77149a72b30205a 100644 (file)
@@ -175,7 +175,8 @@ static struct ast_jb_conf default_jbconf = {
        .flags = 0,
        .max_size = -1,
        .resync_threshold = -1,
-       .impl = ""
+       .impl = "",
+       .target_extra = -1,
 };
 static struct ast_jb_conf global_jbconf;
 
index cecbfa46bfe290614ebde5b613d013710ee83938..94a89954914b1256de6814cf69f29abf7e2ac700 100644 (file)
@@ -120,7 +120,8 @@ static struct ast_jb_conf default_jbconf =
        .flags = 0,
        .max_size = -1,
        .resync_threshold = -1,
-       .impl = ""
+       .impl = "",
+       .target_extra = -1,
 };
 static struct ast_jb_conf global_jbconf;
 
index 884438316f72f3f68ddad464df1ef2b6d1eefc30..0020feba67bbf9cacc71e67f965a7a86d8f11a9d 100644 (file)
@@ -78,7 +78,8 @@ static struct ast_jb_conf default_jbconf =
        .flags = 0,
        .max_size = -1,
        .resync_threshold = -1,
-       .impl = ""
+       .impl = "",
+       .target_extra = -1,
 };
 static struct ast_jb_conf global_jbconf;
 
index c44e0597f90abbc42fce96534f27611406ee0f0a..697b90d306c1aab830a8b86334ddd994f1b62bf1 100644 (file)
@@ -118,7 +118,8 @@ static struct ast_jb_conf default_jbconf =
        .flags = 0,
        .max_size = -1,
        .resync_threshold = -1,
-       .impl = ""
+       .impl = "",
+       .target_extra = -1,
 };
 static struct ast_jb_conf global_jbconf;
 
index b47679b0ddaa528ad29cdf4683749370971b7ee5..ba463e9c788605faca9063a9f9d05d690489cded 100644 (file)
@@ -77,7 +77,8 @@ static struct ast_jb_conf default_jbconf =
        .flags = 0,
        .max_size = -1,
        .resync_threshold = -1,
-       .impl = ""
+       .impl = "",
+       .target_extra = -1,
 };
 static struct ast_jb_conf global_jbconf;
 
index 385344461838e4f032128d8b77d4d48e69c72d70..94893ebd0abb42f492b4e77094b0bb41303e8878 100644 (file)
@@ -59,6 +59,7 @@ static struct ast_jb_conf g_jb_conf = {
        .max_size = -1,
        .resync_threshold = -1,
        .impl = "",
+       .target_extra = -1,
 };
 
 static struct ast_channel *local_request(const char *type, int format, void *data, int *cause);
index 067bc13d7fde3b12b73ec0d732130ab56bab78eb..07cf590bb95e62508087f90b9e80df0641bf86a3 100644 (file)
@@ -92,7 +92,8 @@ static struct ast_jb_conf default_jbconf =
        .flags = 0,
        .max_size = -1,
        .resync_threshold = -1,
-       .impl = ""
+       .impl = "",
+       .target_extra = -1,
 };
 static struct ast_jb_conf global_jbconf;
 
index e6126d2643e6e3545b2cb7dcf62baca69db30d03..cd87efea8169f8409e79579a9d335ccba084e8d1 100644 (file)
@@ -72,6 +72,7 @@ static struct ast_jb_conf default_jbconf =
        .max_size = -1,
        .resync_threshold = -1,
        .impl = "",
+       .target_extra = -1,
 };
 static struct ast_jb_conf global_jbconf;
 
index 6e45b882cc5d40a9e16fda14ff1665a9205f0299..a009299019fb3d8a931e4a7e2f1664b01b44b67c 100644 (file)
@@ -252,7 +252,8 @@ static struct ast_jb_conf default_jbconf =
        .flags = 0,
        .max_size = -1,
        .resync_threshold = -1,
-       .impl = ""
+       .impl = "",
+       .target_extra = -1,
 };
 static struct ast_jb_conf global_jbconf;       /*!< Global jitterbuffer configuration */
 
index 126c18bb74188cbf601b58aaa898e47dbd5c28f0..a04a564937a77da67e2d6789b4976344449f70b6 100644 (file)
@@ -151,7 +151,8 @@ static struct ast_jb_conf default_jbconf =
        .flags = 0,
        .max_size = -1,
        .resync_threshold = -1,
-       .impl = ""
+       .impl = "",
+       .target_extra = -1,
 };
 static struct ast_jb_conf global_jbconf;
 
index 90ed73b3cd014d138b33dd410632151878f7a16e..4480c9de188c896d2871c745c311643675930d62 100644 (file)
@@ -188,10 +188,11 @@ static void dummy(char *dummy, ...)
 /*! \brief Global jitterbuffer configuration - by default, jb is disabled */
 static struct ast_jb_conf default_jbconf =
 {
-        .flags = 0,
+       .flags = 0,
        .max_size = -1,
        .resync_threshold = -1,
-       .impl = ""
+       .impl = "",
+       .target_extra = -1,
 };
 static struct ast_jb_conf global_jbconf;
                                
index 26d686a8abf6787dfcd29047d911dc423073cb2f..0092d768305117f6941dca2f0708e8dd25f78f5c 100644 (file)
@@ -131,6 +131,7 @@ static struct ast_jb_conf default_jbconf =
        .max_size = -1,
        .resync_threshold = -1,
        .impl = "",
+       .target_extra = -1,
 };
 static struct ast_jb_conf global_jbconf;
 
index a3b956888e38e6728db0cca42e05629a8927fea5..f51c655a970d01bb0384f40c345853951c24ad65 100644 (file)
@@ -57,6 +57,7 @@ static struct ast_jb_conf default_jbconf =
        .max_size = -1,
        .resync_threshold = -1,
        .impl = "",
+       .target_extra = -1,
 };
 
 static struct ast_jb_conf global_jbconf;
index f550306185ef3f9a30a030ec2a2598b649343159..fa2ff1d9bbaf3b71fe989fc5ab2422252da7bd84 100644 (file)
@@ -57,6 +57,13 @@ extension=s
                               ; (with size always equals to jbmax-size) and "adaptive" (with
                               ; variable size, actually the new jb of IAX2). Defaults to fixed.
 
+; jbtargetextra = 40          ; This option only affects the jb when 'jbimpl = adaptive' is set.
+                              ; The option represents the number of milliseconds by which the new
+                              ; jitter buffer will pad its size. the default is 40, so without
+                              ; modification, the new jitter buffer will set its size to the jitter
+                              ; value plus 40 milliseconds. increasing this value may help if your
+                              ; network normally has low jitter, but occasionally has spikes.
+
 ; jblog = no                  ; Enables jitterbuffer frame logging. Defaults to "no".
 ;-----------------------------------------------------------------------------------
 
index 9e6c34f9d8a170a8b73ede345b1c14177136a951..942e0da355b1d986b3bb9d39435100522db393c5 100644 (file)
@@ -763,6 +763,13 @@ pickupgroup=1
                               ; (with size always equals to jbmax-size) and "adaptive" (with
                               ; variable size, actually the new jb of IAX2). Defaults to fixed.
 
+; jbtargetextra = 40          ; This option only affects the jb when 'jbimpl = adaptive' is set.
+                              ; The option represents the number of milliseconds by which the new
+                              ; jitter buffer will pad its size. the default is 40, so without
+                              ; modification, the new jitter buffer will set its size to the jitter
+                              ; value plus 40 milliseconds. increasing this value may help if your
+                              ; network normally has low jitter, but occasionally has spikes.
+
 ; jblog = no                  ; Enables jitterbuffer frame logging. Defaults to "no".
 ;-----------------------------------------------------------------------------------
 ;
index ff58605a3810bdcee6a60b7a8b0deb19289b17d6..7a40ed02e16bf5df0b266c7523f0a660909095d6 100644 (file)
                               ; (with size always equals to jbmax-size) and "adaptive" (with
                               ; variable size, actually the new jb of IAX2). Defaults to fixed.
 
+; jbtargetextra = 40          ; This option only affects the jb when 'jbimpl = adaptive' is set.
+                              ; The option represents the number of milliseconds by which the new
+                              ; jitter buffer will pad its size. the default is 40, so without
+                              ; modification, the new jitter buffer will set its size to the jitter
+                              ; value plus 40 milliseconds. increasing this value may help if your
+                              ; network normally has low jitter, but occasionally has spikes.
+
 ; jblog = no                  ; Enables jitterbuffer frame logging. Defaults to "no".
 ;-----------------------------------------------------------------------------------
 
index 104891e8a15a46177307b80f3c602f2bbd239e01..78ee42a3dc44515a71acb15f05f705731de4fe99 100644 (file)
                               ; (with size always equals to jbmax-size) and "adaptive" (with
                               ; variable size, actually the new jb of IAX2). Defaults to fixed.
 
+; jbtargetextra = 40          ; This option only affects the jb when 'jbimpl = adaptive' is set.
+                              ; The option represents the number of milliseconds by which the new
+                              ; jitter buffer will pad its size. the default is 40, so without
+                              ; modification, the new jitter buffer will set its size to the jitter
+                              ; value plus 40 milliseconds. increasing this value may help if your
+                              ; network normally has low jitter, but occasionally has spikes.
+
 ; jblog = no                  ; Enables jitterbuffer frame logging. Defaults to "no".
 ;-----------------------------------------------------------------------------------
 
index 98fcd29c6f614e47b6c52dd5340b4938d3b44daf..deaede5cb3bdccf284a5d0af9459d7a2eb42fdb0 100644 (file)
@@ -158,6 +158,13 @@ crypt_keys=test,muh
                               ; (with size always equals to jbmaxsize) and "adaptive" (with
                               ; variable size, actually the new jb of IAX2). Defaults to fixed.
 
+; jbtargetextra = 40          ; This option only affects the jb when 'jbimpl = adaptive' is set.
+                              ; The option represents the number of milliseconds by which the new
+                              ; jitter buffer will pad its size. the default is 40, so without
+                              ; modification, the new jitter buffer will set its size to the jitter
+                              ; value plus 40 milliseconds. increasing this value may help if your
+                              ; network normally has low jitter, but occasionally has spikes.
+
 ; jblog = no                  ; Enables jitterbuffer frame logging. Defaults to "no".
 ;-----------------------------------------------------------------------------------
 
index 24b0b38ee142f05a76a1a5a24874cb23d4f72b16..e748124d2f202c03992538d735dc1e8aa884ab38 100644 (file)
                                   ; (with size always equals to jbmax-size) and "adaptive" (with
                                   ; variable size, actually the new jb of IAX2). Defaults to fixed.
 
+    ; jbtargetextra = 40          ; This option only affects the jb when 'jbimpl = adaptive' is set.
+                                  ; The option represents the number of milliseconds by which the new
+                                  ; jitter buffer will pad its size. the default is 40, so without
+                                  ; modification, the new jitter buffer will set its size to the jitter
+                                  ; value plus 40 milliseconds. increasing this value may help if your
+                                  ; network normally has low jitter, but occasionally has spikes.
+
     ; jblog = no                  ; Enables jitterbuffer frame logging. Defaults to "no".
     ;-----------------------------------------------------------------------------------
 
index f68361424e468521a364f6216e19d0d35f5d00f4..141b29636675e6ae7adea419206072636f670f77 100644 (file)
@@ -726,6 +726,13 @@ srvlookup=yes                   ; Enable DNS SRV lookups on outbound calls
                               ; (with size always equals to jbmaxsize) and "adaptive" (with
                               ; variable size, actually the new jb of IAX2). Defaults to fixed.
 
+; jbtargetextra = 40          ; This option only affects the jb when 'jbimpl = adaptive' is set.
+                              ; The option represents the number of milliseconds by which the new jitter buffer
+                              ; will pad its size. the default is 40, so without modification, the new
+                              ; jitter buffer will set its size to the jitter value plus 40 milliseconds.
+                              ; increasing this value may help if your network normally has low jitter,
+                              ; but occasionally has spikes.
+
 ; jblog = no                  ; Enables jitterbuffer frame logging. Defaults to "no".
 ;-----------------------------------------------------------------------------------
 
index 5ba9815ca1c0576ab30f07dd8f09954941948242..6af373e6d17721f338a26ec50e0517d202d9d0a1 100644 (file)
                               ; (with size always equals to jbmax-size) and "adaptive" (with
                               ; variable size, actually the new jb of IAX2). Defaults to fixed.
 
+; jbtargetextra = 40          ; This option only affects the jb when 'jbimpl = adaptive' is set.
+                              ; The option represents the number of milliseconds by which the new
+                              ; jitter buffer will pad its size. the default is 40, so without
+                              ; modification, the new jitter buffer will set its size to the jitter
+                              ; value plus 40 milliseconds. increasing this value may help if your
+                              ; network normally has low jitter, but occasionally has spikes.
+
 ; jblog = no                  ; Enables jitterbuffer frame logging. Defaults to "no".
 ;-----------------------------------------------------------------------------------
 
index 2a1b89fd1829f7ce876d8992f6c2956a23ddc86f..a1f3cdd9d8c5f3925b09b6a8dcdddb777547f16c 100644 (file)
@@ -57,9 +57,11 @@ struct ast_jb_conf
        /*! \brief Max size of the jitterbuffer implementation. */
        long max_size;
        /*! \brief Resynchronization threshold of the jitterbuffer implementation. */
-       long resync_threshold;
+       long resync_threshold;
        /*! \brief Name of the jitterbuffer implementation to be used. */
-       char impl[AST_JB_IMPL_NAME_SIZE];
+       char impl[AST_JB_IMPL_NAME_SIZE];
+       /*! \brief amount of additional jitterbuffer adjustment */
+       long target_extra;
 };
 
 
@@ -69,6 +71,7 @@ struct ast_jb_conf
 #define AST_JB_CONF_FORCE "force"
 #define AST_JB_CONF_MAX_SIZE "maxsize"
 #define AST_JB_CONF_RESYNCH_THRESHOLD "resyncthreshold"
+#define AST_JB_CONF_TARGET_EXTRA "targetextra"
 #define AST_JB_CONF_IMPL "impl"
 #define AST_JB_CONF_LOG "log"
 
index af5b61431bfd2cbfe2718ff65d2c14d939dce370..8d78653ddb7e4b1b14a0036b7be37e021352f730 100644 (file)
@@ -584,6 +584,10 @@ int ast_jb_read_conf(struct ast_jb_conf *conf, const char *varname, const char *
        } else if (!strcasecmp(name, AST_JB_CONF_IMPL)) {
                if (!ast_strlen_zero(value))
                        snprintf(conf->impl, sizeof(conf->impl), "%s", value);
+       } else if (!strcasecmp(name, AST_JB_CONF_TARGET_EXTRA)) {
+               if (sscanf(value, "%30d", &tmp) == 1) {
+                       conf->target_extra = tmp;
+               }
        } else if (!strcasecmp(name, AST_JB_CONF_LOG)) {
                ast_set2_flag(conf, ast_true(value), AST_JB_LOG);
        } else {
@@ -730,6 +734,7 @@ static void *jb_create_adaptive(struct ast_jb_conf *general_config, long resynch
                jbconf.max_jitterbuf = general_config->max_size;
                jbconf.resync_threshold = general_config->resync_threshold;
                jbconf.max_contig_interp = 10;
+               jbconf.target_extra = general_config->target_extra;
                jb_setconf(adaptivejb, &jbconf);
        }