mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-17 15:29:05 +00:00
Binaural synthesis (confbridge): DTMF conference management.
DTMF configuration options for the binaural softmix bridge: toggle binaural rendering (per channel). ASTERISK-26292 Change-Id: Ibfe708b9fe26097c1798fcbfcc4dc461267d8af8
This commit is contained in:
@@ -438,6 +438,10 @@ const char *conf_get_sound(enum conf_sounds sound, struct bridge_profile_sounds
|
||||
return S_OR(custom_sounds->muted, "conf-muted");
|
||||
case CONF_SOUND_UNMUTED:
|
||||
return S_OR(custom_sounds->unmuted, "conf-unmuted");
|
||||
case CONF_SOUND_BINAURAL_ON:
|
||||
return S_OR(custom_sounds->binauralon, "confbridge-binaural-on");
|
||||
case CONF_SOUND_BINAURAL_OFF:
|
||||
return S_OR(custom_sounds->binauraloff, "confbridge-binaural-off");
|
||||
case CONF_SOUND_ONLY_ONE:
|
||||
return S_OR(custom_sounds->onlyone, "conf-onlyone");
|
||||
case CONF_SOUND_THERE_ARE:
|
||||
@@ -2452,6 +2456,20 @@ static int action_toggle_mute(struct confbridge_conference *conference,
|
||||
conference->b_profile.sounds)) < 0;
|
||||
}
|
||||
|
||||
static int action_toggle_binaural(struct confbridge_conference *conference,
|
||||
struct confbridge_user *user,
|
||||
struct ast_bridge_channel *bridge_channel)
|
||||
{
|
||||
unsigned int binaural;
|
||||
ast_bridge_channel_lock_bridge(bridge_channel);
|
||||
binaural = !bridge_channel->binaural_suspended;
|
||||
bridge_channel->binaural_suspended = binaural;
|
||||
ast_bridge_unlock(bridge_channel->bridge);
|
||||
return play_file(bridge_channel, NULL, (binaural ?
|
||||
conf_get_sound(CONF_SOUND_BINAURAL_OFF, user->b_profile.sounds) :
|
||||
conf_get_sound(CONF_SOUND_BINAURAL_ON, user->b_profile.sounds))) < 0;
|
||||
}
|
||||
|
||||
static int action_toggle_mute_participants(struct confbridge_conference *conference, struct confbridge_user *user)
|
||||
{
|
||||
struct confbridge_user *cur_user = NULL;
|
||||
@@ -2670,6 +2688,9 @@ static int execute_menu_entry(struct confbridge_conference *conference,
|
||||
case MENU_ACTION_TOGGLE_MUTE:
|
||||
res |= action_toggle_mute(conference, user, bridge_channel);
|
||||
break;
|
||||
case MENU_ACTION_TOGGLE_BINAURAL:
|
||||
action_toggle_binaural(conference, user, bridge_channel);
|
||||
break;
|
||||
case MENU_ACTION_ADMIN_TOGGLE_MUTE_PARTICIPANTS:
|
||||
if (!isadmin) {
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user