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, liveMeeting,
outGW, outGW,
mutedUser.intId, mutedUser.intId,
mutedUser.callerNum,
muted, muted,
toggleListenOnlyAfterMuteTimer toggleListenOnlyAfterMuteTimer
) )
@ -476,6 +477,7 @@ object VoiceApp extends SystemConfiguration {
liveMeeting: LiveMeeting, liveMeeting: LiveMeeting,
outGW: OutMsgRouter, outGW: OutMsgRouter,
userId: String, userId: String,
callerNum: String,
enabled: Boolean, enabled: Boolean,
delay: Int = 0 delay: Int = 0
)(implicit context: ActorContext): Unit = { )(implicit context: ActorContext): Unit = {
@ -485,6 +487,7 @@ object VoiceApp extends SystemConfiguration {
liveMeeting.props.meetingProp.intId, liveMeeting.props.meetingProp.intId,
liveMeeting.props.voiceProp.voiceConf, liveMeeting.props.voiceProp.voiceConf,
userId, userId,
callerNum,
enabled enabled
) )
outGW.send(event) outGW.send(event)
@ -550,6 +553,7 @@ object VoiceApp extends SystemConfiguration {
liveMeeting, liveMeeting,
outGW, outGW,
intId, intId,
vu.callerNum,
vu.muted vu.muted
) )
} }

View File

@ -637,11 +637,12 @@ object MsgBuilder {
meetingId: String, meetingId: String,
voiceConf: String, voiceConf: String,
userId: String, userId: String,
callerNum: String,
enabled: Boolean enabled: Boolean
): BbbCommonEnvCoreMsg = { ): BbbCommonEnvCoreMsg = {
val routing = collection.immutable.HashMap("sender" -> "bbb-apps-akka") val routing = collection.immutable.HashMap("sender" -> "bbb-apps-akka")
val envelope = BbbCoreEnvelope(ToggleListenOnlyModeSysMsg.NAME, routing) 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 header = BbbCoreHeaderWithMeetingId(ToggleListenOnlyModeSysMsg.NAME, meetingId)
val event = ToggleListenOnlyModeSysMsg(header, body) val event = ToggleListenOnlyModeSysMsg(header, body)

View File

@ -685,6 +685,7 @@ case class ToggleListenOnlyModeSysMsg(
case class ToggleListenOnlyModeSysMsgBody( case class ToggleListenOnlyModeSysMsgBody(
voiceConf: String, voiceConf: String,
userId: String, userId: String,
callerNum: String,
enabled: Boolean enabled: Boolean
) )
@ -701,5 +702,6 @@ case class ListenOnlyModeToggledInSfuEvtMsgBody(
meetingId: String, meetingId: String,
voiceConf: String, voiceConf: String,
userId: String, userId: String,
callerNum: String,
enabled: Boolean enabled: Boolean
) )