]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
app_confbridge: Make non-admin users join a muted conference muted. 21/2121/1
authorRichard Mudgett <rmudgett@digium.com>
Mon, 25 Jan 2016 21:48:04 +0000 (15:48 -0600)
committerRichard Mudgett <rmudgett@digium.com>
Wed, 27 Jan 2016 23:22:20 +0000 (17:22 -0600)
ASTERISK-20987 #close
Reported by: hristo

Change-Id: Ic61a2b524ab3a4cfadf227fc6b3506527bc03f38

apps/app_confbridge.c
configs/confbridge.conf.sample

index 988f5fe6bfe35688cea6aafd08b08c02d11aede1..5c7e1c2f7499ad3b3989e4520bf707e939b5e79f 100644 (file)
@@ -1259,6 +1259,14 @@ static struct conference_bridge *join_conference_bridge(const char *name, struct
 
        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
@@ -1671,12 +1679,6 @@ static int confbridge_exec(struct ast_channel *chan, const char *data)
                        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 */
        if (!(conference_bridge = join_conference_bridge(args.conf_name, &conference_bridge_user))) {
                res = -1; /* invalid PIN */
index a4f829aa2cc93d2edbc0863aac1040b0e37ccfa5..a00297689da5755a4a7956db80c76fb257d58f37 100644 (file)
@@ -315,10 +315,12 @@ type=bridge
                               ; 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