summaryrefslogtreecommitdiff
path: root/main/channel.c
diff options
context:
space:
mode:
authorDwayne M. Hubbard <dwayne.hubbard@gmail.com>2007-10-01 21:31:16 +0000
committerDwayne M. Hubbard <dwayne.hubbard@gmail.com>2007-10-01 21:31:16 +0000
commit71a0672560db6b117806a4f8afb5f3ff3111f206 (patch)
tree43e15f9601c5a8f7be3dac725f53b0abc215ab2f /main/channel.c
parent9334e72e76656b7f357c37a1a67c02d87ca139fc (diff)
Merged revisions 84274 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r84274 | dhubbard | 2007-10-01 16:25:37 -0500 (Mon, 01 Oct 2007) | 1 line moved get_base_channel() code from action_redirect to ast_channel_masquerade() for issue 7706 and BE-160 ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@84275 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'main/channel.c')
-rw-r--r--main/channel.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/main/channel.c b/main/channel.c
index e11afe9d4..1976e111a 100644
--- a/main/channel.c
+++ b/main/channel.c
@@ -3333,7 +3333,7 @@ int ast_channel_make_compatible(struct ast_channel *chan, struct ast_channel *pe
int ast_channel_masquerade(struct ast_channel *original, struct ast_channel *clone)
{
int res = -1;
- struct ast_channel *final_orig, *final_clone;
+ struct ast_channel *final_orig, *final_clone, *base;
retrymasq:
final_orig = original;
@@ -3353,6 +3353,10 @@ retrymasq:
if (clone->_bridge && (clone->_bridge != ast_bridged_channel(clone)) && (clone->_bridge->_bridge != clone))
final_clone = clone->_bridge;
+
+ if (final_clone->tech->get_base_channel && (base = final_clone->tech->get_base_channel(final_clone))) {
+ final_clone = base;
+ }
if ((final_orig != original) || (final_clone != clone)) {
/* Lots and lots of deadlock avoidance. The main one we're competing with