Summary: | ASTERISK-15188: [patch] Timeout in SPEECH RECOGNIZE not working. | ||
Reporter: | Serge Émond (semond) | Labels: | |
Date Opened: | 2009-11-20 19:54:49.000-0600 | Date Closed: | 2010-01-05 09:25:26.000-0600 |
Priority: | Minor | Regression? | No |
Status: | Closed/Complete | Components: | Resources/res_agi |
Versions: | Frequency of Occurrence | ||
Related Issues: | |||
Environment: | Attachments: | ( 0) ast-1.6.1.10-res_agi-timeout.diff | |
Description: | The timeout in SPEECH RECOGNIZE doesn't work. (Unless "timeout" has some other meaning. I'm assuming that it should represent the time in seconds after the prompt has stopped playing) (Or maybe it's specific to lumenvox? It's the only engine I've ever used) In fact, timeout=1 aborts almost instantly after the prompt has finished, while timeout > 1 doesn't timeout at all. Adding a few printf() tells me that "time(&start);" is called in each iteration, as often as time(¤t). Very small part of the printf() output: AST_SPEECH_STATE_READY Start: 1258764257 Current: 1258764257 AST_SPEECH_STATE_READY Start: 1258764257 Current: 1258764258 AST_SPEECH_STATE_READY Start: 1258764258 Current: 1258764258 The following patch works for me: diff --git a/res/res_agi.c b/res/res_agi.c <inline patch removed by lmadsen> I have no idea if ast_stopstream(chan) should be called a million times so I don't know if start==0 should be there or on the bigger if just above. In the current SVN trunk, this code is around line 2878 instead of 1954. | ||
Comments: | By: Leif Madsen (lmadsen) 2009-11-23 19:46:57.000-0600 As we can't accept inline patches, I'd like to request you to attach your patch as a file attachment. If you have not already signed the electronic license agreement, then please do so (you'll see a link to it in the top menu bar of this page). Once signed, please attach your patch as a unified diff. Thanks for the submission! By: Serge Émond (semond) 2009-11-23 20:31:25.000-0600 Here it is as an attachment. Thanks. By: Digium Subversion (svnbot) 2010-01-04 10:24:52.000-0600 Repository: asterisk Revision: 237323 U trunk/res/res_agi.c ------------------------------------------------------------------------ r237323 | jpeeler | 2010-01-04 10:24:51 -0600 (Mon, 04 Jan 2010) | 5 lines Fix timeout for AGI command speech recognize. (closes issue ASTERISK-15188) Reported by: semond ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=237323 By: Digium Subversion (svnbot) 2010-01-04 10:26:27.000-0600 Repository: asterisk Revision: 237324 _U branches/1.6.0/ U branches/1.6.0/res/res_agi.c ------------------------------------------------------------------------ r237324 | jpeeler | 2010-01-04 10:26:26 -0600 (Mon, 04 Jan 2010) | 12 lines Merged revisions 237323 via svnmerge from https://origsvn.digium.com/svn/asterisk/trunk ........ r237323 | jpeeler | 2010-01-04 10:24:51 -0600 (Mon, 04 Jan 2010) | 5 lines Fix timeout for AGI command speech recognize. (closes issue ASTERISK-15188) Reported by: semond ........ ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=237324 By: Digium Subversion (svnbot) 2010-01-04 10:26:50.000-0600 Repository: asterisk Revision: 237325 _U branches/1.6.1/ U branches/1.6.1/res/res_agi.c ------------------------------------------------------------------------ r237325 | jpeeler | 2010-01-04 10:26:50 -0600 (Mon, 04 Jan 2010) | 12 lines Merged revisions 237323 via svnmerge from https://origsvn.digium.com/svn/asterisk/trunk ........ r237323 | jpeeler | 2010-01-04 10:24:51 -0600 (Mon, 04 Jan 2010) | 5 lines Fix timeout for AGI command speech recognize. (closes issue ASTERISK-15188) Reported by: semond ........ ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=237325 By: Digium Subversion (svnbot) 2010-01-04 10:27:49.000-0600 Repository: asterisk Revision: 237326 _U branches/1.6.2/ U branches/1.6.2/res/res_agi.c ------------------------------------------------------------------------ r237326 | jpeeler | 2010-01-04 10:27:48 -0600 (Mon, 04 Jan 2010) | 12 lines Merged revisions 237323 via svnmerge from https://origsvn.digium.com/svn/asterisk/trunk ........ r237323 | jpeeler | 2010-01-04 10:24:51 -0600 (Mon, 04 Jan 2010) | 5 lines Fix timeout for AGI command speech recognize. (closes issue ASTERISK-15188) Reported by: semond ........ ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=237326 |