diff --git a/apps/app_dial.c b/apps/app_dial.c index 67449aee96..c18858021e 100644 --- a/apps/app_dial.c +++ b/apps/app_dial.c @@ -1685,8 +1685,11 @@ out: if (option_debug) 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 ((ast_test_flag(peerflags, OPT_GO_ON)) && (!chan->_softhangup) && (res != AST_PBX_KEEPALIVE)) { + if (calldurationlimit) + chan->whentohangup = 0; res = 0; + } done: ast_module_user_remove(u);