aboutsummaryrefslogtreecommitdiffstats
path: root/channel.c
diff options
context:
space:
mode:
authorkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2005-11-01 21:11:57 +0000
committerkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2005-11-01 21:11:57 +0000
commita68250b79bf5358b7cf67bbd9185409a17993abc (patch)
tree9174292f27151eeb3b58254ab97faf9e9063b7f4 /channel.c
parent5f0fa721d1ae6458155e5c58ffc838c6195484eb (diff)
issue #5564
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@6935 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channel.c')
-rwxr-xr-xchannel.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/channel.c b/channel.c
index b67dc707a..e2448436a 100755
--- a/channel.c
+++ b/channel.c
@@ -2355,8 +2355,12 @@ struct ast_channel *__ast_request_and_dial(const char *type, int format, void *d
chan = ast_request(type, format, data, &cause);
if (chan) {
if (oh) {
- ast_set_variables(chan, oh->vars);
- ast_set_callerid(chan, oh->cid_num, oh->cid_name, oh->cid_num);
+ if (oh->vars)
+ ast_set_variables(chan, oh->vars);
+ if (oh->cid_num && *oh->cid_num && oh->cid_name && *oh->cid_name)
+ ast_set_callerid(chan, oh->cid_num, oh->cid_name, oh->cid_num);
+ if (oh->parent_channel)
+ ast_channel_inherit_variables(oh->parent_channel, chan);
}
ast_set_callerid(chan, cid_num, cid_name, cid_num);