[Freeswitch-svn] [commit] r9496 - in freeswitch/trunk/src: . mod/applications/mod_conference mod/applications/mod_voicemail

Freeswitch SVN anthm at freeswitch.org
Tue Sep 9 14:24:14 EDT 2008


Author: anthm
Date: Tue Sep  9 14:24:13 2008
New Revision: 9496

Modified:
   freeswitch/trunk/src/mod/applications/mod_conference/mod_conference.c
   freeswitch/trunk/src/mod/applications/mod_voicemail/mod_voicemail.c
   freeswitch/trunk/src/switch_channel.c
   freeswitch/trunk/src/switch_ivr_play_say.c

Log:
cleanup

Modified: freeswitch/trunk/src/mod/applications/mod_conference/mod_conference.c
==============================================================================
--- freeswitch/trunk/src/mod/applications/mod_conference/mod_conference.c	(original)
+++ freeswitch/trunk/src/mod/applications/mod_conference/mod_conference.c	Tue Sep  9 14:24:13 2008
@@ -4372,6 +4372,9 @@
 															 buf,
 															 sizeof(pin_buf) - strlen(pin_buf),
 															 strlen(conference->pin) - strlen(pin_buf), "#", &term, 10000, 0, 0);
+					if (status == SWITCH_STATUS_TIMEOUT) {
+						status = SWITCH_STATUS_SUCCESS;
+					}
 				}
 
 				pin_valid = (status == SWITCH_STATUS_SUCCESS && strcmp(pin_buf, conference->pin) == 0);

Modified: freeswitch/trunk/src/mod/applications/mod_voicemail/mod_voicemail.c
==============================================================================
--- freeswitch/trunk/src/mod/applications/mod_voicemail/mod_voicemail.c	(original)
+++ freeswitch/trunk/src/mod/applications/mod_voicemail/mod_voicemail.c	Tue Sep  9 14:24:13 2008
@@ -929,8 +929,12 @@
 	if (maxlen == 0 || maxlen > buflen - 1) {
 		maxlen = buflen - 1;
 	}
+
 	if (bslen < maxlen) {
 		status = switch_ivr_collect_digits_count(session, buf + bslen, buflen, maxlen - bslen, term_chars, terminator_key, timeout, 0, 0);
+		if (status == SWITCH_STATUS_TIMEOUT) {
+			status = SWITCH_STATUS_SUCCESS;
+		}
 	}
 
 	return status;

Modified: freeswitch/trunk/src/switch_channel.c
==============================================================================
--- freeswitch/trunk/src/switch_channel.c	(original)
+++ freeswitch/trunk/src/switch_channel.c	Tue Sep  9 14:24:13 2008
@@ -1482,6 +1482,7 @@
 
 	if (status == SWITCH_STATUS_SUCCESS) {
 		switch_channel_perform_mark_pre_answered(channel, file, func, line);
+		status = switch_ivr_sleep(channel->session, 250, NULL);
 	} else {
 		switch_channel_hangup(channel, SWITCH_CAUSE_INCOMPATIBLE_DESTINATION);
 	}
@@ -1598,10 +1599,13 @@
 
 	if (status == SWITCH_STATUS_SUCCESS) {
 		switch_channel_perform_mark_answered(channel, file, func, line);
+		status = switch_ivr_sleep(channel->session, 250, NULL);
 	} else {
 		switch_channel_hangup(channel, SWITCH_CAUSE_INCOMPATIBLE_DESTINATION);
 	}
 
+
+	
 	return status;
 }
 

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	Tue Sep  9 14:24:13 2008
@@ -101,6 +101,8 @@
 	switch_channel_t *channel = switch_core_session_get_channel(session);
 	uint8_t done = 0;
 	int matches = 0;
+	const char *pause_val;
+	int pause = 100;
 
 	if (!macro_name) {
 		switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "No phrase macro specified.\n");
@@ -182,7 +184,7 @@
 		old_sound_prefix = p;
 		switch_channel_set_variable(channel, "sound_prefix", sound_path);
 	}
-
+	
 	if (!(macro = switch_xml_child(language, "macro"))) {
 		switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "can't find any macro tags.\n");
 		goto done;
@@ -200,6 +202,13 @@
 		goto done;
 	}
 
+	if ((pause_val = switch_xml_attr(macro, "pause"))) {
+		int tmp = atoi(pause_val);
+		if (tmp >= 0) {
+			pause = tmp;
+		}
+	}
+
 	if (!(input = switch_xml_child(macro, "input"))) {
 		switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "can't find any input tags.\n");
 		goto done;
@@ -316,6 +325,8 @@
 							status = switch_ivr_speak_text(session, my_tts_engine, my_tts_voice, odata, args);
 						}
 					}
+
+					switch_ivr_sleep(session, pause, NULL);
 				}
 			}
 
@@ -1497,7 +1508,10 @@
 
 		/* Try to grab some more digits for the timeout period */
 		status = switch_ivr_collect_digits_count(session, digit_buffer, digit_buffer_length, max_digits, valid_terminators, &terminator, timeout, 0, 0);
-
+		if (status == SWITCH_STATUS_TIMEOUT) {
+			status = SWITCH_STATUS_SUCCESS;
+		}
+		
 		/* Make sure we made it out alive */
 		if (status != SWITCH_STATUS_SUCCESS) {
 			/* Bail */



More information about the Freeswitch-svn mailing list