diff --git a/daemon/call_interfaces.c b/daemon/call_interfaces.c index 5ce132b79..a52eff5fe 100644 --- a/daemon/call_interfaces.c +++ b/daemon/call_interfaces.c @@ -695,7 +695,7 @@ INLINE void ng_sdp_attr_manipulations(const ng_parser_t *parser, sdp_ng_flags *f static void ng_sdp_media_remove_iter(str *media_type, unsigned int i, helper_arg arg) { enum media_type id = codec_get_type(media_type); - if (id == MT_UNKNOWN || id == MT_OTHER) + if (id == MT_UNKNOWN || (id == MT_OTHER && str_cmp(media_type, "other"))) { ilog(LOG_WARN, "SDP manipulations: unsupported SDP section '" STR_FORMAT "' targeted.", STR_FMT(media_type)); diff --git a/docs/ng_control_protocol.md b/docs/ng_control_protocol.md index e4304cfe1..94f632593 100644 --- a/docs/ng_control_protocol.md +++ b/docs/ng_control_protocol.md @@ -1627,6 +1627,9 @@ Examples: "sdp-media-remove" : ["video"] +IANA-registered media types are understood, or the special type `other` can be +given to remove all media sections with types that are not understood. + ## `answer` Message The `answer` message is identical to the `offer` message, with the additional requirement that the diff --git a/t/auto-daemon-tests.pl b/t/auto-daemon-tests.pl index 5f1428cf3..17fb9cd07 100755 --- a/t/auto-daemon-tests.pl +++ b/t/auto-daemon-tests.pl @@ -21185,6 +21185,75 @@ SDP new_call; +offer('SDP media manipulations - remove "other"', { 'sdp-media-remove' => ['other']}, < 'remove', DTLS => 'off', SDES => [ 'nonew' ], 'sdp-media-remove' => ['audio']}, <