diff options
author | file <file@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-02-28 17:45:50 +0000 |
---|---|---|
committer | file <file@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-02-28 17:45:50 +0000 |
commit | 7476d2ed2a8d765ca2f158661360ffd9491425a8 (patch) | |
tree | 44316eadaa7d34483e8042be4523cec27499093f | |
parent | 56eda4714b0ce262797ad0abe2e9c63b9445f45c (diff) |
Better handle timeouts when the individual speaks after everything has been played but before the timeout ends.
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@57053 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r-- | apps/app_speech_utils.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/apps/app_speech_utils.c b/apps/app_speech_utils.c index a2a075767..5e236ddc6 100644 --- a/apps/app_speech_utils.c +++ b/apps/app_speech_utils.c @@ -587,7 +587,7 @@ static int speech_background(struct ast_channel *chan, void *data) } /* Do timeout check (shared between audio/dtmf) */ - if (started == 1) { + if (!quieted && started == 1) { time(¤t); if ((current-start) >= timeout) { done = 1; @@ -599,8 +599,9 @@ static int speech_background(struct ast_channel *chan, void *data) /* Do checks on speech structure to see if it's changed */ ast_mutex_lock(&speech->lock); - if (ast_test_flag(speech, AST_SPEECH_QUIET) && chan->stream != NULL) { - ast_stopstream(chan); + if (ast_test_flag(speech, AST_SPEECH_QUIET)) { + if (chan->stream) + ast_stopstream(chan); ast_clear_flag(speech, AST_SPEECH_QUIET); quieted = 1; } |