aboutsummaryrefslogtreecommitdiffstats
path: root/res/res_agi.c
diff options
context:
space:
mode:
Diffstat (limited to 'res/res_agi.c')
-rw-r--r--res/res_agi.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/res/res_agi.c b/res/res_agi.c
index c81ddf9b7..025e9cf9c 100644
--- a/res/res_agi.c
+++ b/res/res_agi.c
@@ -1955,7 +1955,7 @@ static int handle_speechrecognize(struct ast_channel *chan, AGI *agi, int argc,
switch (speech->state) {
case AST_SPEECH_STATE_READY:
/* If the stream is done, start timeout calculation */
- if ((timeout > 0) && ((!chan->stream) || (chan->streamid == -1 && chan->timingfunc == NULL))) {
+ if ((timeout > 0) && start == 0 && ((!chan->stream) || (chan->streamid == -1 && chan->timingfunc == NULL))) {
ast_stopstream(chan);
time(&start);
}