]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
app_voicemail: Fix Channel variable VM_MESSAGEFILE for "urgent" voicemail
authorBryan Boatright <ast-bugs@omega71.com>
Wed, 2 Jan 2019 17:44:41 +0000 (11:44 -0600)
committerBryan Boatright <ast-bugs@omega71.com>
Wed, 2 Jan 2019 18:01:44 +0000 (12:01 -0600)
If a voicemail is marked "urgent" then the VM_MESSAGEFILE channel variable is
not updated correctly since urgent messages are in a different directory. The
fix is to update the channel variable when the path to the urgent message is
created.

ASTERISK-28225

Change-Id: I8efbace06e6122ea0793f7bdb073d4378e8274ca

apps/app_voicemail.c

index 1dd7aa0d07263315f53bd93203237849fca30e90..06b2720bf716f3f8046af676001deff37827b678 100644 (file)
@@ -7056,6 +7056,7 @@ static int leave_voicemail(struct ast_channel *chan, char *ext, struct leave_vm_
                                                RENAME(dir, msgnum, vmu->mailbox, vmu->context, urgdir, x, sfn, dfn);
                                                /* Notification must happen for this new message in Urgent folder, not INBOX */
                                                ast_copy_string(fn, dfn, sizeof(fn));
+                                               pbx_builtin_setvar_helper(chan, "VM_MESSAGEFILE", fn);
                                                msgnum = x;
                                        }
 #endif