send muted members as recvonly on RFC4575 data
This commit is contained in:
parent
658d938754
commit
c98fb0bd0e
|
@ -643,6 +643,21 @@ static void conference_cdr_rejected(conference_obj_t *conference, switch_channel
|
|||
rp->cp = switch_caller_profile_dup(conference->pool, cp);
|
||||
}
|
||||
|
||||
static const char *audio_flow(conference_member_t *member)
|
||||
{
|
||||
const char *flow = "sendrecv";
|
||||
|
||||
if (!switch_test_flag(member, MFLAG_CAN_SPEAK)) {
|
||||
flow = "recvonly";
|
||||
}
|
||||
|
||||
if (member->channel && switch_channel_test_flag(member->channel, CF_HOLD)) {
|
||||
flow = "sendonly";
|
||||
}
|
||||
|
||||
return flow;
|
||||
}
|
||||
|
||||
static char *conference_rfc4579_render(conference_obj_t *conference, switch_event_t *event, switch_event_t *revent)
|
||||
{
|
||||
switch_xml_t xml, x_tag, x_tag1, x_tag2, x_tag3, x_tag4;
|
||||
|
@ -856,7 +871,7 @@ static char *conference_rfc4579_render(conference_obj_t *conference, switch_even
|
|||
if (!(x_tag4 = switch_xml_add_child_d(x_tag3, "status", off4++))) {
|
||||
abort();
|
||||
}
|
||||
switch_xml_set_txt_d(x_tag4, switch_channel_test_flag(channel, CF_HOLD) ? "sendonly" : "sendrecv");
|
||||
switch_xml_set_txt_d(x_tag4, audio_flow(np->member));
|
||||
|
||||
|
||||
if (switch_channel_test_flag(channel, CF_VIDEO)) {
|
||||
|
@ -1247,7 +1262,7 @@ static cJSON *conference_json_render(conference_obj_t *conference, cJSON *req)
|
|||
json_add_child_string(juser, "rtpAudioSSRC", var);
|
||||
}
|
||||
|
||||
json_add_child_string(juser, "rtpAudioDirection", switch_channel_test_flag(channel, CF_HOLD) ? "sendonly" : "sendrecv");
|
||||
json_add_child_string(juser, "rtpAudioDirection", audio_flow(np->member));
|
||||
|
||||
|
||||
if (switch_channel_test_flag(channel, CF_VIDEO)) {
|
||||
|
|
Loading…
Reference in New Issue