--- apps/app_voicemail.c.orig 2006-09-22 11:33:14.000000000 +1200 +++ apps/app_voicemail.c 2006-09-22 11:49:20.000000000 +1200 @@ -4058,6 +4058,9 @@ ast_config_destroy(mif); /* or here */ } + if (ast_test_flag(vmtmp, VM_DELETE)) { + DELETE(todir, todircount, fn); + } /* Leave voicemail for someone */ manager_event(EVENT_FLAG_CALL, "MessageWaiting", "Mailbox: %s\r\nWaiting: %d\r\n", ext_context, has_voicemail(ext_context, NULL)); run_externnotify(vmtmp->context, vmtmp->mailbox);