]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Update BRIDGEPEER variable if set to the new channel name when a masquerade happens...
authorJoshua Colp <jcolp@digium.com>
Tue, 19 Jun 2007 16:21:29 +0000 (16:21 +0000)
committerJoshua Colp <jcolp@digium.com>
Tue, 19 Jun 2007 16:21:29 +0000 (16:21 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@69986 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channel.c

index 628e0614fa7593d661d8c3f1a36559c42568c826..5a3afcf2abfa23cb0ca4a1f087527ae085711247 100644 (file)
--- a/channel.c
+++ b/channel.c
@@ -3596,6 +3596,12 @@ enum ast_bridge_result ast_channel_bridge(struct ast_channel *c0, struct ast_cha
                        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) &&