diff options
author | kpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-06-01 20:53:17 +0000 |
---|---|---|
committer | kpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-06-01 20:53:17 +0000 |
commit | f4118684269c23d0da7d6b5eadde55539a17b560 (patch) | |
tree | 6a27d506f9a8a99099ac2b41d09b21222a834bb1 /channel.c | |
parent | f9b41e6fcf7f5edaff5f91dc887eed8f2635f3e4 (diff) |
Merged revisions 31520 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2
........
r31520 | kpfleming | 2006-06-01 15:27:50 -0500 (Thu, 01 Jun 2006) | 2 lines
handle Zap transfers behind chan_agent properly so the agent doesn't get stuck waiting for the call to hang up
........
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@31522 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channel.c')
-rw-r--r-- | channel.c | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -2829,6 +2829,14 @@ int ast_channel_masquerade(struct ast_channel *original, struct ast_channel *clo { int res = -1; + /* 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))) + original = original->_bridge; + + if (clone->_bridge && (clone->_bridge != ast_bridged_channel(clone))) + clone = clone->_bridge; + if (original == clone) { ast_log(LOG_WARNING, "Can't masquerade channel '%s' into itself!\n", original->name); return -1; |