summaryrefslogtreecommitdiff
path: root/apps
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 14:35:16 -0600
commit3e51e5c7fd1f747ee67ec830cf3a78f54102e12b (patch)
treef112f74880e61c2ac0d79575d415576bf7342407 /apps
parent9da18af992a18c2ea11fef22b300ca203923245b (diff)
app_confbridge: Make non-admin users join a muted conference muted.
ASTERISK-20987 #close Reported by: hristo Change-Id: Ic61a2b524ab3a4cfadf227fc6b3506527bc03f38
Diffstat (limited to 'apps')
-rw-r--r--apps/app_confbridge.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/apps/app_confbridge.c b/apps/app_confbridge.c
index 5976d39db..9341440c8 100644
--- a/apps/app_confbridge.c
+++ b/apps/app_confbridge.c
@@ -1310,6 +1310,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
@@ -1727,12 +1734,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");