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

Freeswitch SVN anthm at freeswitch.org
Sat Oct 13 10:43:23 EDT 2007


Author: anthm
Date: Sat Oct 13 10:43:22 2007
New Revision: 5872

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

Log:
tweak

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	Sat Oct 13 10:43:22 2007
@@ -482,6 +482,7 @@
     vm_profile_t *profile;
     switch_file_handle_t *fh;
     char buf[4];
+    int noexit;
 };
 typedef struct call_control cc_t;
 
@@ -497,13 +498,15 @@
             switch_file_handle_t *fh = cc->fh;
             uint32_t pos = 0;
 
-            if (*dtmf == *cc->profile->delete_file_key || *dtmf == *cc->profile->save_file_key) {
+            if (!cc->noexit && (*dtmf == *cc->profile->delete_file_key || *dtmf == *cc->profile->save_file_key || *dtmf == *cc->profile->terminator_key)) {
                 *cc->buf = *dtmf;
                 return SWITCH_STATUS_BREAK;
             }
+
             if (!fh) {
                 return SWITCH_STATUS_SUCCESS;
             }
+
             if (*dtmf == *cc->profile->pause_key) {
                 if (switch_test_flag(fh, SWITCH_FILE_PAUSE)) {
                     switch_clear_flag(fh, SWITCH_FILE_PAUSE);
@@ -532,9 +535,6 @@
                 return SWITCH_STATUS_SUCCESS;
             }
 
-            if (*dtmf == *cc->profile->terminator_key) {
-                return SWITCH_STATUS_BREAK;
-            }
         }
 		break;
 	default:
@@ -1181,6 +1181,7 @@
                         memset(&cc, 0, sizeof(cc));
                         cc.profile = profile;
                         cc.fh = &fh;
+                        cc.noexit = 1;
                         args.buf = &cc;
                         status = switch_ivr_play_file(session, NULL, file_path, &args);
                     }
@@ -1485,6 +1486,7 @@
     memset(&cc, 0, sizeof(cc));
     cc.profile = profile;
     cc.fh = &fh;
+    cc.noexit = 1;
     args.buf = &cc;
 
     if (!switch_strlen_zero(cbt.greeting_path)) {



More information about the Freeswitch-svn mailing list