]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Update BRIDGEPEER variable before we do a generic bridge in case we just broke out...
authorJoshua Colp <jcolp@digium.com>
Tue, 10 Jun 2008 12:52:06 +0000 (12:52 +0000)
committerJoshua Colp <jcolp@digium.com>
Tue, 10 Jun 2008 12:52:06 +0000 (12:52 +0000)
(closes issue #12815)
Reported by: ramonpeek

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@121442 65c4cc65-6c06-0410-ace0-fbb531ad65f3

main/channel.c

index cafbfe9c562e1fa97ef11bf23fde13d953ec4dcb..5fff0f7d99f3d1722f6b48d0b6cbbaf693aae97f 100644 (file)
@@ -4114,6 +4114,12 @@ enum ast_bridge_result ast_channel_bridge(struct ast_channel *c0, struct ast_cha
                        o0nativeformats = c0->nativeformats;
                        o1nativeformats = c1->nativeformats;
                }
+
+               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);
+
                res = ast_generic_bridge(c0, c1, config, fo, rc, nexteventts);
                if (res != AST_BRIDGE_RETRY)
                        break;