Index: apps/app_voicemail.c =================================================================== --- apps/app_voicemail.c (revision 88246) +++ apps/app_voicemail.c (working copy) @@ -2989,6 +2989,7 @@ char *context; char ecodes[16] = "#"; char tmp[1024] = "", *tmpptr; + char dbox[256]; struct ast_vm_user *vmu; struct ast_vm_user svm; const char *category = NULL; @@ -3182,6 +3183,11 @@ /* set variable for compatibility */ pbx_builtin_setvar_helper(chan, "VM_MESSAGEFILE", "IMAP_STORAGE"); + /* Check Quota */ + mail_parameters(NULL, SET_QUOTA, (void *) mm_parsequota); + imap_mailbox_name(dbox, sizeof(dbox), vms, 0, 1); + imap_getquotaroot(vms->mailstream, dbox); + /* Check if mailbox is full */ if (vms->quota_limit && vms->quota_usage >= vms->quota_limit) { ast_debug(1, "*** QUOTA EXCEEDED!! %u >= %u\n", vms->quota_usage, vms->quota_limit); @@ -4940,7 +4946,6 @@ SEARCHPGM *pgm; SEARCHHEADER *hdr; int ret; - char dbox[256]; ast_copy_string(vms->imapuser,vmu->imapuser, sizeof(vms->imapuser)); ast_debug(3,"Before init_mailstream, user is %s\n",vmu->imapuser);