app_confbridge: Play "leader has left" sound even when musiconhold is enabled.

Currently if the leader of a conference bridge leaves any participant
that has musiconhold enabled will not hear the "leader has left" sound.
This is because musiconhold is started and THEN the sound is played.

This change makes it so that the sound is played and THEN musiconhold
is started. This provides a better experience for users as they may not
have known previously why they went back to musiconhold.

Review: https://reviewboard.asterisk.org/r/4177/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@427844 65c4cc65-6c06-0410-ace0-fbb531ad65f3
changes/61/61/1
Joshua Colp 11 years ago
parent 329d09913e
commit 093db340b1

@ -105,12 +105,6 @@ static void leave_marked(struct conference_bridge_user *cbu)
cbu_iter->conference_bridge->activeusers--;
AST_LIST_INSERT_TAIL(&cbu_iter->conference_bridge->waiting_list, cbu_iter, list);
cbu_iter->conference_bridge->waitingusers++;
/* Handle moh of cbu_iter if necessary */
if (ast_test_flag(&cbu_iter->u_profile, USER_OPT_MUSICONHOLD)) {
conf_moh_start(cbu_iter);
}
conf_update_user_mute(cbu_iter);
}
}
AST_LIST_TRAVERSE_SAFE_END;
@ -166,6 +160,18 @@ static void leave_marked(struct conference_bridge_user *cbu)
ast_autoservice_stop(cbu->chan);
ao2_lock(cbu->conference_bridge);
}
AST_LIST_TRAVERSE(&cbu->conference_bridge->waiting_list, cbu_iter, list) {
if (cbu_iter->kicked) {
continue;
}
if (ast_test_flag(&cbu_iter->u_profile, USER_OPT_MUSICONHOLD)) {
conf_moh_start(cbu_iter);
}
conf_update_user_mute(cbu_iter);
}
}
}

Loading…
Cancel
Save