Index: apps/app_voicemail.c =================================================================== --- apps/app_voicemail.c (revision 7843) +++ apps/app_voicemail.c (working copy) @@ -447,6 +447,8 @@ ast_copy_string(vmu->zonetag, value, sizeof(vmu->zonetag)); } else if (!strcasecmp(var, "delete")) { ast_set2_flag(vmu, ast_true(value), VM_DELETE); + } else if (!strcasecmp(var, "deletesent")) { + ast_set2_flag(vmu, ast_true(value), VM_DELETE); } else if (!strcasecmp(var, "saycid")){ ast_set2_flag(vmu, ast_true(value), VM_SAYCID); } else if (!strcasecmp(var,"sendvoicemail")){ @@ -2613,8 +2615,8 @@ } } if (ast_fileexists(fn, NULL, NULL)) { + STORE(dir, vmu->mailbox, vmu->context, msgnum); notify_new_message(chan, vmu, msgnum, duration, fmt, chan->cid.cid_num, chan->cid.cid_name); - STORE(dir, vmu->mailbox, vmu->context, msgnum); DISPOSE(dir, msgnum); } pbx_builtin_setvar_helper(chan, "VMSTATUS", "SUCCESS"); Index: configs/voicemail.conf.sample =================================================================== --- configs/voicemail.conf.sample (revision 7843) +++ configs/voicemail.conf.sample (working copy) @@ -170,7 +170,7 @@ ; reach an operator [OFF by default] ; envelope=no ; Turn on/off envelope playback before message playback. [ON by default] ; This does NOT affect option 3,3 from the advanced options menu -; delete=yes ; After notification, the voicemail is deleted from the server. [per-mailbox only] +; deletesent=yes ; After notification, the voicemail is deleted from the server. [per-mailbox only] ; This is intended for use with users who wish to receive their voicemail ONLY by email. ; nextaftercmd=yes ; Skips to the next message after hitting 7 or 9 to delete/save current message. ; [global option only at this time]