From b139d5eedb28ce367b56a801f642925ad687690d Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Sat, 20 Oct 2007 00:10:54 +0000 Subject: [PATCH] add MODAPP-37 git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@6005 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- src/mod/applications/mod_voicemail/mod_voicemail.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/mod/applications/mod_voicemail/mod_voicemail.c b/src/mod/applications/mod_voicemail/mod_voicemail.c index 9bc43ca258..7ee302b802 100644 --- a/src/mod/applications/mod_voicemail/mod_voicemail.c +++ b/src/mod/applications/mod_voicemail/mod_voicemail.c @@ -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;