From: Joshua Colp Date: Tue, 16 May 2006 23:31:56 +0000 (+0000) Subject: Inherit channel variables during call forwards when going through chan_local (issue... X-Git-Tag: 1.2.9.1~70 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=961bcfe98c879062d83abcc2b9f57e550112cc69;p=thirdparty%2Fasterisk.git Inherit channel variables during call forwards when going through chan_local (issue #7095 reported by raarts) git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@27594 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/apps/app_dial.c b/apps/app_dial.c index 88f147a7c2..3bfa91165b 100644 --- a/apps/app_dial.c +++ b/apps/app_dial.c @@ -471,6 +471,8 @@ static struct ast_channel *wait_for_answer(struct ast_channel *in, struct localu o->chan = ast_request(tech, in->nativeformats, stuff, &cause); if (!o->chan) ast_log(LOG_NOTICE, "Unable to create local channel for call forward to '%s/%s' (cause = %d)\n", tech, stuff, cause); + else + ast_channel_inherit_variables(in, o->chan); } else { if (option_verbose > 2) ast_verbose(VERBOSE_PREFIX_3 "Too many forwards from %s\n", o->chan->name); @@ -1060,6 +1062,8 @@ static int dial_exec_full(struct ast_channel *chan, void *data, struct ast_flags tmp->chan = ast_request(tech, chan->nativeformats, stuff, &cause); if (!tmp->chan) ast_log(LOG_NOTICE, "Unable to create local channel for call forward to '%s/%s' (cause = %d)\n", tech, stuff, cause); + else + ast_channel_inherit_variables(chan, tmp->chan); } else { if (option_verbose > 2) ast_verbose(VERBOSE_PREFIX_3 "Too many forwards from %s\n", tmp->chan->name);