From: Terry Wilson Date: Fri, 20 Apr 2012 14:49:42 +0000 (+0000) Subject: Document Speech* apps hangup on failure and suggest TryExec X-Git-Tag: 10.5.0-rc1~44 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9858388631862dd04a810004cdbf7a61edaa9d23;p=thirdparty%2Fasterisk.git Document Speech* apps hangup on failure and suggest TryExec The Speech API apps return -1 on failure, which will hang up the channel. This may not be desirable behavior for some, but it isn't something that can be changed without breaking people's dialplans or writing an option to all of the Speech apps that does what TryExec already does. This patch documents the hangup behavior of the apps, and suggests TryExec as the solution. (closes issue AST-813) ........ Merged revisions 362815 from http://svn.asterisk.org/svn/asterisk/branches/1.8 git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10@362816 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/apps/app_speech_utils.c b/apps/app_speech_utils.c index 637aac613a..410c6fa308 100644 --- a/apps/app_speech_utils.c +++ b/apps/app_speech_utils.c @@ -53,6 +53,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$"); This application creates information to be used by all the other applications. It must be called before doing any speech recognition activities such as activating a grammar. It takes the engine name to use as the argument, if not specified the default engine will be used. + Sets the ERROR channel variable to 1 if the engine cannot be used. @@ -66,6 +67,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$"); This activates the specified grammar to be recognized by the engine. A grammar tells the speech recognition engine what to recognize, and how to portray it back to you in the dialplan. The grammar name is the only argument to this application. + Hangs up the channel on failure. If this is not desired, use TryExec. @@ -76,6 +78,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$"); Tell the speech recognition engine that it should start trying to get results from audio being fed to it. + Hangs up the channel on failure. If this is not desired, use TryExec. @@ -104,6 +107,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$"); The first text and score are ${SPEECH_TEXT(0)} AND ${SPEECH_SCORE(0)} while the second are ${SPEECH_TEXT(1)} and ${SPEECH_SCORE(1)}. The first argument is the sound file and the second is the timeout integer in seconds. + Hangs up the channel on failure. If this is not desired, use TryExec. @@ -118,6 +122,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$"); This deactivates the specified grammar so that it is no longer recognized. + Hangs up the channel on failure. If this is not desired, use TryExec. @@ -130,6 +135,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$"); This changes the processing sound that SpeechBackground plays back when the speech recognition engine is processing and working to get results. + Hangs up the channel on failure. If this is not desired, use TryExec. @@ -141,6 +147,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$"); This destroys the information used by all the other speech recognition applications. If you call this application but end up wanting to recognize more speech, you must call SpeechCreate() again before calling any other application. + Hangs up the channel on failure. If this is not desired, use TryExec. @@ -153,6 +160,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$"); Load a grammar only on the channel, not globally. + Hangs up the channel on failure. If this is not desired, use TryExec. @@ -164,6 +172,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$"); Unload a grammar. + Hangs up the channel on failure. If this is not desired, use TryExec.