Merged revisions 7999 via svnmerge from
authorTilghman Lesher <tilghman@meg.abyt.es>
Thu, 12 Jan 2006 06:15:56 +0000 (06:15 +0000)
committerTilghman Lesher <tilghman@meg.abyt.es>
Thu, 12 Jan 2006 06:15:56 +0000 (06:15 +0000)
/branches/1.2

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8000 65c4cc65-6c06-0410-ace0-fbb531ad65f3

apps/app_voicemail.c
configs/voicemail.conf.sample

index 76407d0..4950e36 100644 (file)
@@ -451,7 +451,7 @@ static void apply_option(struct ast_vm_user *vmu, const char *var, const char *v
                ast_copy_string(vmu->language, value, sizeof(vmu->language));
        } else if (!strcasecmp(var, "tz")) {
                ast_copy_string(vmu->zonetag, value, sizeof(vmu->zonetag));
                ast_copy_string(vmu->language, value, sizeof(vmu->language));
        } else if (!strcasecmp(var, "tz")) {
                ast_copy_string(vmu->zonetag, value, sizeof(vmu->zonetag));
-       } else if (!strcasecmp(var, "delete")) {
+       } else if (!strcasecmp(var, "delete") || !strcasecmp(var, "deletevoicemail")) {
                ast_set2_flag(vmu, ast_true(value), VM_DELETE); 
        } else if (!strcasecmp(var, "saycid")){
                ast_set2_flag(vmu, ast_true(value), VM_SAYCID); 
                ast_set2_flag(vmu, ast_true(value), VM_DELETE); 
        } else if (!strcasecmp(var, "saycid")){
                ast_set2_flag(vmu, ast_true(value), VM_SAYCID); 
@@ -2593,8 +2593,8 @@ static int leave_voicemail(struct ast_channel *chan, char *ext, struct leave_vm_
                                }
                        }
                        if (ast_fileexists(fn, NULL, NULL)) {
                                }
                        }
                        if (ast_fileexists(fn, NULL, NULL)) {
-                               notify_new_message(chan, vmu, msgnum, duration, fmt, chan->cid.cid_num, chan->cid.cid_name);
                                STORE(dir, vmu->mailbox, vmu->context, msgnum);
                                STORE(dir, vmu->mailbox, vmu->context, msgnum);
+                               notify_new_message(chan, vmu, msgnum, duration, fmt, chan->cid.cid_num, chan->cid.cid_name);
                                DISPOSE(dir, msgnum);
                        }
                        pbx_builtin_setvar_helper(chan, "VMSTATUS", "SUCCESS");
                                DISPOSE(dir, msgnum);
                        }
                        pbx_builtin_setvar_helper(chan, "VMSTATUS", "SUCCESS");
index 8558235..fa362c9 100644 (file)
@@ -172,6 +172,7 @@ sendvoicemail=yes   ; Context to Send voicemail from [option 5 from the advanced m
                        ;     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]
                        ;     This is intended for use with users who wish to receive their voicemail ONLY by email.
                        ;     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]
                        ;     This is intended for use with users who wish to receive their voicemail ONLY by email.
+                       ;     Note:  deletevoicemail is provided as an equivalent option for Realtime configuration.
 ; nextaftercmd=yes     ; Skips to the next message after hitting 7 or 9 to delete/save current message.
                        ;     [global option only at this time] 
 ; forcename=yes                ; Forces a new user to record their name.  A new user is
 ; nextaftercmd=yes     ; Skips to the next message after hitting 7 or 9 to delete/save current message.
                        ;     [global option only at this time] 
 ; forcename=yes                ; Forces a new user to record their name.  A new user is