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;
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)) {
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)) {