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.
This commit is contained in:
prlanzarin 2024-06-24 11:22:45 -03:00
parent baa62ab1ef
commit 623c90b19f
3 changed files with 8 additions and 1 deletions

View File

@ -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
)
}

View File

@ -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)

View File

@ -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
)