Index: pbx.c =================================================================== RCS file: /usr/cvsroot/asterisk/pbx.c,v retrieving revision 1.167 diff -u -r1.167 pbx.c --- pbx.c 1 Nov 2004 02:23:27 -0000 1.167 +++ pbx.c 17 Nov 2004 19:21:57 -0000 @@ -4767,21 +4767,40 @@ { int ms; int res; + char* timeout; + char* option; + int option_continue = 0; + + if (data && !ast_strlen_zero(data)) { + timeout = ast_strdupa(data); + + if (timeout) { + option = strchr(timeout, '|'); + + if (option) { + *option = '\0'; + option++; + + option_continue = !strcmp(option, "c"); + } + } + } + /* Wait for "n" seconds */ - if (data && atof((char *)data)) - ms = atof((char *)data) * 1000; + if (data && atof(timeout)) + ms = atof(timeout) * 1000; else if (chan->pbx) ms = chan->pbx->rtimeout * 1000; else ms = 10000; res = ast_waitfordigit(chan, ms); if (!res) { - if (ast_exists_extension(chan, chan->context, "t", 1, chan->cid.cid_num)) { + if (!option_continue && ast_exists_extension(chan, chan->context, "t", 1, chan->cid.cid_num)) { if (option_verbose > 2) ast_verbose(VERBOSE_PREFIX_3 "Timeout on %s\n", chan->name); strncpy(chan->exten, "t", sizeof(chan->exten)); chan->priority = 0; - } else { + } else if (!option_continue) { ast_log(LOG_WARNING, "Timeout but no rule 't' in context '%s'\n", chan->context); res = -1; }