diff options
author | dhubbard <dhubbard@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-10-01 21:25:37 +0000 |
---|---|---|
committer | dhubbard <dhubbard@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-10-01 21:25:37 +0000 |
commit | 6c41fcab5e61440e473a08ab15244982cb54e02c (patch) | |
tree | 35df600fab2ed11dd4550dde270ebe1d32230a1a /main/channel.c | |
parent | b0a268d26d87642ea59f7539d8503b37b86df6e3 (diff) |
moved get_base_channel() code from action_redirect to ast_channel_masquerade() for issue 7706 and BE-160
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@84274 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main/channel.c')
-rw-r--r-- | main/channel.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/main/channel.c b/main/channel.c index 0ae9af4b0..0b7fe4027 100644 --- a/main/channel.c +++ b/main/channel.c @@ -3410,7 +3410,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; @@ -3430,6 +3430,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 |