[asterisk-bugs] [Asterisk 0016297]: [patch] Timeout in SPEECH RECOGNIZE not working.

Asterisk Bug Tracker noreply at bugs.digium.com
Mon Jan 4 10:24:52 CST 2010


A NOTE has been added to this issue. 
====================================================================== 
https://issues.asterisk.org/view.php?id=16297 
====================================================================== 
Reported By:                semond
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   16297
Category:                   Resources/res_agi
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     confirmed
Asterisk Version:           1.6.1.10 
JIRA:                       SWP-462 
Regression:                 No 
Reviewboard Link:            
SVN Branch (only for SVN checkouts, not tarball releases): N/A 
SVN Revision (number only!):  
Request Review:              
====================================================================== 
Date Submitted:             2009-11-20 19:54 CST
Last Modified:              2010-01-04 10:24 CST
====================================================================== 
Summary:                    [patch] Timeout in SPEECH RECOGNIZE not working.
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(&current).

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.

====================================================================== 

---------------------------------------------------------------------- 
 (0115912) svnbot (reporter) - 2010-01-04 10:24
 https://issues.asterisk.org/view.php?id=16297#c115912 
---------------------------------------------------------------------- 
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 https://issues.asterisk.org/view.php?id=16297)
Reported by: semond

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=237323 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2010-01-04 10:24 svnbot         Note Added: 0115912                          
======================================================================




More information about the asterisk-bugs mailing list