aboutsummaryrefslogtreecommitdiffstats
path: root/main/channel.c
diff options
context:
space:
mode:
authorfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2007-06-19 16:24:31 +0000
committerfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2007-06-19 16:24:31 +0000
commit4647810804de658c896a538f98405d9984348fca (patch)
treec6325ce466e30ebc7be8ab65f4bc6b9826fbec67 /main/channel.c
parente2bf2462cfa877038cb102b548428181a3960018 (diff)
Merged revisions 69986 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r69986 | file | 2007-06-19 12:21:29 -0400 (Tue, 19 Jun 2007) | 2 lines Update BRIDGEPEER variable if set to the new channel name when a masquerade happens. (issue #9699 reported by dimas) ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@69987 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main/channel.c')
-rw-r--r--main/channel.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/main/channel.c b/main/channel.c
index 7fd58eca9..d3cbab4f0 100644
--- a/main/channel.c
+++ b/main/channel.c
@@ -4162,7 +4162,13 @@ enum ast_bridge_result ast_channel_bridge(struct ast_channel *c0, struct ast_cha
ast_check_hangup(c1) ? "Yes" : "No");
break;
}
-
+
+ /* See if the BRIDGEPEER variable needs to be updated */
+ if (!ast_strlen_zero(pbx_builtin_getvar_helper(c0, "BRIDGEPEER")))
+ pbx_builtin_setvar_helper(c0, "BRIDGEPEER", c1->name);
+ if (!ast_strlen_zero(pbx_builtin_getvar_helper(c1, "BRIDGEPEER")))
+ pbx_builtin_setvar_helper(c1, "BRIDGEPEER", c0->name);
+
if (c0->tech->bridge &&
(config->timelimit == 0) &&
(c0->tech->bridge == c1->tech->bridge) &&