mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-20 16:50:14 +00:00
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: https://origsvn.digium.com/svn/asterisk/trunk@40426 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -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));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user