diff options
author | file <file@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-04-09 00:59:29 +0000 |
---|---|---|
committer | file <file@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-04-09 00:59:29 +0000 |
commit | af181586db60762d9324e057ab5af0f0bef9832c (patch) | |
tree | 816e951a854afdbdd862fa306b3074d915bad6a0 /apps | |
parent | 70a1f1f3a0924d7aeded22b9bd7542d31762fd24 (diff) |
When calling a device that then forwards us elsewhere... we have to make our channels compatible if it is the only channel being dialed. (issue #9445 reported by marcelbarbulescu)
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2@60797 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps')
-rw-r--r-- | apps/app_dial.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/apps/app_dial.c b/apps/app_dial.c index f3d1c268b..d900a14d2 100644 --- a/apps/app_dial.c +++ b/apps/app_dial.c @@ -470,10 +470,12 @@ static struct ast_channel *wait_for_answer(struct ast_channel *in, struct localu ast_verbose(VERBOSE_PREFIX_3 "Now forwarding %s to '%s/%s' (thanks to %s)\n", in->name, tech, stuff, o->chan->name); /* Setup parameters */ 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 + if (o->chan) { + if (single) + ast_channel_make_compatible(o->chan, in); ast_channel_inherit_variables(in, o->chan); + } else + ast_log(LOG_NOTICE, "Unable to create local channel for call forward to '%s/%s' (cause = %d)\n", tech, stuff, cause); } else { if (option_verbose > 2) ast_verbose(VERBOSE_PREFIX_3 "Too many forwards from %s\n", o->chan->name); |