[Freeswitch-svn] [commit] r10395 - in freeswitch/trunk/src: . include mod/languages/mod_managed mod/languages/mod_managed/managed

FreeSWITCH SVN anthm at freeswitch.org
Thu Nov 13 18:59:01 PST 2008


Author: anthm
Date: Thu Nov 13 21:59:00 2008
New Revision: 10395

Log:
tweak

Modified:
   freeswitch/trunk/src/include/switch_ivr.h
   freeswitch/trunk/src/mod/languages/mod_managed/freeswitch_wrap.cxx
   freeswitch/trunk/src/mod/languages/mod_managed/managed/swig.cs
   freeswitch/trunk/src/switch_ivr_play_say.c

Modified: freeswitch/trunk/src/include/switch_ivr.h
==============================================================================
--- freeswitch/trunk/src/include/switch_ivr.h	(original)
+++ freeswitch/trunk/src/include/switch_ivr.h	Thu Nov 13 21:59:00 2008
@@ -355,7 +355,7 @@
 														   uint32_t timeout,
 														   char *valid_terminators,
 														   char *audio_file,
-														   char *bad_input_audio_file, void *digit_buffer, uint32_t digit_buffer_length,
+														   char *bad_input_audio_file, char *digit_buffer, uint32_t digit_buffer_length,
 														   char *digits_regex);
 
 SWITCH_DECLARE(switch_status_t) switch_ivr_speak_text_handle(switch_core_session_t *session,

Modified: freeswitch/trunk/src/mod/languages/mod_managed/freeswitch_wrap.cxx
==============================================================================
--- freeswitch/trunk/src/mod/languages/mod_managed/freeswitch_wrap.cxx	(original)
+++ freeswitch/trunk/src/mod/languages/mod_managed/freeswitch_wrap.cxx	Thu Nov 13 21:59:00 2008
@@ -20047,7 +20047,7 @@
 }
 
 
