Skip to content
Snippets Groups Projects
Commit 39820e35 authored by Naveen Albert's avatar Naveen Albert Committed by Friendly Automation
Browse files

app_voicemail: Emit warning if asking for nonexistent mailbox.

Currently, if VoiceMailMain is called with a mailbox, if that
mailbox doesn't exist, then the application silently falls back
to prompting the user for the mailbox, as if no arguments were
provided.

However, if a specific mailbox is requested and it doesn't exist,
then no warning at all is emitted.

This fixes this behavior to now warn if a specifically
requested mailbox could not be accessed, before falling back to
prompting the user for the correct mailbox.

ASTERISK-29920 #close

Change-Id: Ib4093b88cd661a2cabc5d685777d4e2f0ebd20a4
parent a2aa881d
No related branches found
No related tags found
3 merge requests!138Merge branch asterisk-20.3.0 into devel properly,!123Merge asterisk '20.3.0' into devel,!118Draft: manager: AOC-S support for AOCMessage
...@@ -11512,10 +11512,16 @@ static int vm_execmain(struct ast_channel *chan, const char *data) ...@@ -11512,10 +11512,16 @@ static int vm_execmain(struct ast_channel *chan, const char *data)
else else
ast_copy_string(vms.username, args.argv0, sizeof(vms.username)); ast_copy_string(vms.username, args.argv0, sizeof(vms.username));
   
if (!ast_strlen_zero(vms.username) && (vmu = find_user(&vmus, context ,vms.username))) if (!ast_strlen_zero(vms.username)) {
skipuser++; if ((vmu = find_user(&vmus, context ,vms.username))) {
else skipuser++;
} else {
ast_log(LOG_WARNING, "Mailbox '%s%s%s' doesn't exist\n", vms.username, context ? "@": "", context ? context : "");
valid = 0;
}
} else {
valid = 0; valid = 0;
}
} }
   
if (!valid) if (!valid)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment