]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
tweak
authorAnthony Minessale <anthony.minessale@gmail.com>
Fri, 14 Nov 2008 02:59:00 +0000 (02:59 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Fri, 14 Nov 2008 02:59:00 +0000 (02:59 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@10395 d0543943-73ff-0310-b7d9-9358b9ac24b2

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

index 6b9cc3ef162ff4bb75460e56efc2fde0c974c317..15ef7bef71de98ebca9b87fcccc1152283e35cff 100644 (file)
@@ -355,7 +355,7 @@ SWITCH_DECLARE(switch_status_t) switch_play_and_get_digits(switch_core_session_t
                                                                                                                   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,
index ef3035a9d400f65e1d9ed7f6e05e7888d5fbea34..647a3f0344619187a3ee65df0ea32b202f343ba5 100644 (file)
@@ -20047,7 +20047,7 @@ SWIGEXPORT int SWIGSTDCALL CSharp_switch_ivr_record_file(void * jarg1, void * ja
 }
 
 
-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 @@ SWIGEXPORT int SWIGSTDCALL CSharp_switch_play_and_get_digits(void * jarg1, unsig
   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 @@ SWIGEXPORT int SWIGSTDCALL CSharp_switch_play_and_get_digits(void * jarg1, unsig
   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 void * SWIGSTDCALL CSharp_switch_xml_open_cfg(char * jarg1, void * ja
 }
 
 
-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;
 }
index 2539dcfc557cb16b4100c794c23349789b62f3f4..7db7272abe0dfb9bfa9368275425c5d2418b4ce8 100644 (file)
@@ -2938,8 +2938,8 @@ public class freeswitch {
     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 @@ public class freeswitch {
     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 @@ class freeswitchPINVOKE {
   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 @@ class freeswitchPINVOKE {
   [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);
index 886ae422ed41e4c14f61d0b619e71999f31220bf..bc91aa843125d17bbaef14a3e4fc4cf9c671cdaf 100644 (file)
@@ -1456,7 +1456,7 @@ SWITCH_DECLARE(switch_status_t) switch_play_and_get_digits(switch_core_session_t
                                                                                                                   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_DECLARE(switch_status_t) switch_play_and_get_digits(switch_core_session_t
                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)) {