]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
expose ASR start_input_timers on the IVR abstraction level
authorLuke Dashjr <luke@openmethods.com>
Sun, 22 Aug 2010 23:00:40 +0000 (18:00 -0500)
committerLuke Dashjr <luke@openmethods.com>
Sun, 22 Aug 2010 23:00:40 +0000 (18:00 -0500)
src/include/switch_ivr.h
src/switch_ivr_async.c

index 40ba1dc16f07b1ca9da8f0596aa9f27d09f2b952..692ad8d61b9eda073c307b867b17e22891fa5600 100644 (file)
@@ -26,6 +26,7 @@
  * Anthony Minessale II <anthm@freeswitch.org>
  * Neal Horman <neal at wanlink dot com>
  * Bret McDanel <trixter AT 0xdecafbad dot com>
+ * Luke Dashjr <luke@openmethods.com> (OpenMethods, LLC)
  *
  * switch_ivr.h -- IVR Library
  *
@@ -200,6 +201,13 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_detect_speech_unload_grammar(switch_c
 
 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
index 4fe5732f82ff7f63d7dbb7da4377894b7b4d6bda..ae23d0a9f4b0ad2375c26ac0998eff1fd1f2367e 100644 (file)
@@ -26,6 +26,7 @@
  * Anthony Minessale II <anthm@freeswitch.org>
  * Michael Jerris <mike@jerris.com>
  * Bret McDanel <bret AT 0xdecafbad dot com>
+ * Luke Dashjr <luke@openmethods.com> (OpenMethods, LLC)
  *
  * switch_ivr_async.c -- IVR Library (async operations)
  *
@@ -2728,6 +2729,18 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_set_param_detect_speech(switch_core_s
        return status;
 }
 
+SWITCH_DECLARE(switch_status_t) switch_ivr_detect_speech_start_input_timers(switch_core_session_t *session)
+{
+       switch_channel_t *channel = switch_core_session_get_channel(session);
+       struct speech_thread_handle *sth = switch_channel_get_private(channel, SWITCH_SPEECH_KEY);
+
+       if (sth) {
+               switch_core_asr_start_input_timers(sth->ah);
+               return SWITCH_STATUS_SUCCESS;
+       }
+       return SWITCH_STATUS_FALSE;
+}
+
 SWITCH_DECLARE(switch_status_t) switch_ivr_detect_speech_unload_grammar(switch_core_session_t *session, const char *name)
 {
        switch_channel_t *channel = switch_core_session_get_channel(session);