From 6f9e69adad78f9de8ecf5a315f9850bb5bbb576c Mon Sep 17 00:00:00 2001
From: Tilghman Lesher <tilghman@meg.abyt.es>
Date: Tue, 17 Feb 2009 21:14:18 +0000
Subject: [PATCH] Prior to masquerade, move the group definitions to the
 channel performing the masq, so that the group count lingers past the bridge.
 (closes issue #14275)  Reported by: kowalma  Patches:       
 20090216__bug14275.diff.txt uploaded by Corydon76 (license 14)  Tested by:
 kowalma

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@176642 65c4cc65-6c06-0410-ace0-fbb531ad65f3
---
 channels/chan_local.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/channels/chan_local.c b/channels/chan_local.c
index 3309725674..dfe7400d5c 100644
--- a/channels/chan_local.c
+++ b/channels/chan_local.c
@@ -106,8 +106,8 @@ struct local_pvt {
 	char exten[AST_MAX_EXTENSION];		/* Extension to call */
 	int reqformat;				/* Requested format */
 	struct ast_jb_conf jb_conf;		/*!< jitterbuffer configuration for this local channel */
-	struct ast_channel *owner;		/* Master Channel */
-	struct ast_channel *chan;		/* Outbound channel */
+	struct ast_channel *owner;		/* Master Channel - Bridging happens here */
+	struct ast_channel *chan;		/* Outbound channel - PBX is run here */
 	struct ast_module_user *u_owner;	/*! reference to keep the module loaded while in use */
 	struct ast_module_user *u_chan;		/*! reference to keep the module loaded while in use */
 	AST_LIST_ENTRY(local_pvt) list;		/* Next entity */
@@ -303,6 +303,7 @@ static void check_bridge(struct local_pvt *p, int isoutbound)
 							p->chan->audiohooks = p->owner->audiohooks;
 							p->owner->audiohooks = audiohooks_swapper;
 						}
+						ast_app_group_update(p->chan, p->owner);
 						ast_channel_masquerade(p->owner, p->chan->_bridge);
 						ast_set_flag(p, LOCAL_ALREADY_MASQED);
 					}
-- 
GitLab