From: Sean Bright Date: Fri, 17 Feb 2012 22:03:04 +0000 (+0000) Subject: Don't allow trunkfreq to be greater than 1000ms. X-Git-Tag: 10.3.0-rc1~25 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7070d7acef2d9d335a25852c10d73ce866cf980f;p=thirdparty%2Fasterisk.git Don't allow trunkfreq to be greater than 1000ms. ........ Merged revisions 355793 from http://svn.asterisk.org/svn/asterisk/branches/1.8 git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10@355794 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/channels/chan_iax2.c b/channels/chan_iax2.c index 3a8f4f4b76..91e5830b27 100644 --- a/channels/chan_iax2.c +++ b/channels/chan_iax2.c @@ -13349,8 +13349,13 @@ static int set_config(const char *config_file, int reload) ast_set2_flag64((&globalflags), i || ast_true(v->value), IAX_RTAUTOCLEAR); } else if (!strcasecmp(v->name, "trunkfreq")) { trunkfreq = atoi(v->value); - if (trunkfreq < 10) + if (trunkfreq < 10) { + ast_log(LOG_NOTICE, "trunkfreq must be between 10ms and 1000ms, using 10ms instead.\n"); trunkfreq = 10; + } else if (trunkfreq > 1000) { + ast_log(LOG_NOTICE, "trunkfreq must be between 10ms and 1000ms, using 1000ms instead.\n"); + trunkfreq = 1000; + } } else if (!strcasecmp(v->name, "trunkmtu")) { mtuv = atoi(v->value); if (mtuv == 0 ) diff --git a/configs/iax.conf.sample b/configs/iax.conf.sample index 35b8d7744c..be507501a8 100644 --- a/configs/iax.conf.sample +++ b/configs/iax.conf.sample @@ -189,7 +189,8 @@ forcejitterbuffer=no ; increasing the time between sending trunk messages, the trunk's payload size will increase as ; well. Note, depending on the size set by trunkmtu, messages may be sent more often than ; specified. For example if a trunk's message size grows to the trunkmtu size before 20ms is -; reached that message will be sent immediately. +; reached that message will be sent immediately. Acceptable values are between 10ms and +; 1000ms. ; ; trunkfreq=20 ; How frequently to send trunk msgs (in ms). This is 20ms by default.