aboutsummaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authortilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2006-03-25 04:10:35 +0000
committertilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2006-03-25 04:10:35 +0000
commitfb985f324220da908a0a9ec9082571d1534a56b2 (patch)
treed026db5cd0931789eb0b06214c3dd5626b0adb77 /apps
parentf700d93bf8e9caa3f619c1e3d53b59f02886b455 (diff)
Merged revisions 14821 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r14821 | tilghman | 2006-03-24 22:09:04 -0600 (Fri, 24 Mar 2006) | 2 lines Bug 6783 - When context is specified, voicemail should look for mailboxes in that context ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@14822 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps')
-rw-r--r--apps/app_voicemail.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c
index ac182af02..928d7547d 100644
--- a/apps/app_voicemail.c
+++ b/apps/app_voicemail.c
@@ -3473,11 +3473,13 @@ static int forward_message(struct ast_channel *chan, char *context, char *dir, i
return res;
if (flag==1) {
struct leave_vm_options leave_options;
+ char mailbox[AST_MAX_EXTENSION * 2 + 2];
+ snprintf(mailbox, sizeof(mailbox), "%s@%s", username, context);
/* Send VoiceMail */
memset(&leave_options, 0, sizeof(leave_options));
leave_options.record_gain = record_gain;
- cmd = leave_voicemail(chan, username, &leave_options);
+ cmd = leave_voicemail(chan, mailbox, &leave_options);
} else {
/* Forward VoiceMail */
@@ -6635,13 +6637,15 @@ static int advanced_options(struct ast_channel *chan, struct ast_vm_user *vmu, s
} else {
if (find_user(NULL, vmu->context, num)) {
struct leave_vm_options leave_options;
+ char mailbox[AST_MAX_EXTENSION * 2 + 2];
+ snprintf(mailbox, sizeof(mailbox), "%s@%s", num, vmu->context);
if (option_verbose > 2)
ast_verbose(VERBOSE_PREFIX_3 "Leaving voicemail for '%s' in context '%s'\n", num, vmu->context);
memset(&leave_options, 0, sizeof(leave_options));
leave_options.record_gain = record_gain;
- res = leave_voicemail(chan, num, &leave_options);
+ res = leave_voicemail(chan, mailbox, &leave_options);
if (!res)
res = 't';
return res;