summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Mudgett <rmudgett@digium.com>2016-01-25 15:48:04 -0600
committerRichard Mudgett <rmudgett@digium.com>2016-01-27 16:46:20 -0600
commit12c93e8f81ff12ddf0ea41925ccca9d6014d4187 (patch)
tree750b8619f38af39213451d8dfd1f3c44f7dc2c76
parentf19bf7a32141a1282f00a4da1c677a893b9a6d1b (diff)
app_confbridge: Make non-admin users join a muted conference muted.
ASTERISK-20987 #close Reported by: hristo Change-Id: Ic61a2b524ab3a4cfadf227fc6b3506527bc03f38
-rw-r--r--apps/app_confbridge.c13
-rw-r--r--configs/samples/confbridge.conf.sample10
2 files changed, 13 insertions, 10 deletions
diff --git a/apps/app_confbridge.c b/apps/app_confbridge.c
index 7a04952db..9bda5440d 100644
--- a/apps/app_confbridge.c
+++ b/apps/app_confbridge.c
@@ -1313,6 +1313,13 @@ static struct confbridge_conference *join_conference_bridge(const char *conferen
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
@@ -1730,12 +1737,6 @@ static int confbridge_exec(struct ast_channel *chan, const char *data)
}
}
- /* 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 */
if (!(conference = join_conference_bridge(args.conf_name, &user))) {
pbx_builtin_setvar_helper(chan, "CONFBRIDGE_RESULT", "FAILED");
diff --git a/configs/samples/confbridge.conf.sample b/configs/samples/confbridge.conf.sample
index 85de3282b..e73868596 100644
--- a/configs/samples/confbridge.conf.sample
+++ b/configs/samples/confbridge.conf.sample
@@ -340,10 +340,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