From e2d06debe0b3997034a96619e8da0cf603b4d95b Mon Sep 17 00:00:00 2001 From: Richard Fuchs Date: Thu, 16 Apr 2026 15:24:37 -0400 Subject: [PATCH] MT#55283 support sendrecv subscribe req Change-Id: I3a4905cea448017d21e6a59360b553e97ac6c6b6 --- daemon/call.c | 6 +++++- docs/ng_control_protocol.md | 14 +++++++++----- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/daemon/call.c b/daemon/call.c index cf03e6742..e70a9d653 100644 --- a/daemon/call.c +++ b/daemon/call.c @@ -4548,7 +4548,11 @@ static int monologue_subscribe_request1(struct call_media *src_media, struct cal bf_copy(&dst_media->media_flags, MEDIA_FLAG_SEND, &src_media->media_flags, SP_FLAG_RECV); else MEDIA_CLEAR(dst_media, SEND); - MEDIA_CLEAR(dst_media, RECV); + + if (flags->bidirectional) + bf_copy(&dst_media->media_flags, MEDIA_FLAG_RECV, &src_media->media_flags, SP_FLAG_SEND); + else + MEDIA_CLEAR(dst_media, RECV); __rtcp_mux_set(flags, dst_media); __generate_crypto(flags, dst_media, src_media); diff --git a/docs/ng_control_protocol.md b/docs/ng_control_protocol.md index 9ad390818..7721486ed 100644 --- a/docs/ng_control_protocol.md +++ b/docs/ng_control_protocol.md @@ -1050,6 +1050,9 @@ Spaces in each string may be replaced by hyphens. For `publish` messages, support bidirectional media flow, i.e. don't respond with `recvonly` media but instead respond with `sendrecv`. + Similarly, for `subscribe request` messages, respond with `sendrecv` + instead of `sendonly`. + For `connect` messages, in addition to `directional` sets up media flow in both directions. @@ -2615,11 +2618,12 @@ subscription. This new call participant will be identified by a newly generated unique tag, or by the tag given in the `to-tag` key. If a label is to be set for the newly created subscription, it can be set through `set-label`. -The reply message will contain a sendonly offer SDP in `sdp` which by default -will mirror the SDP of the call participant being subscribed to. If multiple -call participants are subscribed to at the same time, then this SDP will -contain multiple media sections, combined out of the media sections of all -selected call participants. This offer SDP can be manipulated with the same +The reply message will contain a sendonly offer SDP (unless the flag +`bidirectional` is given, in which case the SDP will be `sendrecv`) in `sdp` +which by default will mirror the SDP of the call participant being subscribed +to. If multiple call participants are subscribed to at the same time, then this +SDP will contain multiple media sections, combined out of the media sections of +all selected call participants. This offer SDP can be manipulated with the same flags as used in an `offer` message, including the option to manipulate the codecs. The reply message will also contain the `from-tags` (corresponding to the call participants being subscribed to) and the `to-tag` (corresponding to