[Freeswitch-svn] [commit] r9639 - freeswitch/trunk/src/mod/applications/mod_voicemail

Freeswitch SVN anthm at freeswitch.org
Wed Sep 24 16:29:35 EDT 2008


Author: anthm
Date: Wed Sep 24 16:29:35 2008
New Revision: 9639

Modified:
   freeswitch/trunk/src/mod/applications/mod_voicemail/mod_voicemail.c

Log:
put menu passthrough code back by popular demand

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	Wed Sep 24 16:29:35 2008
@@ -1055,8 +1055,15 @@
 
 		while (switch_channel_ready(channel)) {
 			*input = '\0';
-			status = vm_macro_get(session, VM_RECORD_FILE_CHECK_MACRO, key_buf, input, sizeof(input), 1, "", &term, profile->digit_timeout);
 
+			if (*cc.buf && *cc.buf != *profile->terminator_key) {
+				*input = *cc.buf;
+				*(input + 1) = '\0';
+				status = SWITCH_STATUS_SUCCESS;
+				*cc.buf = '\0';
+			} else {
+				status = vm_macro_get(session, VM_RECORD_FILE_CHECK_MACRO, key_buf, input, sizeof(input), 1, "", &term, profile->digit_timeout);
+			}
 
 			if (!strcmp(input, profile->listen_file_key)) {
 				goto play_file;
@@ -1318,8 +1325,14 @@
 		}
 
 		if (switch_channel_ready(channel)) {
-
-			TRY_CODE(vm_macro_get(session, VM_LISTEN_FILE_CHECK_MACRO, key_buf, input, sizeof(input), 1, "", &term, profile->digit_timeout));
+			if (*cc.buf && *cc.buf != *profile->terminator_key) {
+				*input = *cc.buf;
+				*(input + 1) = '\0';
+				status = SWITCH_STATUS_SUCCESS;
+				*cc.buf = '\0';
+			} else {
+				TRY_CODE(vm_macro_get(session, VM_LISTEN_FILE_CHECK_MACRO, key_buf, input, sizeof(input), 1, "", &term, profile->digit_timeout));
+			}
 
 			if (!strcmp(input, profile->listen_file_key)) {
 				goto play_file;



More information about the Freeswitch-svn mailing list