From: Luke Dashjr Date: Mon, 23 Aug 2010 01:24:53 +0000 (-0500) Subject: MERGE: expose ASR start_input_timers to dialplan via IVR and mod_dptools X-Git-Tag: v1.2-rc1~171^2~22^2^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=92a9bacc44576e7b1d41c48752af597801e41d21;p=thirdparty%2Ffreeswitch.git MERGE: expose ASR start_input_timers to dialplan via IVR and mod_dptools --- 92a9bacc44576e7b1d41c48752af597801e41d21 diff --cc src/include/switch_ivr.h index 8641766760,692ad8d61b..f379f02030 --- a/src/include/switch_ivr.h +++ b/src/include/switch_ivr.h @@@ -199,31 -199,15 +199,38 @@@ SWITCH_DECLARE(switch_status_t) switch_ */ SWITCH_DECLARE(switch_status_t) switch_ivr_detect_speech_unload_grammar(switch_core_session_t *session, const char *name); +/*! + \brief Enable a grammar on a background speech detection handle + \param session The session to change the grammar on + \param name the grammar name + \return SWITCH_STATUS_SUCCESS if all is well +*/ +SWITCH_DECLARE(switch_status_t) switch_ivr_detect_speech_enable_grammar(switch_core_session_t *session, const char *name); + +/*! + \brief Disable a grammar on a background speech detection handle + \param session The session to change the grammar on + \param name the grammar name + \return SWITCH_STATUS_SUCCESS if all is well +*/ +SWITCH_DECLARE(switch_status_t) switch_ivr_detect_speech_disable_grammar(switch_core_session_t *session, const char *name); + +/*! + \brief Disable all grammars on a background speech detection handle + \param session The session to change the grammar on + \return SWITCH_STATUS_SUCCESS if all is well +*/ +SWITCH_DECLARE(switch_status_t) switch_ivr_detect_speech_disable_all_grammars(switch_core_session_t *session); + SWITCH_DECLARE(switch_status_t) switch_ivr_set_param_detect_speech(switch_core_session_t *session, const char *name, const char *val); + /*! + \brief Start input timers on a background speech detection handle + \param session The session to start the timers on + \return SWITCH_STATUS_SUCCESS if all is well + */ + SWITCH_DECLARE(switch_status_t) switch_ivr_detect_speech_start_input_timers(switch_core_session_t *session); + /*! \brief Record a session to disk \param session the session to record diff --cc src/mod/applications/mod_dptools/mod_dptools.c index f573661165,2f496300e8..fe089a6a50 --- a/src/mod/applications/mod_dptools/mod_dptools.c +++ b/src/mod/applications/mod_dptools/mod_dptools.c @@@ -96,7 -96,7 +96,7 @@@ SWITCH_STANDARD_DIALPLAN(inline_dialpla return extension; } - #define DETECT_SPEECH_SYNTAX " [] OR grammar [] OR nogrammar OR grammaron/grammaroff OR grammarsalloff OR pause OR resume OR stop OR param " -#define DETECT_SPEECH_SYNTAX " [] OR grammar [] OR pause OR resume OR start_input_timers" ++#define DETECT_SPEECH_SYNTAX " [] OR grammar [] OR nogrammar OR grammaron/grammaroff OR grammarsalloff OR pause OR resume OR start_input_timers OR stop OR param " SWITCH_STANDARD_APP(detect_speech_function) { char *argv[4];