diff --git a/daemon/call.c b/daemon/call.c index fb6f3399b..aef573764 100644 --- a/daemon/call.c +++ b/daemon/call.c @@ -3410,7 +3410,10 @@ static int monologue_subscribe_request1(struct call_monologue *src_ml, struct ca codec_handlers_update(dst_media, src_media, flags, sp); - bf_copy(&dst_media->media_flags, MEDIA_FLAG_SEND, &src_media->media_flags, SP_FLAG_RECV); + if (!flags->inactive) + 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); __rtcp_mux_set(flags, dst_media); diff --git a/daemon/call_interfaces.c b/daemon/call_interfaces.c index c9e2b2b75..f8f7014c8 100644 --- a/daemon/call_interfaces.c +++ b/daemon/call_interfaces.c @@ -1051,6 +1051,9 @@ static void call_ng_flags_flags(struct sdp_ng_flags *out, str *s, void *dummy) { case CSH_LOOKUP("record-call"): out->record_call = 1; break; + case CSH_LOOKUP("inactive"): + out->inactive = 1; + break; case CSH_LOOKUP("debug"): out->debug = 1; break; diff --git a/docs/ng_control_protocol.md b/docs/ng_control_protocol.md index 3afcb4b65..f8ca8ecab 100644 --- a/docs/ng_control_protocol.md +++ b/docs/ng_control_protocol.md @@ -834,6 +834,12 @@ Spaces in each string may be replaced by hyphens. Add `a=mid` attributes to the outgoing SDP if they were not already present. +* `inactive` + + Useful for `subscribe request` messages to produce an SDP which is marked + as inactive, instead of `sendonly` which is the default. This can be used + to pause media sent to a subscription. + * `inject DTMF` Signals to *rtpengine* that the audio streams involved in this `offer` or `answer` diff --git a/include/call_interfaces.h b/include/call_interfaces.h index b24a6c402..99da87c05 100644 --- a/include/call_interfaces.h +++ b/include/call_interfaces.h @@ -158,6 +158,7 @@ struct sdp_ng_flags { fragment:1, record_call:1, debug:1, + inactive:1, loop_protect:1, original_sendrecv:1, single_codec:1,