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

Asterisk Bug Tracker noreply at bugs.digium.com
Tue Dec 1 12:51:52 CST 2009


The following issue has been UPDATED. 
====================================================================== 
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:                        
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:              2009-12-01 12:51 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.

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

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2009-12-01 12:51 lmadsen        version                  1.6.1.10 =>         
2009-12-01 12:51 lmadsen        Description Updated                          
======================================================================




More information about the asterisk-bugs mailing list