From: Jeff Peeler Date: Mon, 4 Jan 2010 16:24:51 +0000 (+0000) Subject: Fix timeout for AGI command speech recognize. X-Git-Tag: 11.0.0-beta1~3674 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=fb6606dc4a67ea2f451ae84270bd8015a2169417;p=thirdparty%2Fasterisk.git Fix timeout for AGI command speech recognize. (closes issue #16297) Reported by: semond git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@237323 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/res/res_agi.c b/res/res_agi.c index fad66ce64a..b4396acb28 100644 --- a/res/res_agi.c +++ b/res/res_agi.c @@ -2788,7 +2788,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); }