diff options
-rw-r--r-- | channels/chan_alsa.c | 3 | ||||
-rw-r--r-- | channels/chan_console.c | 3 | ||||
-rw-r--r-- | channels/chan_dahdi.c | 3 | ||||
-rw-r--r-- | channels/chan_gtalk.c | 3 | ||||
-rw-r--r-- | channels/chan_h323.c | 3 | ||||
-rw-r--r-- | channels/chan_jingle.c | 3 | ||||
-rw-r--r-- | channels/chan_local.c | 1 | ||||
-rw-r--r-- | channels/chan_mgcp.c | 3 | ||||
-rw-r--r-- | channels/chan_oss.c | 1 | ||||
-rw-r--r-- | channels/chan_sip.c | 3 | ||||
-rw-r--r-- | channels/chan_skinny.c | 3 | ||||
-rw-r--r-- | channels/chan_unistim.c | 5 | ||||
-rw-r--r-- | channels/chan_usbradio.c | 1 | ||||
-rw-r--r-- | channels/misdn_config.c | 1 | ||||
-rw-r--r-- | configs/alsa.conf.sample | 7 | ||||
-rw-r--r-- | configs/chan_dahdi.conf.sample | 7 | ||||
-rw-r--r-- | configs/console.conf.sample | 7 | ||||
-rw-r--r-- | configs/mgcp.conf.sample | 7 | ||||
-rw-r--r-- | configs/misdn.conf.sample | 7 | ||||
-rw-r--r-- | configs/oss.conf.sample | 7 | ||||
-rw-r--r-- | configs/sip.conf.sample | 7 | ||||
-rw-r--r-- | configs/usbradio.conf.sample | 7 | ||||
-rw-r--r-- | include/asterisk/abstract_jb.h | 7 | ||||
-rw-r--r-- | main/abstract_jb.c | 5 |
24 files changed, 91 insertions, 13 deletions
diff --git a/channels/chan_alsa.c b/channels/chan_alsa.c index b52a03c08..3f8d26d5a 100644 --- a/channels/chan_alsa.c +++ b/channels/chan_alsa.c @@ -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; diff --git a/channels/chan_console.c b/channels/chan_console.c index df23c3dd1..93a51ae4e 100644 --- a/channels/chan_console.c +++ b/channels/chan_console.c @@ -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; diff --git a/channels/chan_dahdi.c b/channels/chan_dahdi.c index cd1dbcfc3..dacd234b3 100644 --- a/channels/chan_dahdi.c +++ b/channels/chan_dahdi.c @@ -269,7 +269,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; diff --git a/channels/chan_gtalk.c b/channels/chan_gtalk.c index 8655806b0..252e3fe20 100644 --- a/channels/chan_gtalk.c +++ b/channels/chan_gtalk.c @@ -79,7 +79,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; diff --git a/channels/chan_h323.c b/channels/chan_h323.c index 32d9443d4..145a3f5bb 100644 --- a/channels/chan_h323.c +++ b/channels/chan_h323.c @@ -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; diff --git a/channels/chan_jingle.c b/channels/chan_jingle.c index c1181dbfe..b876dfd0d 100644 --- a/channels/chan_jingle.c +++ b/channels/chan_jingle.c @@ -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; diff --git a/channels/chan_local.c b/channels/chan_local.c index 51c4c2b87..80044f484 100644 --- a/channels/chan_local.c +++ b/channels/chan_local.c @@ -58,6 +58,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, format_t format, const struct ast_channel *requestor, void *data, int *cause); diff --git a/channels/chan_mgcp.c b/channels/chan_mgcp.c index 4910b0035..5dfafb84a 100644 --- a/channels/chan_mgcp.c +++ b/channels/chan_mgcp.c @@ -99,7 +99,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; diff --git a/channels/chan_oss.c b/channels/chan_oss.c index 37717049e..09ca4b830 100644 --- a/channels/chan_oss.c +++ b/channels/chan_oss.c @@ -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; diff --git a/channels/chan_sip.c b/channels/chan_sip.c index 6aa8350e0..9944c00fd 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -555,7 +555,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 */ diff --git a/channels/chan_skinny.c b/channels/chan_skinny.c index b0aa4e0a0..126e94bdc 100644 --- a/channels/chan_skinny.c +++ b/channels/chan_skinny.c @@ -220,7 +220,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; diff --git a/channels/chan_unistim.c b/channels/chan_unistim.c index 79df46650..0ebf879a1 100644 --- a/channels/chan_unistim.c +++ b/channels/chan_unistim.c @@ -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; diff --git a/channels/chan_usbradio.c b/channels/chan_usbradio.c index dad7fc91f..e330b9f5c 100644 --- a/channels/chan_usbradio.c +++ b/channels/chan_usbradio.c @@ -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; diff --git a/channels/misdn_config.c b/channels/misdn_config.c index c16650680..82d3547f7 100644 --- a/channels/misdn_config.c +++ b/channels/misdn_config.c @@ -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; diff --git a/configs/alsa.conf.sample b/configs/alsa.conf.sample index 0579cb33b..ced5b4485 100644 --- a/configs/alsa.conf.sample +++ b/configs/alsa.conf.sample @@ -66,6 +66,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". ;----------------------------------------------------------------------------------- diff --git a/configs/chan_dahdi.conf.sample b/configs/chan_dahdi.conf.sample index 6f65169c5..942375341 100644 --- a/configs/chan_dahdi.conf.sample +++ b/configs/chan_dahdi.conf.sample @@ -855,6 +855,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". ;----------------------------------------------------------------------------------- ; diff --git a/configs/console.conf.sample b/configs/console.conf.sample index 9bd502696..606254eee 100644 --- a/configs/console.conf.sample +++ b/configs/console.conf.sample @@ -64,6 +64,13 @@ ; (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". ;----------------------------------------------------------------------------------- diff --git a/configs/mgcp.conf.sample b/configs/mgcp.conf.sample index c69602d7a..f5e5473d1 100644 --- a/configs/mgcp.conf.sample +++ b/configs/mgcp.conf.sample @@ -40,6 +40,13 @@ matchdigittimeout = 5000 ; defaults 3000 = 3s ; (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". ;----------------------------------------------------------------------------------- diff --git a/configs/misdn.conf.sample b/configs/misdn.conf.sample index f4ca486e9..9de874e92 100644 --- a/configs/misdn.conf.sample +++ b/configs/misdn.conf.sample @@ -132,6 +132,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". ;----------------------------------------------------------------------------------- diff --git a/configs/oss.conf.sample b/configs/oss.conf.sample index d29d3ac52..c3781a2a2 100644 --- a/configs/oss.conf.sample +++ b/configs/oss.conf.sample @@ -66,6 +66,13 @@ ; (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". ;----------------------------------------------------------------------------------- diff --git a/configs/sip.conf.sample b/configs/sip.conf.sample index 7109935e7..c4c4b83ea 100644 --- a/configs/sip.conf.sample +++ b/configs/sip.conf.sample @@ -892,6 +892,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". ;----------------------------------------------------------------------------------- diff --git a/configs/usbradio.conf.sample b/configs/usbradio.conf.sample index 5ba9815ca..6af373e6d 100644 --- a/configs/usbradio.conf.sample +++ b/configs/usbradio.conf.sample @@ -48,6 +48,13 @@ ; (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". ;----------------------------------------------------------------------------------- diff --git a/include/asterisk/abstract_jb.h b/include/asterisk/abstract_jb.h index 5827787c5..4efa924b8 100644 --- a/include/asterisk/abstract_jb.h +++ b/include/asterisk/abstract_jb.h @@ -59,9 +59,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; }; @@ -71,6 +73,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" diff --git a/main/abstract_jb.c b/main/abstract_jb.c index dd159c1f0..f23c176b1 100644 --- a/main/abstract_jb.c +++ b/main/abstract_jb.c @@ -592,6 +592,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 { @@ -738,6 +742,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); } |