Add a chan var conference_enter_sound to override conference enter-sound param on the profile

This commit is contained in:
Joao Mesquita 2010-12-21 23:39:05 -03:00
parent a1e425029c
commit 651acc62f7
1 changed files with 7 additions and 1 deletions

View File

@ -689,10 +689,16 @@ static switch_status_t conference_add_member(conference_obj_t *conference, confe
}
if (!switch_channel_test_app_flag_key("conf_silent", channel, CONF_SILENT_REQ) && !zstr(conference->enter_sound)) {
if (!zstr(switch_channel_get_variable(channel, "conference_enter_sound"))) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Playing file...%s\n", conference->name);
conference_play_file(conference, (char *)switch_channel_get_variable(channel, "conference_enter_sound"), CONF_DEFAULT_LEADIN,
switch_core_session_get_channel(member->session), switch_test_flag(conference, CFLAG_WAIT_MOD) ? 0 : 1);
} else {
conference_play_file(conference, conference->enter_sound, CONF_DEFAULT_LEADIN, switch_core_session_get_channel(member->session),
switch_test_flag(conference, CFLAG_WAIT_MOD) ? 0 : 1);
}
}
}
call_list = (call_list_t *) switch_channel_get_private(channel, "_conference_autocall_list_");