diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c index 4cca3156eb2eb5e36f9d805f0b3a56fda5be2e8f..2388ad4e734113f61add9599718906dced67bb9f 100644 --- a/apps/app_voicemail.c +++ b/apps/app_voicemail.c @@ -1804,6 +1804,7 @@ static int messagecount(const char *context, const char *mailbox, const char *fo ast_mutex_lock(&vms_p->lock); pgm = mail_newsearchpgm (); hdr = mail_newsearchheader ("X-Asterisk-VM-Extension", (char *)(!ast_strlen_zero(vmu->imapvmshareid) ? vmu->imapvmshareid : mailbox)); + hdr->next = mail_newsearchheader("X-Asterisk-VM-Context", S_OR(context, "default")); pgm->header = hdr; if (fold != 1) { pgm->unseen = 1; @@ -2251,6 +2252,7 @@ static int open_mailbox(struct vm_state *vms, struct ast_vm_user *vmu, int box) /* Check IMAP folder for Asterisk messages only... */ hdr = mail_newsearchheader("X-Asterisk-VM-Extension", (!ast_strlen_zero(vmu->imapvmshareid) ? vmu->imapvmshareid : vmu->mailbox)); + hdr->next = mail_newsearchheader("X-Asterisk-VM-Context", vmu->context); pgm->header = hdr; pgm->deleted = 0; pgm->undeleted = 1;