FS-9526 [mod_conference] add deaf sounds
This commit is contained in:
parent
7aa97b76a5
commit
e76350df42
|
@ -563,6 +563,11 @@ switch_status_t conference_api_sub_deaf(conference_member_t *member, switch_stre
|
|||
return SWITCH_STATUS_GENERR;
|
||||
|
||||
conference_utils_member_clear_flag_locked(member, MFLAG_CAN_HEAR);
|
||||
|
||||
if (!(data) || !strstr((char *) data, "quiet")) {
|
||||
conference_utils_member_set_flag(member, MFLAG_INDICATE_DEAF);
|
||||
}
|
||||
|
||||
if (stream != NULL) {
|
||||
stream->write_function(stream, "OK deaf %u\n", member->id);
|
||||
}
|
||||
|
@ -587,6 +592,11 @@ switch_status_t conference_api_sub_undeaf(conference_member_t *member, switch_st
|
|||
return SWITCH_STATUS_GENERR;
|
||||
|
||||
conference_utils_member_set_flag_locked(member, MFLAG_CAN_HEAR);
|
||||
|
||||
if (!(data) || !strstr((char *) data, "quiet")) {
|
||||
conference_utils_member_set_flag(member, MFLAG_INDICATE_UNDEAF);
|
||||
}
|
||||
|
||||
if (stream != NULL) {
|
||||
stream->write_function(stream, "OK undeaf %u\n", member->id);
|
||||
}
|
||||
|
|
|
@ -1401,6 +1401,20 @@ void conference_loop_output(conference_member_t *member)
|
|||
conference_utils_member_clear_flag(member, MFLAG_INDICATE_UNMUTE);
|
||||
}
|
||||
|
||||
if (conference_utils_member_test_flag(member, MFLAG_INDICATE_DEAF)) {
|
||||
if (!zstr(member->conference->deaf_sound)) {
|
||||
conference_member_play_file(member, member->conference->deaf_sound, 0, SWITCH_TRUE);
|
||||
}
|
||||
conference_utils_member_clear_flag(member, MFLAG_INDICATE_DEAF);
|
||||
}
|
||||
|
||||
if (conference_utils_member_test_flag(member, MFLAG_INDICATE_UNDEAF)) {
|
||||
if (!zstr(member->conference->undeaf_sound)) {
|
||||
conference_member_play_file(member, member->conference->undeaf_sound, 0, SWITCH_TRUE);
|
||||
}
|
||||
conference_utils_member_clear_flag(member, MFLAG_INDICATE_UNDEAF);
|
||||
}
|
||||
|
||||
if (switch_core_session_private_event_count(member->session)) {
|
||||
switch_channel_set_app_flag(channel, CF_APP_TAGGED);
|
||||
switch_ivr_parse_all_events(member->session);
|
||||
|
|
|
@ -2374,6 +2374,8 @@ conference_obj_t *conference_new(char *name, conference_xml_cfg_t cfg, switch_co
|
|||
char *is_unlocked_sound = NULL;
|
||||
char *kicked_sound = NULL;
|
||||
char *join_only_sound = NULL;
|
||||
char *deaf_sound = NULL;
|
||||
char *undeaf_sound = NULL;
|
||||
char *pin = NULL;
|
||||
char *mpin = NULL;
|
||||
char *pin_sound = NULL;
|
||||
|
@ -2609,6 +2611,10 @@ conference_obj_t *conference_new(char *name, conference_xml_cfg_t cfg, switch_co
|
|||
is_locked_sound = val;
|
||||
} else if (!strcasecmp(var, "is-unlocked-sound") && !zstr(val)) {
|
||||
is_unlocked_sound = val;
|
||||
} else if (!strcasecmp(var, "deaf-sound") && !zstr(val)) {
|
||||
deaf_sound = val;
|
||||
} else if (!strcasecmp(var, "undeaf-sound") && !zstr(val)) {
|
||||
undeaf_sound = val;
|
||||
} else if (!strcasecmp(var, "member-flags") && !zstr(val)) {
|
||||
member_flags = val;
|
||||
} else if (!strcasecmp(var, "conference-flags") && !zstr(val)) {
|
||||
|
@ -3065,6 +3071,14 @@ conference_obj_t *conference_new(char *name, conference_xml_cfg_t cfg, switch_co
|
|||
conference->bad_pin_sound = switch_core_strdup(conference->pool, bad_pin_sound);
|
||||
}
|
||||
|
||||
if (!zstr(deaf_sound)) {
|
||||
conference->deaf_sound = switch_core_strdup(conference->pool, deaf_sound);
|
||||
}
|
||||
|
||||
if (!zstr(undeaf_sound)) {
|
||||
conference->undeaf_sound = switch_core_strdup(conference->pool, undeaf_sound);
|
||||
}
|
||||
|
||||
if (!zstr(pin)) {
|
||||
conference->pin = switch_core_strdup(conference->pool, pin);
|
||||
}
|
||||
|
|
|
@ -210,6 +210,8 @@ typedef enum {
|
|||
MFLAG_SILENT,
|
||||
MFLAG_FLIP_VIDEO,
|
||||
MFLAG_ROTATE_VIDEO,
|
||||
MFLAG_INDICATE_DEAF,
|
||||
MFLAG_INDICATE_UNDEAF,
|
||||
///////////////////////////
|
||||
MFLAG_MAX
|
||||
} member_flag_t;
|
||||
|
@ -544,6 +546,8 @@ typedef struct conference_obj {
|
|||
char *muted_sound;
|
||||
char *mute_detect_sound;
|
||||
char *unmuted_sound;
|
||||
char *deaf_sound;
|
||||
char *undeaf_sound;
|
||||
char *locked_sound;
|
||||
char *is_locked_sound;
|
||||
char *is_unlocked_sound;
|
||||
|
|
Loading…
Reference in New Issue