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

FreeSWITCH SVN anthm at freeswitch.org
Mon Mar 30 09:48:44 PDT 2009


Author: anthm
Date: Mon Mar 30 11:48:44 2009
New Revision: 12840

Log:
add read_terminator_used var

Modified:
   freeswitch/trunk/src/include/switch_types.h
   freeswitch/trunk/src/switch_ivr_play_say.c

Modified: freeswitch/trunk/src/include/switch_types.h
==============================================================================
--- freeswitch/trunk/src/include/switch_types.h	(original)
+++ freeswitch/trunk/src/include/switch_types.h	Mon Mar 30 11:48:44 2009
@@ -110,6 +110,7 @@
 #define SWITCH_PATH_SEPARATOR "/"
 #endif
 #define SWITCH_URL_SEPARATOR "://"
+#define SWITCH_READ_TERMINATOR_USED_VARIABLE "read_terminator_used"
 #define SWITCH_SEND_SILENCE_WHEN_IDLE_VARIABLE "send_silence_when_idle"
 #define SWITCH_CURRENT_APPLICATION_VARIABLE "current_application"
 #define SWITCH_CURRENT_APPLICATION_DATA_VARIABLE "current_application_data"

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	Mon Mar 30 11:48:44 2009
@@ -1446,8 +1446,8 @@
 	switch_channel_t *channel;
 	switch_input_args_t args = { 0 };
 	switch_status_t status = SWITCH_STATUS_SUCCESS;
-	char terminator;
 	size_t len = 0;
+	char tb[2] = "";
 
 	switch_assert(session);
 
@@ -1488,7 +1488,12 @@
 	if ((min_digits && len < min_digits) || len < max_digits) {
 		args.buf = digit_buffer + len;
 		args.buflen = (uint32_t) (digit_buffer_length - len);
-		status = switch_ivr_collect_digits_count(session, digit_buffer, digit_buffer_length, max_digits, valid_terminators, &terminator, timeout, 0, 0);
+		status = switch_ivr_collect_digits_count(session, digit_buffer, digit_buffer_length, max_digits, valid_terminators, &tb[0], timeout, 0, 0);
+	}
+
+
+	if (tb[0]) {
+		switch_channel_set_variable(channel, SWITCH_READ_TERMINATOR_USED_VARIABLE, tb);
 	}
 
 	len = strlen(digit_buffer);



More information about the Freeswitch-trunk mailing list