[Asterisk-code-review] app confbridge: Make non-admin users join a muted conference... (asterisk[certified/11.6])

Richard Mudgett asteriskteam at digium.com
Wed Jan 27 17:24:26 CST 2016


Richard Mudgett has uploaded a new change for review.

  https://gerrit.asterisk.org/2121

Change subject: app_confbridge: Make non-admin users join a muted conference muted.
......................................................................

app_confbridge: Make non-admin users join a muted conference muted.

ASTERISK-20987 #close
Reported by: hristo

Change-Id: Ic61a2b524ab3a4cfadf227fc6b3506527bc03f38
---
M apps/app_confbridge.c
M configs/confbridge.conf.sample
2 files changed, 14 insertions(+), 10 deletions(-)


  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/21/2121/1

diff --git a/apps/app_confbridge.c b/apps/app_confbridge.c
index 988f5fe..5c7e1c2 100644
--- a/apps/app_confbridge.c
+++ b/apps/app_confbridge.c
@@ -1259,6 +1259,14 @@
 
 	ao2_lock(conference_bridge);
 
+	/* Determine if the new user should join the conference muted. */
+	if (ast_test_flag(&conference_bridge_user->u_profile, USER_OPT_STARTMUTED)
+		|| (!ast_test_flag(&conference_bridge_user->u_profile, USER_OPT_ADMIN)
+			&& conference_bridge->muted)) {
+		/* Set user level mute request. */
+		conference_bridge_user->muted = 1;
+	}
+
 	/*
 	 * Suspend any MOH until the user actually joins the bridge of
 	 * the conference.  This way any pre-join file playback does not
@@ -1669,12 +1677,6 @@
 			conf_handle_talker_cb,
 			conf_handle_talker_destructor,
 			conf_name);
-	}
-
-	/* If the caller should be joined already muted, set the flag before we join. */
-	if (ast_test_flag(&conference_bridge_user.u_profile, USER_OPT_STARTMUTED)) {
-		/* Set user level mute request. */
-		conference_bridge_user.muted = 1;
 	}
 
 	/* Look for a conference bridge matching the provided name */
diff --git a/configs/confbridge.conf.sample b/configs/confbridge.conf.sample
index a4f829a..a002976 100644
--- a/configs/confbridge.conf.sample
+++ b/configs/confbridge.conf.sample
@@ -315,10 +315,12 @@
                               ; upon release of the video src.
 
 ; admin_toggle_mute_participants ; This action allows an administrator to toggle the mute
-                                 ; state for all non-admins within a conference.  All
-                                 ; admin users are unaffected by this option.  Note that all
-                                 ; users, regardless of their admin status, are notified
-                                 ; that the conference is muted.
+                                 ; state for all non-admins within a conference.
+                                 ; Subsequent non-admins joining a muted conference will
+                                 ; start muted.  All admin users are unaffected by this
+                                 ; option.  Note that all users, regardless of their admin
+                                 ; status, are notified that the conference is muted when
+                                 ; the state is toggled.
 
 ; participant_count        ; This action plays back the number of participants currently
                            ; in a conference

-- 
To view, visit https://gerrit.asterisk.org/2121
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic61a2b524ab3a4cfadf227fc6b3506527bc03f38
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: certified/11.6
Gerrit-Owner: Richard Mudgett <rmudgett at digium.com>



More information about the asterisk-code-review mailing list