]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Merged revisions 249893 via svnmerge from
authorDavid Vossel <dvossel@digium.com>
Tue, 2 Mar 2010 19:15:23 +0000 (19:15 +0000)
committerDavid Vossel <dvossel@digium.com>
Tue, 2 Mar 2010 19:15:23 +0000 (19:15 +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.1@249896 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 c6814f4adceaf23f567655d4a0c80d95872dde97..aa8b2588287966ddde4199da92748cc02abd57b2 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 e80327d7707ad0b3870bd07e759d75466fa769c5..5ab1694153433a6122ffe3861adee9e645db1079 100644 (file)
@@ -177,7 +177,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 51c436ca1c400ab363820ad424d1bb8676bed187..c0bb69eabd34388bae9c08691790b60deb5e088d 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 e1743666b884e034e97c046f6711bf3bfedfdc29..9596756d4503bd28ada33172eb3ee39708a840d9 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 7600cb8c3546e71664ca81720c8ce60ee0f46ad0..68b64d9799780a74a1ea7ff80fda169b1a976c3b 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 6284618872d7d29264ed2fade586ec4923d2d5d0..a53f3a01f08fe9b9ad2dba993fa712766291938e 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 de468a76cdda3e5df220bff6e8d743231359e0eb..8fd6d884c6890fa6098b7b696a1cf43ac8ca69c6 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 56836e809716c2a6abf0b30699f16bcc6ba101d8..7536ea0e084152640903ccf882d66b64fcfc502d 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 d045e00c1ecd57095fabe90f9e4ab5fe4612fac5..4e7fff1ae36b3c8858e12adc73aedd36b946b813 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 d99c337426b8532f8b70b6b92a2b91f7d62462a2..b06871c07734fea6033081f806a52d041177fea3 100644 (file)
@@ -278,7 +278,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 6a8ee8b14e0f4fdce99f25cbf338cf0dcb40cd8e..b9fe51548c17778d16136d0fd687238cc8e41fe8 100644 (file)
@@ -155,7 +155,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 9e2a32e08f9b11f2901bbffcbe40cfcd9a4d841e..437eac15e0c026fe048abe8c855444d945dfe651 100644 (file)
@@ -188,10 +188,11 @@ static void dummy(char *unused, ...)
 /*! \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 bc77888d02a3af5e1818dcd86bda1e480e30de36..a5618fd034852068b72a1ccd350e964c5bc0b5e3 100644 (file)
@@ -193,6 +193,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 de30fb53ff9bdefc32b64cc4e8733f8e81f2d5f7..371c9438e5dfa5a7931cc74d8da4f778bc96030a 100644 (file)
@@ -54,6 +54,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 f69a111ca5e717955d153bf8c15752c7462ac91d..75ba248bc81e2d458a5733aadcc9e4b4f3c44b54 100644 (file)
@@ -775,6 +775,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 48f0ced9040fd59c4b77e0c83cce97302b5f0fc7..3b9f5de0a9d450f607514646ca24f07c5dba9a04 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 89bea58f6efa1a449cc24275a691d6db8a3b15a4..52265ba1053522472cc5912b96a4badfb4c3f1a8 100644 (file)
@@ -776,6 +776,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 b02155bc5e83c73ab69f485f8b03c1ee0a3be26b..15de11dd0d3ff6c510e11a62d3bd6dee3f1da5cd 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);
        }