-SWIGEXPORT int SWIGSTDCALL CSharp_switch_play_and_get_digits(void * jarg1, unsigned long jarg2, unsigned long jarg3, unsigned long jarg4, unsigned long jarg5, char * jarg6, char * jarg7, char * jarg8, void * jarg9, unsigned long jarg10, char * jarg11) {
+SWIGEXPORT int SWIGSTDCALL CSharp_switch_play_and_get_digits(void * jarg1, unsigned long jarg2, unsigned long jarg3, unsigned long jarg4, unsigned long jarg5, char * jarg6, char * jarg7, char * jarg8, char * jarg9, unsigned long jarg10, char * jarg11) {
   int jresult ;
   switch_core_session_t *arg1 = (switch_core_session_t *) 0 ;
   uint32_t arg2 ;
@@ -20057,7 +20057,7 @@
   char *arg6 = (char *) 0 ;
   char *arg7 = (char *) 0 ;
   char *arg8 = (char *) 0 ;
-  void *arg9 = (void *) 0 ;
+  char *arg9 = (char *) 0 ;
   uint32_t arg10 ;
   char *arg11 = (char *) 0 ;
   switch_status_t result;
@@ -20070,7 +20070,7 @@
   arg6 = (char *)jarg6; 
   arg7 = (char *)jarg7; 
   arg8 = (char *)jarg8; 
-  arg9 = (void *)jarg9; 
+  arg9 = (char *)jarg9; 
   arg10 = (uint32_t)jarg10; 
   arg11 = (char *)jarg11; 
   result = (switch_status_t)switch_play_and_get_digits(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11);
@@ -22888,17 +22888,19 @@
 }
 
 
-SWIGEXPORT int SWIGSTDCALL CSharp_switch_xml_bind_search_function(void * jarg1, unsigned long jarg2, void * jarg3) {
+SWIGEXPORT int SWIGSTDCALL CSharp_switch_xml_bind_search_function_ret(void * jarg1, unsigned long jarg2, void * jarg3, void * jarg4) {
   int jresult ;
   switch_xml_search_function_t arg1 = (switch_xml_search_function_t) 0 ;
   switch_xml_section_t arg2 ;
   void *arg3 = (void *) 0 ;
+  switch_xml_binding_t **arg4 = (switch_xml_binding_t **) 0 ;
   switch_status_t result;
   
   arg1 = (switch_xml_search_function_t)jarg1; 
   arg2 = (switch_xml_section_t)jarg2; 
   arg3 = (void *)jarg3; 
-  result = (switch_status_t)switch_xml_bind_search_function(arg1,arg2,arg3);
+  arg4 = (switch_xml_binding_t **)jarg4; 
+  result = (switch_status_t)switch_xml_bind_search_function_ret(arg1,arg2,arg3,arg4);
   jresult = result; 
   return jresult;
 }

Modified: freeswitch/trunk/src/mod/languages/mod_managed/managed/swig.cs
==============================================================================
--- freeswitch/trunk/src/mod/languages/mod_managed/managed/swig.cs	(original)
+++ freeswitch/trunk/src/mod/languages/mod_managed/managed/swig.cs	Thu Nov 13 21:59:00 2008
@@ -2938,8 +2938,8 @@
     return ret;
   }
 
-  public static switch_status_t switch_play_and_get_digits(SWIGTYPE_p_switch_core_session session, uint min_digits, uint max_digits, uint max_tries, uint timeout, string valid_terminators, string audio_file, string bad_input_audio_file, SWIGTYPE_p_void digit_buffer, uint digit_buffer_length, string digits_regex) {
-    switch_status_t ret = (switch_status_t)freeswitchPINVOKE.switch_play_and_get_digits(SWIGTYPE_p_switch_core_session.getCPtr(session), min_digits, max_digits, max_tries, timeout, valid_terminators, audio_file, bad_input_audio_file, SWIGTYPE_p_void.getCPtr(digit_buffer), digit_buffer_length, digits_regex);
+  public static switch_status_t switch_play_and_get_digits(SWIGTYPE_p_switch_core_session session, uint min_digits, uint max_digits, uint max_tries, uint timeout, string valid_terminators, string audio_file, string bad_input_audio_file, string digit_buffer, uint digit_buffer_length, string digits_regex) {
+    switch_status_t ret = (switch_status_t)freeswitchPINVOKE.switch_play_and_get_digits(SWIGTYPE_p_switch_core_session.getCPtr(session), min_digits, max_digits, max_tries, timeout, valid_terminators, audio_file, bad_input_audio_file, digit_buffer, digit_buffer_length, digits_regex);
     return ret;
   }
 
@@ -3632,8 +3632,8 @@
     return ret;
   }
 
-  public static switch_status_t switch_xml_bind_search_function(SWIGTYPE_p_f_p_q_const__char_p_q_const__char_p_q_const__char_p_q_const__char_p_switch_event_t_p_void__p_switch_xml function, uint sections, SWIGTYPE_p_void user_data) {
-    switch_status_t ret = (switch_status_t)freeswitchPINVOKE.switch_xml_bind_search_function(SWIGTYPE_p_f_p_q_const__char_p_q_const__char_p_q_const__char_p_q_const__char_p_switch_event_t_p_void__p_switch_xml.getCPtr(function), sections, SWIGTYPE_p_void.getCPtr(user_data));
+  public static switch_status_t switch_xml_bind_search_function_ret(SWIGTYPE_p_f_p_q_const__char_p_q_const__char_p_q_const__char_p_q_const__char_p_switch_event_t_p_void__p_switch_xml function, uint sections, SWIGTYPE_p_void user_data, SWIGTYPE_p_p_switch_xml_binding ret) {
+    switch_status_t ret = (switch_status_t)freeswitchPINVOKE.switch_xml_bind_search_function_ret(SWIGTYPE_p_f_p_q_const__char_p_q_const__char_p_q_const__char_p_q_const__char_p_switch_event_t_p_void__p_switch_xml.getCPtr(function), sections, SWIGTYPE_p_void.getCPtr(user_data), SWIGTYPE_p_p_switch_xml_binding.getCPtr(ret));
     return ret;
   }
 
@@ -8911,7 +8911,7 @@
   public static extern int switch_ivr_record_file(HandleRef jarg1, HandleRef jarg2, string jarg3, HandleRef jarg4, uint jarg5);
 
   [DllImport("mod_managed", EntryPoint="CSharp_switch_play_and_get_digits")]
-  public static extern int switch_play_and_get_digits(HandleRef jarg1, uint jarg2, uint jarg3, uint jarg4, uint jarg5, string jarg6, string jarg7, string jarg8, HandleRef jarg9, uint jarg10, string jarg11);
+  public static extern int switch_play_and_get_digits(HandleRef jarg1, uint jarg2, uint jarg3, uint jarg4, uint jarg5, string jarg6, string jarg7, string jarg8, string jarg9, uint jarg10, string jarg11);
 
   [DllImport("mod_managed", EntryPoint="CSharp_switch_ivr_speak_text_handle")]
   public static extern int switch_ivr_speak_text_handle(HandleRef jarg1, HandleRef jarg2, HandleRef jarg3, HandleRef jarg4, string jarg5, HandleRef jarg6);
@@ -9501,8 +9501,8 @@
   [DllImport("mod_managed", EntryPoint="CSharp_switch_xml_open_cfg")]
   public static extern IntPtr switch_xml_open_cfg(string jarg1, HandleRef jarg2, HandleRef jarg3);
 
-  [DllImport("mod_managed", EntryPoint="CSharp_switch_xml_bind_search_function")]
-  public static extern int switch_xml_bind_search_function(HandleRef jarg1, uint jarg2, HandleRef jarg3);
+  [DllImport("mod_managed", EntryPoint="CSharp_switch_xml_bind_search_function_ret")]
+  public static extern int switch_xml_bind_search_function_ret(HandleRef jarg1, uint jarg2, HandleRef jarg3, HandleRef jarg4);
 
   [DllImport("mod_managed", EntryPoint="CSharp_switch_xml_unbind_search_function")]
   public static extern int switch_xml_unbind_search_function(HandleRef jarg1);

Modified: freeswitch/trunk/src/switch_ivr_play_say.c
==============================================================================
--- freeswitch/trunk/src/switch_ivr_play_say.c	(original)
+++ freeswitch/trunk/src/switch_ivr_play_say.c	Thu Nov 13 21:59:00 2008
@@ -1456,7 +1456,7 @@
 														   char *valid_terminators,
 														   char *prompt_audio_file,
 														   char *bad_input_audio_file, 
-														   void *digit_buffer, 
+														   char *digit_buffer, 
 														   uint32_t digit_buffer_length,
 														   char *digits_regex)
 {
@@ -1469,6 +1469,11 @@
 		switch_channel_flush_dtmf(channel);
 		status = switch_ivr_read(session, min_digits, max_digits, prompt_audio_file, NULL, 
 												 digit_buffer, digit_buffer_length, timeout, valid_terminators);
+
+		if (status == SWITCH_STATUS_TIMEOUT && strlen(digit_buffer) >= min_digits) {
+			status = SWITCH_STATUS_SUCCESS;
+		}
+
 		if (status == SWITCH_STATUS_SUCCESS) {
 			if (!switch_strlen_zero((char *)digit_buffer)) {
 				if (switch_strlen_zero(digits_regex)) {



More information about the Freeswitch-svn mailing list