[asterisk-commits] app confbridge: Make non-admin users join a muted conference... (asterisk[certified/13.1])

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Feb 5 11:49:19 CST 2016


Joshua Colp has submitted this change and it was merged.

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/samples/confbridge.conf.sample
2 files changed, 13 insertions(+), 10 deletions(-)

Approvals:
  Kevin Harwell: Looks good to me, but someone else must approve
  Anonymous Coward #1000019: Verified
  Joshua Colp: Looks good to me, approved



diff --git a/apps/app_confbridge.c b/apps/app_confbridge.c
index 75ccb32..9d72ec9 100644
--- a/apps/app_confbridge.c
+++ b/apps/app_confbridge.c
@@ -1264,6 +1264,13 @@
 
 	ao2_lock(conference);
 
+	/* Determine if the new user should join the conference muted. */
+	if (ast_test_flag(&user->u_profile, USER_OPT_STARTMUTED)
+		|| (!ast_test_flag(&user->u_profile, USER_OPT_ADMIN) && conference->muted)) {
+		/* Set user level mute request. */
+		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
@@ -1679,12 +1686,6 @@
 			res = -1;
 			goto confbridge_cleanup;
 		}
-	}
-
-	/* If the caller should be joined already muted, set the flag before we join. */
-	if (ast_test_flag(&user.u_profile, USER_OPT_STARTMUTED)) {
-		/* Set user level mute request. */
-		user.muted = 1;
 	}
 
 	/* Look for a conference bridge matching the provided name */
diff --git a/configs/samples/confbridge.conf.sample b/configs/samples/confbridge.conf.sample
index 0419001..d0bdd6f 100644
--- a/configs/samples/confbridge.conf.sample
+++ b/configs/samples/confbridge.conf.sample
@@ -334,10 +334,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/2117
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic61a2b524ab3a4cfadf227fc6b3506527bc03f38
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: certified/13.1
Gerrit-Owner: Richard Mudgett <rmudgett at digium.com>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Kevin Harwell <kharwell at digium.com>



More information about the asterisk-commits mailing list