aboutsummaryrefslogtreecommitdiffstats
path: root/apps/app_voicemail.c
diff options
context:
space:
mode:
authorqwell <qwell@f38db490-d61c-443f-a65b-d21fe96a405b>2006-08-19 00:53:54 +0000
committerqwell <qwell@f38db490-d61c-443f-a65b-d21fe96a405b>2006-08-19 00:53:54 +0000
commitb7a22c9210d2ec4e1cd48aec08824ac984dbd088 (patch)
tree02b6ce452c13c9f721f8d604e3b5a1dd32ebc26c /apps/app_voicemail.c
parent58b98df732c92339173863e4bc521b24a09b1211 (diff)
Fix a bug with app_voicemail when trying to use app_directory to leave messages
to another user (options 3, 5, 2). If the context/extension didn't exist in the dialplan (and why should it have to?), it would fail, saying that it's an "invalid extension". (issue BE-71) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@40426 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps/app_voicemail.c')
-rw-r--r--apps/app_voicemail.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c
index 9952d4094..c6520ec75 100644
--- a/apps/app_voicemail.c
+++ b/apps/app_voicemail.c
@@ -3864,13 +3864,15 @@ static int forward_message(struct ast_channel *chan, char *context, struct vm_st
app = pbx_findapp("Directory");
if (app) {
- /* make mackup copies */
+ char vmcontext[256];
+ /* make backup copies */
memcpy(old_context, chan->context, sizeof(chan->context));
memcpy(old_exten, chan->exten, sizeof(chan->exten));
old_priority = chan->priority;
/* call the the Directory, changes the channel */
- res = pbx_exec(chan, app, context ? context : "default");
+ sprintf(vmcontext, "%s||v", context ? context : "default");
+ res = pbx_exec(chan, app, vmcontext);
ast_copy_string(username, chan->exten, sizeof(username));