From: Jonathan Rose Date: Thu, 20 Mar 2014 22:54:59 +0000 (+0000) Subject: app_confbridge: Fix bug - users with startmuted set don't start muted X-Git-Tag: 12.2.0-rc1~29 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8d1073a05d4fc3fabe11de8860597bde3cfe2ff3;p=thirdparty%2Fasterisk.git app_confbridge: Fix bug - users with startmuted set don't start muted (closes issue ASTERISK-23461) Reported by: Chico Manobela Review: https://reviewboard.asterisk.org/r/3373/ ........ Merged revisions 410965 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@410966 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/apps/app_confbridge.c b/apps/app_confbridge.c index 4ffcc8e1a1..43e6a86fea 100644 --- a/apps/app_confbridge.c +++ b/apps/app_confbridge.c @@ -995,6 +995,13 @@ void conf_update_user_mute(struct confbridge_user *user) ast_channel_name(user->chan), mute_effective ? "muted" : "unmuted", mute_user, mute_system); user->features.mute = mute_effective; + ast_test_suite_event_notify("CONF_MUTE_UPDATE", + "Mode: %s\r\n" + "Conference: %s\r\n" + "Channel: %s", + mute_effective ? "muted" : "unmuted", + user->b_profile.name, + ast_channel_name(user->chan)); } void conf_moh_stop(struct confbridge_user *user) @@ -1645,6 +1652,12 @@ 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))) { res = -1; @@ -1655,12 +1668,6 @@ static int confbridge_exec(struct ast_channel *chan, const char *data) volume_adjustments[0] = ast_audiohook_volume_get(chan, AST_AUDIOHOOK_DIRECTION_READ); volume_adjustments[1] = ast_audiohook_volume_get(chan, AST_AUDIOHOOK_DIRECTION_WRITE); - /* If the caller should be joined already muted, make it so */ - if (ast_test_flag(&user.u_profile, USER_OPT_STARTMUTED)) { - /* Set user level mute request. */ - user.muted = 1; - } - if (ast_test_flag(&user.u_profile, USER_OPT_DROP_SILENCE)) { user.tech_args.drop_silence = 1; }