diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c index 1d15a06..193d8b6 100644 --- a/apps/app_voicemail.c +++ b/apps/app_voicemail.c @@ -4790,7 +4790,7 @@ static int open_mailbox(struct vm_state *vms, struct ast_vm_user *vmu,int box) snprintf(vms->vmbox, sizeof(vms->vmbox), "vm-%s", vms->curbox); /* Faster to make the directory than to check if it exists. */ - create_dirpath(vms->curdir, sizeof(vms->curdir), vmu->context, vms->username, vms->curbox); + create_dirpath(vms->curdir, sizeof(vms->curdir), vmu->context, vmu->mailbox, vms->curbox); count_msg = count_messages(vmu, vms->curdir); if (count_msg < 0)