mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-22 12:52:33 +00:00
apps/confbridge: Added hear_own_join_sound option to control who hears sound_join
Added the hear_own_join_sound option to the confbridge user profile to control who hears the sound_join audio file. When set to 'yes' the user entering the conference and the participants already in the conference will hear the sound_join audio file. When set to 'no' the user entering the conference will not hear the sound_join audio file, but the participants already in the conference will hear the sound_join audio file. ASTERISK-29931 Added by Michael Cargile Change-Id: I856bd66dc0dfa057323860a6418c1371d249abd2
This commit is contained in:
committed by
Kevin Harwell
parent
19c841950b
commit
a2679b0ee2
@@ -2725,17 +2725,24 @@ static int confbridge_exec(struct ast_channel *chan, const char *data)
|
||||
ast_autoservice_stop(chan);
|
||||
}
|
||||
|
||||
/* Play the Join sound to both the conference and the user entering. */
|
||||
if (!quiet) {
|
||||
const char *join_sound = conf_get_sound(CONF_SOUND_JOIN, conference->b_profile.sounds);
|
||||
|
||||
if (strcmp(conference->b_profile.language, ast_channel_language(chan))) {
|
||||
ast_stream_and_wait(chan, join_sound, "");
|
||||
/* if hear_own_join_sound is enabled play the Join sound to everyone */
|
||||
if (ast_test_flag(&user.u_profile, USER_OPT_HEAR_OWN_JOIN_SOUND) ) {
|
||||
if (strcmp(conference->b_profile.language, ast_channel_language(chan))) {
|
||||
ast_stream_and_wait(chan, join_sound, "");
|
||||
ast_autoservice_start(chan);
|
||||
play_sound_file(conference, join_sound);
|
||||
ast_autoservice_stop(chan);
|
||||
} else {
|
||||
async_play_sound_file(conference, join_sound, chan);
|
||||
}
|
||||
/* if hear_own_join_sound is disabled only play the Join sound to just the conference */
|
||||
} else {
|
||||
ast_autoservice_start(chan);
|
||||
play_sound_file(conference, join_sound);
|
||||
ast_autoservice_stop(chan);
|
||||
} else {
|
||||
async_play_sound_file(conference, join_sound, chan);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user