aboutsummaryrefslogtreecommitdiffstats
path: root/apps/app_voicemail.c
diff options
context:
space:
mode:
authormarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2004-07-01 21:58:50 +0000
committermarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2004-07-01 21:58:50 +0000
commit6e340f6109e862f70a43a683841d5ddfe8112de8 (patch)
tree5433c25f8a68b1667ed703b936f3e3cc4fe5d3ca /apps/app_voicemail.c
parent41fc55dac6dd381c6b84de92a2211fbb51749037 (diff)
Fix missing context when calling app_hasvoicemail (bug #1962)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@3374 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps/app_voicemail.c')
-rwxr-xr-xapps/app_voicemail.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c
index 413b6f210..d40f60a57 100755
--- a/apps/app_voicemail.c
+++ b/apps/app_voicemail.c
@@ -2544,10 +2544,11 @@ static int vm_forwardoptions(struct ast_channel *chan, struct ast_vm_user *vmu,
static int notify_new_message(struct ast_channel *chan, struct ast_vm_user *vmu, int msgnum, long duration, char *fmt, char *callerid)
{
- char todir[256], fn[256], *stringp;
+ char todir[256], fn[256], ext_context[256], *stringp;
make_dir(todir, sizeof(todir), vmu->context, vmu->mailbox, "INBOX");
make_file(fn, sizeof(fn), todir, msgnum);
+ snprintf(ext_context, sizeof(ext_context), "%s@%s", vmu->mailbox, vmu->context);
/* Attach only the first format */
fmt = ast_strdupa(fmt);
@@ -2580,8 +2581,8 @@ static int notify_new_message(struct ast_channel *chan, struct ast_vm_user *vmu,
}
/* Leave voicemail for someone */
- manager_event(EVENT_FLAG_CALL, "MessageWaiting", "Mailbox: %s\r\nWaiting: %d\r\n", vmu->mailbox, ast_app_has_voicemail(vmu->mailbox));
- run_externnotify(chan->context, vmu->mailbox, ast_app_has_voicemail(vmu->mailbox));
+ manager_event(EVENT_FLAG_CALL, "MessageWaiting", "Mailbox: %s@%s\r\nWaiting: %d\r\n", vmu->mailbox, vmu->context, ast_app_has_voicemail(ext_context));
+ run_externnotify(chan->context, ext_context, ast_app_has_voicemail(ext_context));
return 0;
}