diff options
author | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-11-12 21:18:57 +0000 |
---|---|---|
committer | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-11-12 21:18:57 +0000 |
commit | 51c36510c0c70f5ba4ee71b0fdfdb05198288040 (patch) | |
tree | d1c92beb42c5967ce67617584d19d637b968fe76 | |
parent | a00bf7f35fd0b8c11194cfb211c4ca069d4e4a20 (diff) |
When using call limits under 1 second, infinite call lengths are allowed,
instead.
(closes issue #13851)
Reported by: ruddy
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@156386 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r-- | apps/app_dial.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/apps/app_dial.c b/apps/app_dial.c index 0032dd845..5192217f1 100644 --- a/apps/app_dial.c +++ b/apps/app_dial.c @@ -1744,6 +1744,9 @@ static int dial_exec_full(struct ast_channel *chan, void *data, struct ast_flags if (!res) { if (calldurationlimit > 0) { peer->whentohangup = time(NULL) + calldurationlimit; + } else if (timelimit > 0) { + /* Not enough granularity to make it less, but we can't use the special value 0 */ + peer->whentohangup = time(NULL) + 1; } if (!ast_strlen_zero(dtmfcalled)) { if (option_verbose > 2) @@ -1851,7 +1854,7 @@ out: ast_log(LOG_DEBUG, "Exiting with DIALSTATUS=%s.\n", status); if ((ast_test_flag(peerflags, OPT_GO_ON)) && (!chan->_softhangup) && (res != AST_PBX_KEEPALIVE)) { - if (calldurationlimit) + if (timelimit) chan->whentohangup = 0; res = 0; } |