提交 c98fb0bd authored 作者: Anthony Minessale's avatar Anthony Minessale

send muted members as recvonly on RFC4575 data

上级 658d9387
......@@ -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)) {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论