summaryrefslogtreecommitdiff
path: root/main
diff options
context:
space:
mode:
authorJoshua Colp <jcolp@digium.com>2007-06-19 16:25:57 +0000
committerJoshua Colp <jcolp@digium.com>2007-06-19 16:25:57 +0000
commitafe63aec3378c52bcbd5cde851c61ef9f3abcd8c (patch)
tree48aba4adfafb2c985956a2557dc621dca9318c91 /main
parent238b7a54cc4bc49913cef4ae8cb4393d49d7946a (diff)
Merged revisions 69987 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4 ................ r69987 | file | 2007-06-19 12:24:31 -0400 (Tue, 19 Jun 2007) | 10 lines 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: https://origsvn.digium.com/svn/asterisk/trunk@69988 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'main')
-rw-r--r--main/channel.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/main/channel.c b/main/channel.c
index 1e3c3ec9a..4d6533d36 100644
--- a/main/channel.c
+++ b/main/channel.c
@@ -4088,7 +4088,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) &&