From 38bb3d18410bf22b0686775fc677e358358d9981 Mon Sep 17 00:00:00 2001 From: file Date: Tue, 3 Apr 2007 19:43:26 +0000 Subject: Merged revisions 59963 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r59963 | file | 2007-04-03 15:40:59 -0400 (Tue, 03 Apr 2007) | 2 lines Don't clash when a person both speaks and uses DTMF. ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@59969 f38db490-d61c-443f-a65b-d21fe96a405b --- apps/app_speech_utils.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/apps/app_speech_utils.c b/apps/app_speech_utils.c index b430a4094..cf8964ebd 100644 --- a/apps/app_speech_utils.c +++ b/apps/app_speech_utils.c @@ -590,7 +590,7 @@ static int speech_background(struct ast_channel *chan, void *data) } /* Do timeout check (shared between audio/dtmf) */ - if (!quieted && started == 1) { + if ((!quieted || strlen(dtmf)) && started == 1) { time(¤t); if ((current-start) >= timeout) { done = 1; @@ -677,11 +677,13 @@ static int speech_background(struct ast_channel *chan, void *data) } else { if (chan->stream != NULL) { ast_stopstream(chan); + } + if (!started) { /* Change timeout to be 5 seconds for DTMF input */ timeout = (chan->pbx && chan->pbx->dtimeout) ? chan->pbx->dtimeout : 5; - time(&start); started = 1; } + time(&start); snprintf(tmp, sizeof(tmp), "%c", f->subclass); strncat(dtmf, tmp, sizeof(dtmf)); } -- cgit v1.2.3