diff options
author | Mark Michelson <mmichelson@digium.com> | 2008-07-07 20:28:33 +0000 |
---|---|---|
committer | Mark Michelson <mmichelson@digium.com> | 2008-07-07 20:28:33 +0000 |
commit | 742815875d0945222f87022c5cedbb211eee64c4 (patch) | |
tree | 9d0e1a258d2822515bcf84e0651099a5ec0d9962 /apps | |
parent | 04a10e77a0f86de3bb7854a872b12fecc101d183 (diff) |
If imapfolder=foo were set in voicemail.conf, then when calling VoiceMailMain,
app_voicemail would attempt to play a file called vm-foo instead of playing
vm-INBOX to play the "new" sound file. This commit fixes that issue.
This may fix one of the problems reported in issue #12987
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@128731 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'apps')
-rw-r--r-- | apps/app_voicemail.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c index 53f189d1a..75f4131a2 100644 --- a/apps/app_voicemail.c +++ b/apps/app_voicemail.c @@ -5918,10 +5918,14 @@ static void imap_mailbox_name(char *spec, size_t len, struct vm_state *vms, int if (box == OLD_FOLDER) { ast_copy_string(vms->curbox, mbox(NEW_FOLDER), sizeof(vms->curbox)); - snprintf(vms->vmbox, sizeof(vms->vmbox), "vm-%s", mbox(1)); } else { ast_copy_string(vms->curbox, mbox(box), sizeof(vms->curbox)); - snprintf(vms->vmbox, sizeof(vms->vmbox), "vm-%s", vms->curbox); + } + + if (box == NEW_FOLDER) { + ast_copy_string(vms->vmbox, "vm-INBOX", sizeof(vm->vmbox)); + } else { + snprintf(vms->vmbox, sizeof(vm->vmbox), "vm-%s", mbox(box)); } /* Build up server information */ |