aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2007-02-22 18:49:39 +0000
committerfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2007-02-22 18:49:39 +0000
commitcf20f15ad1af271b8d1a4178dc6b449eb3a8ccbd (patch)
treeb725b187351171d408a7411cb2d41b4c31e10114
parent5fcf08aebfc6a83792792bc6f08da94c0c63b6fc (diff)
Merged revisions 56230 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r56230 | file | 2007-02-22 13:44:24 -0500 (Thu, 22 Feb 2007) | 2 lines Only change the original or clone channel if it's the channel behind the proxy channel, not if it's just a regular bridged channel. ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@56231 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r--channels/chan_sip.c2
-rw-r--r--main/channel.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index 2e89a9199..c99c330da 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -12728,7 +12728,7 @@ static int attempt_transfer(struct sip_dual *transferer, struct sip_dual *target
ast_log(LOG_DEBUG, "-- No target second channel ---\n");
ast_log(LOG_DEBUG, "-- END Sip transfer:--------------------\n");
}
- if (transferer->chan2 && (ast_bridged_channel(transferer->chan2) == transferer->chan2->_bridge)) { /* We have a bridge on the transferer's channel */
+ if (transferer->chan2) { /* We have a bridge on the transferer's channel */
peera = transferer->chan1; /* Transferer - PBX -> transferee channel * the one we hangup */
peerb = target->chan1; /* Transferer - PBX -> target channel - This will get lost in masq */
peerc = transferer->chan2; /* Asterisk to Transferee */
diff --git a/main/channel.c b/main/channel.c
index 2b40c1027..da8f22a6a 100644
--- a/main/channel.c
+++ b/main/channel.c
@@ -3200,10 +3200,10 @@ int ast_channel_masquerade(struct ast_channel *original, struct ast_channel *clo
/* each of these channels may be sitting behind a channel proxy (i.e. chan_agent)
and if so, we don't really want to masquerade it, but its proxy */
- if (original->_bridge && (original->_bridge != ast_bridged_channel(original)))
+ if (original->_bridge && (original->_bridge != ast_bridged_channel(original)) && (original->_bridge->_bridge != original))
final_orig = original->_bridge;
- if (clone->_bridge && (clone->_bridge != ast_bridged_channel(clone)))
+ if (clone->_bridge && (clone->_bridge != ast_bridged_channel(clone)) && (clone->_bridge->_bridge != clone))
final_clone = clone->_bridge;
if ((final_orig != original) || (final_clone != clone)) {