From 5457cefa848b0b8f4d635829a0aabefada8cd1f7 Mon Sep 17 00:00:00 2001 From: Donat Zenichev Date: Mon, 10 Feb 2025 09:38:02 +0100 Subject: [PATCH] MT#62063 Recvonly cannot put on hold Previously introduced by 175b00d72b79561d7 the `Recvonly` hold type had started to put a call on MoH hold. This was done so, to fulfill momentary demands of call scenario which is in fact wrong and should not be supported: - A puts on sendonly hold B - B puts vice-versa A on inactive hold - now two-way MoH stream both sides - B resumes his stream with recvonly (meanwhile only sendrecv considered as the only possible type to put off hold) This commits keeps support of stream types detection as it was, hence `RecvonlyStream` is still supported. But not anymore considered as a type which can trigger MoH, in other words it doesn't put on hold. This approach makes SEMS in sync with MoH implementation in rtpengine, whereas only sendonly and inactive states are allowed to trigger MoH. Change-Id: Icf5aa082092cd8f79e43d30339ae8f98a25a7381 --- apps/sbc/CallLeg.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/sbc/CallLeg.cpp b/apps/sbc/CallLeg.cpp index 1e7a92bb..8f2f6298 100644 --- a/apps/sbc/CallLeg.cpp +++ b/apps/sbc/CallLeg.cpp @@ -296,7 +296,7 @@ bool CallLeg::isHoldRequest(const AmSdp &sdp, holdMethod &method) continue; case Recvonly: method = RecvonlyStream; - continue; + return false; /* recvonly cannot provide moh */ case Sendrecv: return false; /* media stream is active */ } @@ -314,7 +314,7 @@ bool CallLeg::isHoldRequest(const AmSdp &sdp, holdMethod &method) break; case Recvonly: method = RecvonlyStream; - break; + return false; /* recvonly cannot provide moh */ /* well, no stream is something like InactiveStream, isn't it? */ case Sendrecv: method = InactiveStream;