[Freeswitch-svn] [commit] r8820 - in freeswitch/trunk/src: . include

Freeswitch SVN mikej at freeswitch.org
Mon Jun 23 12:31:09 EDT 2008


Author: mikej
Date: Mon Jun 23 12:31:09 2008
New Revision: 8820

Modified:
   freeswitch/trunk/src/include/switch_cpp.h
   freeswitch/trunk/src/switch_cpp.cpp

Log:
add inter digit timeout to swigged embedded languages getDigits method. (MODLANG-65)

Modified: freeswitch/trunk/src/include/switch_cpp.h
==============================================================================
--- freeswitch/trunk/src/include/switch_cpp.h	(original)
+++ freeswitch/trunk/src/include/switch_cpp.h	Mon Jun 23 12:31:09 2008
@@ -234,7 +234,7 @@
 	 * receiving dtmf digits.  For that, use collectDigits.
 	 */
 		 SWITCH_DECLARE(char *) getDigits(int maxdigits, char *terminators, int timeout);
-
+		 SWITCH_DECLARE(char *) getDigits(int maxdigits, char *terminators, int timeout, int interdigit = 0);
 		 SWITCH_DECLARE(int) transfer(char *extensions, char *dialplan, char *context);
 
 

Modified: freeswitch/trunk/src/switch_cpp.cpp
==============================================================================
--- freeswitch/trunk/src/switch_cpp.cpp	(original)
+++ freeswitch/trunk/src/switch_cpp.cpp	Mon Jun 23 12:31:09 2008
@@ -583,9 +583,15 @@
     return SWITCH_STATUS_SUCCESS;
 } 
 
+SWITCH_DECLARE(char *) CoreSession::getDigits(int maxdigits, char *terminators, int timeout)
+{
+    return getDigits(maxdigits, terminators, timeout, 0);
+}
+
 SWITCH_DECLARE(char *) CoreSession::getDigits(int maxdigits, 
 											  char *terminators, 
-											  int timeout)
+											  int timeout,
+											  int interdigit)
 {
     switch_status_t status;
 	this_check((char *)"");
@@ -600,7 +606,7 @@
 											 maxdigits, 
 											 terminators, 
 											 &terminator, 
-											 (uint32_t) timeout, 0, 0);
+											 (uint32_t) timeout, (uint32_t)interdigit, 0);
 
 	switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "getDigits dtmf_buf: %s\n", dtmf_buf);
 	end_allow_threads();



More information about the Freeswitch-svn mailing list