From 623c90b19f9da7eabe099422afecc557f944b544 Mon Sep 17 00:00:00 2001 From: prlanzarin <4529051+prlanzarin@users.noreply.github.com> Date: Mon, 24 Jun 2024 11:22:45 -0300 Subject: [PATCH] fix(audio): add callerNum to transparent listen only RPCs There are some scenarios where transparent listen only toggle RPCs are directed to multiple different sessions in the SFU, which might cause a hold-unhold loop because they're all anchored to the userId. Append the callerNum to transparent listen only toggle RPCs so that they are directed to the appropriate audio sessions in all cases. --- .../scala/org/bigbluebutton/core/apps/voice/VoiceApp.scala | 4 ++++ .../org/bigbluebutton/core2/message/senders/MsgBuilder.scala | 3 ++- .../scala/org/bigbluebutton/common2/msgs/VoiceConfMsgs.scala | 2 ++ 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/voice/VoiceApp.scala b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/voice/VoiceApp.scala index 96a2b121c9..afa2c68663 100755 --- a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/voice/VoiceApp.scala +++ b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/voice/VoiceApp.scala @@ -131,6 +131,7 @@ object VoiceApp extends SystemConfiguration { liveMeeting, outGW, mutedUser.intId, + mutedUser.callerNum, muted, toggleListenOnlyAfterMuteTimer ) @@ -476,6 +477,7 @@ object VoiceApp extends SystemConfiguration { liveMeeting: LiveMeeting, outGW: OutMsgRouter, userId: String, + callerNum: String, enabled: Boolean, delay: Int = 0 )(implicit context: ActorContext): Unit = { @@ -485,6 +487,7 @@ object VoiceApp extends SystemConfiguration { liveMeeting.props.meetingProp.intId, liveMeeting.props.voiceProp.voiceConf, userId, + callerNum, enabled ) outGW.send(event) @@ -550,6 +553,7 @@ object VoiceApp extends SystemConfiguration { liveMeeting, outGW, intId, + vu.callerNum, vu.muted ) } diff --git a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core2/message/senders/MsgBuilder.scala b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core2/message/senders/MsgBuilder.scala index de5e3e7389..f74badeb48 100755 --- a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core2/message/senders/MsgBuilder.scala +++ b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core2/message/senders/MsgBuilder.scala @@ -637,11 +637,12 @@ object MsgBuilder { meetingId: String, voiceConf: String, userId: String, + callerNum: String, enabled: Boolean ): BbbCommonEnvCoreMsg = { val routing = collection.immutable.HashMap("sender" -> "bbb-apps-akka") val envelope = BbbCoreEnvelope(ToggleListenOnlyModeSysMsg.NAME, routing) - val body = ToggleListenOnlyModeSysMsgBody(voiceConf, userId, enabled) + val body = ToggleListenOnlyModeSysMsgBody(voiceConf, userId, callerNum, enabled) val header = BbbCoreHeaderWithMeetingId(ToggleListenOnlyModeSysMsg.NAME, meetingId) val event = ToggleListenOnlyModeSysMsg(header, body) diff --git a/bbb-common-message/src/main/scala/org/bigbluebutton/common2/msgs/VoiceConfMsgs.scala b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/msgs/VoiceConfMsgs.scala index 86d878e6c1..5fedb8792c 100755 --- a/bbb-common-message/src/main/scala/org/bigbluebutton/common2/msgs/VoiceConfMsgs.scala +++ b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/msgs/VoiceConfMsgs.scala @@ -685,6 +685,7 @@ case class ToggleListenOnlyModeSysMsg( case class ToggleListenOnlyModeSysMsgBody( voiceConf: String, userId: String, + callerNum: String, enabled: Boolean ) @@ -701,5 +702,6 @@ case class ListenOnlyModeToggledInSfuEvtMsgBody( meetingId: String, voiceConf: String, userId: String, + callerNum: String, enabled: Boolean )