diff --git a/apps/app_dial.c b/apps/app_dial.c index af5a877d2a..b82743bfd0 100644 --- a/apps/app_dial.c +++ b/apps/app_dial.c @@ -1591,8 +1591,10 @@ static int dial_exec_full(struct ast_channel *chan, void *data, struct ast_flags if (chan && peer && ast_test_flag64(&opts, OPT_GOTO) && !ast_strlen_zero(opt_args[OPT_ARG_GOTO])) { replace_macro_delimiter(opt_args[OPT_ARG_GOTO]); ast_parseable_goto(chan, opt_args[OPT_ARG_GOTO]); - ast_parseable_goto(peer, opt_args[OPT_ARG_GOTO]); - peer->priority++; + /* peer goes to the same context and extension as chan, so just copy info from chan*/ + ast_copy_string(peer->context, chan->context, sizeof(peer->context)); + ast_copy_string(peer->exten, chan->exten, sizeof(peer->exten)); + peer->priority = chan->priority + 2; ast_pbx_start(peer); hanguptree(outgoing, NULL, ast_test_flag64(&opts, OPT_CANCEL_ELSEWHERE) ? 1 : 0); if (continue_exec) diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c index 7e4045d3a9..7ceef6eb61 100644 --- a/apps/app_voicemail.c +++ b/apps/app_voicemail.c @@ -6956,9 +6956,7 @@ static int vm_execmain(struct ast_channel *chan, void *data) /* Set language from config to override channel language */ if (!ast_strlen_zero(vmu->language)) ast_string_field_set(chan, language, vmu->language); -#ifndef IMAP_STORAGE create_dirpath(vms.curdir, sizeof(vms.curdir), vmu->context, vms.username, ""); -#endif /* Retrieve old and new message counts */ ast_debug(1, "Before open_mailbox\n"); res = open_mailbox(&vms, vmu, OLD_FOLDER);