Index: channel.c =================================================================== --- channel.c (revision 8705) +++ channel.c (working copy) @@ -3392,7 +3392,7 @@ int o0nativeformats; int o1nativeformats; long time_left_ms=0; - struct timeval nexteventts = { 0, }; + struct timeval timelimit, nexteventts = { 0, }; char caller_warning = 0; char callee_warning = 0; int to; @@ -3419,6 +3419,7 @@ if (ast_tvzero(config->start_time)) config->start_time = ast_tvnow(); + timelimit = ast_tvadd(config->start_time, ast_samp2tv(config->timelimit, 1000)); time_left_ms = config->timelimit; caller_warning = ast_test_flag(&config->features_caller, AST_FEATURE_PLAY_WARNING); @@ -3489,8 +3490,12 @@ } if (config->warning_freq) { nexteventts = ast_tvadd(nexteventts, ast_samp2tv(config->warning_freq, 1000)); + if (ast_tvcmp(nexteventts, timelimit) > 0) { + ast_log(LOG_NOTICE, "reset timelimit\n"); + nexteventts = timelimit; + } } else - nexteventts = ast_tvadd(config->start_time, ast_samp2tv(config->timelimit, 1000)); + nexteventts = timelimit; } }