]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
add MODAPP-37
authorAnthony Minessale <anthony.minessale@gmail.com>
Sat, 20 Oct 2007 00:10:54 +0000 (00:10 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Sat, 20 Oct 2007 00:10:54 +0000 (00:10 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@6005 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/mod/applications/mod_voicemail/mod_voicemail.c

index 9bc43ca258d71546dce18df1afdbbed2a74e611b..7ee302b802329d006f08387fca3d85633d1c30cf 100644 (file)
@@ -1548,7 +1548,11 @@ static switch_status_t voicemail_leave_main(switch_core_session_t *session, char
             }
         }
 
-        if(!send_mail) {
+        /* TRX a race condition exists where you hang up right as you start to record, the recording subsystem detects there isnt
+         * a channel and refuses to create the file, as a result you get DB entries and MWI entries when there is no voicemail saved
+         * message counts and other things get out of sync
+         */
+        if(!send_mail && switch_file_exists(file_path,switch_core_session_get_pool(session))==SWITCH_STATUS_SUCCESS) {
             char *usql;
             switch_event_t *event;
             char *mwi_id = NULL;