From 9790ee9232c66e260b1017da39233d679705c469 Mon Sep 17 00:00:00 2001 From: Richard Fuchs Date: Fri, 19 Sep 2025 15:41:07 -0400 Subject: [PATCH] MT#63317 add strict bundle mode Change-Id: Ic2076525b9e655cfb7d6fb665898018d29b87d5e --- daemon/call_interfaces.c | 6 ++++++ daemon/sdp.c | 4 ++++ 2 files changed, 10 insertions(+) diff --git a/daemon/call_interfaces.c b/daemon/call_interfaces.c index 261af8c0f..3c7905f6f 100644 --- a/daemon/call_interfaces.c +++ b/daemon/call_interfaces.c @@ -858,6 +858,12 @@ static void call_ng_flags_bundle(str *s, unsigned int idx, helper_arg arg) { out->bundle_require = true; out->generate_mid = true; break; + case CSH_LOOKUP("strict"): + out->bundle_offer = true; + out->bundle_require = true; + out->bundle_strict = true; + out->generate_mid = true; + break; default: ilog(LOG_WARN, "Unknown 'BUNDLE' flag encountered: '" STR_FORMAT "'", STR_FMT(s)); diff --git a/daemon/sdp.c b/daemon/sdp.c index cb5fd9528..553c6eb3a 100644 --- a/daemon/sdp.c +++ b/daemon/sdp.c @@ -3496,6 +3496,10 @@ int sdp_create(str *out, struct call_monologue *monologue, sdp_ng_flags *flags) &sdp_address); unsigned int port = sdp_address.port; + if (media->bundle && MEDIA_ISSET(media, BUNDLE_ONLY) && flags->opmode == OP_OFFER && + flags->bundle_strict && media->bundle != media) + port = 0; + prtp = NULL; if (media->protocol && media->protocol->srtp) prtp = &transport_protocols[media->protocol->rtp_proto];