diff --git a/akka-bbb-apps/src/main/java/org/bigbluebutton/core/api/IBigBlueButtonInGW.java b/akka-bbb-apps/src/main/java/org/bigbluebutton/core/api/IBigBlueButtonInGW.java index 8c9811d1c022a58dac2bb773c983187ea306e0a2..957eca1d1f00b9e4f1e49fdfbec3fe878c013549 100755 --- a/akka-bbb-apps/src/main/java/org/bigbluebutton/core/api/IBigBlueButtonInGW.java +++ b/akka-bbb-apps/src/main/java/org/bigbluebutton/core/api/IBigBlueButtonInGW.java @@ -114,7 +114,7 @@ public interface IBigBlueButtonInGW { void editCaptionHistory(String meetingID, String userID, Integer startIndex, Integer endIndex, String locale, String text); // DeskShare - void deskShareStarted(String conferenceName, String callerId, String callerIdName); + void deskShareStarted(String confId, String callerId, String callerIdName); void deskShareStopped(String conferenceName, String callerId, String callerIdName); void deskShareRTMPBroadcastStarted(String conferenceName, String streamname, int videoWidth, int videoHeight, String timestamp); void deskShareRTMPBroadcastStopped(String conferenceName, String streamname, int videoWidth, int videoHeight, String timestamp); diff --git a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/BigBlueButtonActor.scala b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/BigBlueButtonActor.scala index 33631c8c0aacf782abd9cb5a33fb415bbf6f57f0..b839c6c981d0e1ecb4f19147defa998d3feb64e1 100755 --- a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/BigBlueButtonActor.scala +++ b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/BigBlueButtonActor.scala @@ -37,11 +37,6 @@ class BigBlueButtonActor(val system: ActorSystem, case msg: UserMutedInVoiceConfMessage => handleUserMutedInVoiceConfMessage(msg) case msg: UserTalkingInVoiceConfMessage => handleUserTalkingInVoiceConfMessage(msg) case msg: VoiceConfRecordingStartedMessage => handleVoiceConfRecordingStartedMessage(msg) - case msg: DeskShareStartedRequest => handleDeskShareStartedRequest(msg) - case msg: DeskShareStoppedRequest => handleDeskShareStoppedRequest(msg) - case msg: DeskShareRTMPBroadcastStartedRequest => handleDeskShareRTMPBroadcastStartedRequest(msg) - case msg: DeskShareRTMPBroadcastStoppedRequest => handleDeskShareRTMPBroadcastStoppedRequest(msg) - case msg: DeskShareGetDeskShareInfoRequest => handleDeskShareGetDeskShareInfoRequest(msg) case _ => // do nothing } @@ -151,6 +146,7 @@ class BigBlueButtonActor(val system: ActorSystem, /** Subscribe to meeting and voice events. **/ eventBus.subscribe(m.actorRef, m.mProps.meetingID) eventBus.subscribe(m.actorRef, m.mProps.voiceBridge) + eventBus.subscribe(m.actorRef, m.mProps.deskshareBridge) meetings += m.mProps.meetingID -> m outGW.send(new MeetingCreated(m.mProps.meetingID, m.mProps.externalMeetingID, m.mProps.recorded, m.mProps.meetingName, @@ -206,52 +202,5 @@ class BigBlueButtonActor(val system: ActorSystem, outGW.send(new GetAllMeetingsReply(resultArray)) } - private def handleDeskShareStartedRequest(msg: DeskShareStartedRequest) { - log.info("handleDeskShareStartedRequest: msg.conferenceName=" + msg.conferenceName) - findMeetingWithVoiceConfId(msg.conferenceName) foreach { m => - { - // println(msg.conferenceName + " (in for each) handleDeskShareStartedRequest BBBActor ") - m.actorRef ! msg - } - } - } - - private def handleDeskShareStoppedRequest(msg: DeskShareStoppedRequest) { - log.info("handleDeskShareStoppedRequest msg.conferenceName=" + msg.conferenceName) - findMeetingWithVoiceConfId(msg.conferenceName) foreach { m => - { - // println(msg.conferenceName + " (in for each) handleDeskShareStoppedRequest BBBActor ") - m.actorRef ! msg - } - } - } - - private def handleDeskShareRTMPBroadcastStartedRequest(msg: DeskShareRTMPBroadcastStartedRequest) { - log.info("handleDeskShareRTMPBroadcastStartedRequest msg.conferenceName=" + msg.conferenceName) - findMeetingWithVoiceConfId(msg.conferenceName) foreach { m => - { - // println(msg.conferenceName + " (in for each) handleDeskShareRTMPBroadcastStartedRequest BBBActor ") - m.actorRef ! msg - } - } - } - - private def handleDeskShareRTMPBroadcastStoppedRequest(msg: DeskShareRTMPBroadcastStoppedRequest) { - log.info("handleDeskShareRTMPBroadcastStoppedRequest msg.conferenceName=" + msg.conferenceName) - findMeetingWithVoiceConfId(msg.conferenceName) foreach { m => - { - // println(msg.conferenceName + " (in for each) handleDeskShareRTMPBroadcastStoppedRequest BBBActor ") - m.actorRef ! msg - } - } - } - - private def handleDeskShareGetDeskShareInfoRequest(msg: DeskShareGetDeskShareInfoRequest): Unit = { - val m = meetings.values.find(m => { - m.mProps.meetingID == msg.conferenceName - }) - m foreach { mActor => mActor.actorRef ! msg } - } - } diff --git a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/BigBlueButtonInGW.scala b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/BigBlueButtonInGW.scala index 211ce68b0207f335e4ce2fbf16ea0c0a6469432d..508011e47fea43eda6fed683a05c162a5915688d 100755 --- a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/BigBlueButtonInGW.scala +++ b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/BigBlueButtonInGW.scala @@ -60,6 +60,7 @@ class BigBlueButtonInGW( msg.payload.name, msg.payload.record, msg.payload.voiceConfId, + msg.payload.voiceConfId + "-DESKSHARE", // WebRTC Desktop conference id msg.payload.durationInMinutes, msg.payload.autoStartRecording, msg.payload.allowStartStopRecording, @@ -498,8 +499,11 @@ class BigBlueButtonInGW( * Message Interface for DeskShare * ***************************************************************** */ - def deskShareStarted(meetingId: String, callerId: String, callerIdName: String) { - eventBus.publish(BigBlueButtonEvent(meetingId, new DeskShareStartedRequest(meetingId, callerId, callerIdName))) + def deskShareStarted(confId: String, callerId: String, callerIdName: String) { + println("____BigBlueButtonInGW::deskShareStarted " + confId + callerId + " " + + callerIdName) + eventBus.publish(BigBlueButtonEvent(confId, new DeskShareStartedRequest(confId, callerId, + callerIdName))) } def deskShareStopped(meetingId: String, callerId: String, callerIdName: String) { diff --git a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/LiveMeeting.scala b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/LiveMeeting.scala index ced4ccc8d1da8414c814940fa6c0127a0e21b21f..7a7cb6b4cbfdd28b56425ec4dcfcbe5a052b12c2 100755 --- a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/LiveMeeting.scala +++ b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/LiveMeeting.scala @@ -163,4 +163,76 @@ class LiveMeeting(val mProps: MeetingProperties, def permissionsEqual(other: Permissions): Boolean = { meetingModel.permissionsEqual(other) } + + // WebRTC Desktop Sharing + + def handleDeskShareStartedRequest(msg: DeskShareStartedRequest): Unit = { + log.info("handleDeskShareStartedRequest: dsStarted=" + meetingModel.getDeskShareStarted()) + + if (!meetingModel.getDeskShareStarted()) { + val timestamp = System.currentTimeMillis().toString + val streamPath = "rtmp://" + mProps.red5DeskShareIP + "/" + mProps.red5DeskShareApp + + "/" + mProps.meetingID + "/" + mProps.meetingID + "-" + timestamp + log.info("handleDeskShareStartedRequest: streamPath=" + streamPath) + + // Tell FreeSwitch to broadcast to RTMP + outGW.send(new DeskShareStartRTMPBroadcast(msg.conferenceName, streamPath)) + + meetingModel.setDeskShareStarted(true) + } + } + + def handleDeskShareStoppedRequest(msg: DeskShareStoppedRequest): Unit = { + log.info("handleDeskShareStoppedRequest: dsStarted=" + meetingModel.getDeskShareStarted()) + + // Tell FreeSwitch to stop broadcasting to RTMP + outGW.send(new DeskShareStopRTMPBroadcast(msg.conferenceName, meetingModel.getRTMPBroadcastingUrl())) + + meetingModel.setDeskShareStarted(false) + } + + def handleDeskShareRTMPBroadcastStartedRequest(msg: DeskShareRTMPBroadcastStartedRequest): Unit = { + log.info("handleDeskShareRTMPBroadcastStartedRequest: isBroadcastingRTMP=" + meetingModel.isBroadcastingRTMP()) + + // only valid if not broadcasting yet + if (!meetingModel.isBroadcastingRTMP()) { + meetingModel.setRTMPBroadcastingUrl(msg.streamname) + meetingModel.broadcastingRTMPStarted() + meetingModel.setDesktopShareVideoWidth(msg.videoWidth) + meetingModel.setDesktopShareVideoHeight(msg.videoHeight) + log.info("START broadcast ALLOWED when isBroadcastingRTMP=false") + + // Notify viewers in the meeting that there's an rtmp stream to view + outGW.send(new DeskShareNotifyViewersRTMP(mProps.meetingID, msg.streamname, msg.videoWidth, msg.videoHeight, true)) + } else { + log.info("START broadcast NOT ALLOWED when isBroadcastingRTMP=true") + } + } + + def handleDeskShareRTMPBroadcastStoppedRequest(msg: DeskShareRTMPBroadcastStoppedRequest): Unit = { + log.info("handleDeskShareRTMPBroadcastStoppedRequest: isBroadcastingRTMP=" + meetingModel.isBroadcastingRTMP()) + + // only valid if currently broadcasting + if (meetingModel.isBroadcastingRTMP()) { + log.info("STOP broadcast ALLOWED when isBroadcastingRTMP=true") + meetingModel.broadcastingRTMPStopped() + + // notify viewers that RTMP broadcast stopped + outGW.send(new DeskShareNotifyViewersRTMP(mProps.meetingID, meetingModel.getRTMPBroadcastingUrl(), + msg.videoWidth, msg.videoHeight, false)) + } else { + log.info("STOP broadcast NOT ALLOWED when isBroadcastingRTMP=false") + } + } + + def handleDeskShareGetDeskShareInfoRequest(msg: DeskShareGetDeskShareInfoRequest): Unit = { + + log.info("handleDeskShareGetDeskShareInfoRequest: " + msg.conferenceName + "isBroadcasting=" + meetingModel.isBroadcastingRTMP()) + if (meetingModel.isBroadcastingRTMP()) { + // if the meeting has an ongoing WebRTC Deskshare session, send a notification + outGW.send(new DeskShareNotifyASingleViewer(mProps.meetingID, msg.requesterID, meetingModel.getRTMPBroadcastingUrl(), + meetingModel.getDesktopShareVideoWidth(), meetingModel.getDesktopShareVideoHeight(), true)) + } + } + } diff --git a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/MeetingActor.scala b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/MeetingActor.scala index dfb42b5bd57a777afa0134e8ee213874c60dcaad..72d17227ea32d9700456ccb0fe16db0d605d77ff 100755 --- a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/MeetingActor.scala +++ b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/MeetingActor.scala @@ -178,77 +178,13 @@ class MeetingActor(val mProps: MeetingProperties, case msg: UpdateCaptionOwnerRequest => liveMeeting.handleUpdateCaptionOwnerRequest(msg) case msg: EditCaptionHistoryRequest => liveMeeting.handleEditCaptionHistoryRequest(msg) - case _ => // do nothing - } - - // Broadcast video stream, - private def handleDeskShareStartedRequest(msg: DeskShareStartedRequest) { - log.info("handleDeskShareStartedRequest: dsStarted=" + meetingModel.getDeskShareStarted()) - - if (!meetingModel.getDeskShareStarted()) { - val timestamp = System.currentTimeMillis().toString() - val streamPath = "rtmp://" + mProps.red5DeskShareIP + "/" + mProps.red5DeskShareApp + - "/" + mProps.meetingID + "/" + mProps.meetingID + "-" + timestamp - log.info("handleDeskShareStartedRequest: streamPath=" + streamPath) - - // Tell FreeSwitch to broadcast to RTMP - outGW.send(new DeskShareStartRTMPBroadcast(msg.conferenceName, streamPath)) - - meetingModel.setDeskShareStarted(true) - } - } - - private def handleDeskShareStoppedRequest(msg: DeskShareStoppedRequest) { - log.info("handleDeskShareStoppedRequest: dsStarted=" + meetingModel.getDeskShareStarted()) - - // Tell FreeSwitch to stop broadcasting to RTMP - outGW.send(new DeskShareStopRTMPBroadcast(msg.conferenceName, meetingModel.getRTMPBroadcastingUrl())) - - meetingModel.setDeskShareStarted(false) - } + case msg: DeskShareStartedRequest => liveMeeting.handleDeskShareStartedRequest(msg) + case msg: DeskShareStoppedRequest => liveMeeting.handleDeskShareStoppedRequest(msg) + case msg: DeskShareRTMPBroadcastStartedRequest => liveMeeting.handleDeskShareRTMPBroadcastStartedRequest(msg) + case msg: DeskShareRTMPBroadcastStoppedRequest => liveMeeting.handleDeskShareRTMPBroadcastStoppedRequest(msg) + case msg: DeskShareGetDeskShareInfoRequest => liveMeeting.handleDeskShareGetDeskShareInfoRequest(msg) - private def handleDeskShareRTMPBroadcastStartedRequest(msg: DeskShareRTMPBroadcastStartedRequest) { - log.info("handleDeskShareRTMPBroadcastStartedRequest: isBroadcastingRTMP=" + meetingModel.isBroadcastingRTMP()) - - // only valid if not broadcasting yet - if (!meetingModel.isBroadcastingRTMP()) { - meetingModel.setRTMPBroadcastingUrl(msg.streamname) - meetingModel.broadcastingRTMPStarted() - meetingModel.setDesktopShareVideoWidth(msg.videoWidth) - meetingModel.setDesktopShareVideoHeight(msg.videoHeight) - log.info("START broadcast ALLOWED when isBroadcastingRTMP=false") - - // Notify viewers in the meeting that there's an rtmp stream to view - outGW.send(new DeskShareNotifyViewersRTMP(mProps.meetingID, msg.streamname, msg.videoWidth, msg.videoHeight, true)) - } else { - log.info("START broadcast NOT ALLOWED when isBroadcastingRTMP=true") - } - } - - private def handleDeskShareRTMPBroadcastStoppedRequest(msg: DeskShareRTMPBroadcastStoppedRequest) { - log.info("handleDeskShareRTMPBroadcastStoppedRequest: isBroadcastingRTMP=" + meetingModel.isBroadcastingRTMP()) - - // only valid if currently broadcasting - if (meetingModel.isBroadcastingRTMP()) { - log.info("STOP broadcast ALLOWED when isBroadcastingRTMP=true") - meetingModel.broadcastingRTMPStopped() - - // notify viewers that RTMP broadcast stopped - outGW.send(new DeskShareNotifyViewersRTMP(mProps.meetingID, meetingModel.getRTMPBroadcastingUrl(), - msg.videoWidth, msg.videoHeight, false)) - } else { - log.info("STOP broadcast NOT ALLOWED when isBroadcastingRTMP=false") - } - } - - private def handleDeskShareGetDeskShareInfoRequest(msg: DeskShareGetDeskShareInfoRequest): Unit = { - - log.info("handleDeskShareGetDeskShareInfoRequest: " + msg.conferenceName + "isBroadcasting=" + meetingModel.isBroadcastingRTMP()) - if (meetingModel.isBroadcastingRTMP()) { - // if the meeting has an ongoing WebRTC Deskshare session, send a notification - outGW.send(new DeskShareNotifyASingleViewer(mProps.meetingID, msg.requesterID, meetingModel.getRTMPBroadcastingUrl(), - meetingModel.getDesktopShareVideoWidth(), meetingModel.getDesktopShareVideoHeight(), true)) - } + case _ => // do nothing } } diff --git a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/MeetingModel.scala b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/MeetingModel.scala index 41bc576fe5ecc8cba6c7d87cce3c5cf007587ce7..241bde0f856baf53663f9f00187ccadfa4a319dc 100755 --- a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/MeetingModel.scala +++ b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/MeetingModel.scala @@ -5,9 +5,9 @@ import java.util.concurrent.TimeUnit case object StopMeetingActor case class MeetingProperties(meetingID: String, externalMeetingID: String, meetingName: String, recorded: Boolean, - voiceBridge: String, duration: Int, autoStartRecording: Boolean, allowStartStopRecording: Boolean, - moderatorPass: String, viewerPass: String, createTime: Long, createDate: String, - red5DeskShareIP: String, red5DeskShareApp: String, isBreakout: Boolean) + voiceBridge: String, deskshareBridge: String, duration: Int, autoStartRecording: Boolean, + allowStartStopRecording: Boolean, moderatorPass: String, viewerPass: String, createTime: Long, + createDate: String, red5DeskShareIP: String, red5DeskShareApp: String, isBreakout: Boolean) case class MeetingExtensionProp(maxExtensions: Int = 2, numExtensions: Int = 0, extendByMinutes: Int = 20, sendNotice: Boolean = true, sent15MinNotice: Boolean = false, diff --git a/akka-bbb-apps/src/test/scala/org/bigbluebutton/core/AppsTestFixtures.scala b/akka-bbb-apps/src/test/scala/org/bigbluebutton/core/AppsTestFixtures.scala index ef901d3464b95c0f1cb0a9ff9a5de33294e860d4..97bf4c31003f97f1260c8d961393c0006bf1a98f 100755 --- a/akka-bbb-apps/src/test/scala/org/bigbluebutton/core/AppsTestFixtures.scala +++ b/akka-bbb-apps/src/test/scala/org/bigbluebutton/core/AppsTestFixtures.scala @@ -7,6 +7,7 @@ trait AppsTestFixtures { val meetingName = "test meeting" val record = false val voiceConfId = "85115" + val deskshareConfId = "85115-DESKSHARE" val durationInMinutes = 10 val autoStartRecording = false val allowStartStopRecording = false @@ -18,7 +19,7 @@ trait AppsTestFixtures { val mProps = new MeetingProperties(meetingId, externalMeetingId, meetingName, record, - voiceConfId, + voiceConfId, deskshareConfId, durationInMinutes, autoStartRecording, allowStartStopRecording, moderatorPassword, viewerPassword, diff --git a/akka-bbb-fsesl/fs_conf_files/conf/dialplan/default.xml b/akka-bbb-fsesl/fs_conf_files/conf/dialplan/default.xml index e79b78e64f0e6ee0802978cdd3e23854a4e5902a..73219f1b2f06e7f96ec60f2e288fef90d62460c0 100644 --- a/akka-bbb-fsesl/fs_conf_files/conf/dialplan/default.xml +++ b/akka-bbb-fsesl/fs_conf_files/conf/dialplan/default.xml @@ -13,20 +13,12 @@ <include> <context name="default"> <extension name="public_extensions"> - <condition field="destination_number" expression="^\d{5}$"> + <condition field="destination_number" expression="^\d{5}-DESKSHARE$"> <action application="log" data="INFO AAAAAA transferring to $1 XML public!!"/> <action application="transfer" data="${destination_number} XML public"/> </condition> </extension> - - <extension name="public_extensions"> - <condition field="destination_number" expression="^(\d{5})(-screen)$"> - <action application="log" data="INFO BB $1 $2 BBBB transferring to $1 XML public!!"/> - <action application="transfer" data="$1 XML public"/> - </condition> - </extension> - <!-- other extensions --> </context> diff --git a/akka-bbb-fsesl/fs_conf_files/conf/dialplan/public.xml b/akka-bbb-fsesl/fs_conf_files/conf/dialplan/public.xml index eb61209ed1e0285926592998fe531b49875a3770..fce3a678b1edf27b17a363caf718eb3b2e123320 100644 --- a/akka-bbb-fsesl/fs_conf_files/conf/dialplan/public.xml +++ b/akka-bbb-fsesl/fs_conf_files/conf/dialplan/public.xml @@ -16,10 +16,10 @@ <!-- other extensions --> <extension name="public_extensions"> - <condition field="destination_number" expression="^\d{5}$"> - <action application="log" data="INFO ************ redirecting ${destination_number} to ${destination_number}-DESKSHARE@video-mcu-stereo ***********" /> + <condition field="destination_number" expression="^\d{5}-DESKSHARE$"> + <action application="log" data="INFO ************WEBRTC DESKSHARE EXT***********" /> <action application="answer"/> - <action application="conference" data="${destination_number}-DESKSHARE@video-mcu-stereo"/> + <action application="conference" data="${destination_number}@video-mcu-stereo"/> </condition> </extension> diff --git a/akka-bbb-fsesl/src/main/java/org/bigbluebutton/freeswitch/voice/freeswitch/ESLEventListener.java b/akka-bbb-fsesl/src/main/java/org/bigbluebutton/freeswitch/voice/freeswitch/ESLEventListener.java index feac5d62a08c53f9019342d7e8e28a2bd76a81bc..cea28a7494a765a59428fe5cc57a7d3fe9480a05 100755 --- a/akka-bbb-fsesl/src/main/java/org/bigbluebutton/freeswitch/voice/freeswitch/ESLEventListener.java +++ b/akka-bbb-fsesl/src/main/java/org/bigbluebutton/freeswitch/voice/freeswitch/ESLEventListener.java @@ -28,8 +28,6 @@ public class ESLEventListener implements IEslEventListener { private static final String STOP_RECORDING_EVENT = "stop-recording"; private static final String DESKSHARE_CONFERENCE_NAME_SUFFIX = "-DESKSHARE"; - private static final String DESKSHARE_CALLER_NAME_SUFFIX = " (Screen)"; - private static final String DESKSHARE_CALLER_ID_SUFFIX = " (screen)"; private final ConferenceEventListener conferenceEventListener; @@ -68,7 +66,8 @@ public class ESLEventListener implements IEslEventListener { String voiceUserId = callerIdName; - System.out.println("User joined voice conference, user=[" + callerIdName + "], conf=[" + confName + "]"); + System.out.println("User joined voice conference, user=[" + callerIdName + "], conf=[" + + confName + "] callerId=[" + callerId + "]"); Matcher gapMatcher = GLOBAL_AUDION_PATTERN.matcher(callerIdName); if (gapMatcher.matches()) { @@ -76,24 +75,21 @@ public class ESLEventListener implements IEslEventListener { return; } - // Deskstop sharing conferences have their name in the form ddddd-DESKSHARE - // Deskstop sharing conferences have the user with the desktop video displayed in this way: - // username (Screen) and usernum (screen) - if (confName.endsWith(DESKSHARE_CONFERENCE_NAME_SUFFIX) && - callerId.endsWith(DESKSHARE_CALLER_ID_SUFFIX) && - callerIdName.endsWith(DESKSHARE_CALLER_NAME_SUFFIX)) { + // (WebRTC) Deskstop sharing conferences' name is of the form ddddd-DESKSHARE + // Voice conferences' name is of the form ddddd + if (confName.endsWith(DESKSHARE_CONFERENCE_NAME_SUFFIX)) { DeskShareStartedEvent dsStart = new DeskShareStartedEvent(confName, callerId, callerIdName); conferenceEventListener.handleConferenceEvent(dsStart); - } + } else { + Matcher matcher = CALLERNAME_PATTERN.matcher(callerIdName); + if (matcher.matches()) { + voiceUserId = matcher.group(1).trim(); + callerIdName = matcher.group(2).trim(); + } - Matcher matcher = CALLERNAME_PATTERN.matcher(callerIdName); - if (matcher.matches()) { - voiceUserId = matcher.group(1).trim(); - callerIdName = matcher.group(2).trim(); + VoiceUserJoinedEvent pj = new VoiceUserJoinedEvent(voiceUserId, memberId.toString(), confName, callerId, callerIdName, muted, speaking, ""); + conferenceEventListener.handleConferenceEvent(pj); } - - VoiceUserJoinedEvent pj = new VoiceUserJoinedEvent(voiceUserId, memberId.toString(), confName, callerId, callerIdName, muted, speaking, ""); - conferenceEventListener.handleConferenceEvent(pj); } @Override @@ -103,18 +99,15 @@ public class ESLEventListener implements IEslEventListener { String callerId = this.getCallerIdFromEvent(event); String callerIdName = this.getCallerIdNameFromEvent(event); - // Deskstop sharing conferences have their name in the form ddddd-DESKSHARE - // Deskstop sharing conferences have the user with the desktop video displayed in this way: - // username (Screen) and usernum (screen) - if (confName.endsWith(DESKSHARE_CONFERENCE_NAME_SUFFIX) && - callerId.endsWith(DESKSHARE_CALLER_ID_SUFFIX) && - callerIdName.endsWith(DESKSHARE_CALLER_NAME_SUFFIX)) { + // (WebRTC) Deskstop sharing conferences' name is of the form ddddd-DESKSHARE + // Voice conferences' name is of the form ddddd + if (confName.endsWith(DESKSHARE_CONFERENCE_NAME_SUFFIX)) { DeskShareEndedEvent dsEnd = new DeskShareEndedEvent(confName, callerId, callerIdName); conferenceEventListener.handleConferenceEvent(dsEnd); + } else { + VoiceUserLeftEvent pl = new VoiceUserLeftEvent(memberId.toString(), confName); + conferenceEventListener.handleConferenceEvent(pl); } - - VoiceUserLeftEvent pl = new VoiceUserLeftEvent(memberId.toString(), confName); - conferenceEventListener.handleConferenceEvent(pl); } @Override diff --git a/akka-bbb-fsesl/src/main/scala/org/bigbluebutton/freeswitch/VoiceConferenceService.scala b/akka-bbb-fsesl/src/main/scala/org/bigbluebutton/freeswitch/VoiceConferenceService.scala index 51db6186dc061217ff66f8a80b84e9263e9cc644..e4e5195c5396df07c3fa9bc83293dfa00dccf12d 100755 --- a/akka-bbb-fsesl/src/main/scala/org/bigbluebutton/freeswitch/VoiceConferenceService.scala +++ b/akka-bbb-fsesl/src/main/scala/org/bigbluebutton/freeswitch/VoiceConferenceService.scala @@ -14,8 +14,7 @@ import org.bigbluebutton.common.messages.DeskShareRTMPBroadcastStoppedEventMessa class VoiceConferenceService(sender: RedisPublisher) extends IVoiceConferenceService { - val FROM_VOICE_CONF_SYSTEM_CHAN = "bigbluebutton:from-voice-conf:system"; - private final val DESKSHARE_CONFERENCE_NAME_SUFFIX = "-DESKSHARE" + val FROM_VOICE_CONF_SYSTEM_CHAN = "bigbluebutton:from-voice-conf:system" def voiceConfRecordingStarted(voiceConfId: String, recordStream: String, recording: java.lang.Boolean, timestamp: String) { val msg = new VoiceConfRecordingStartedMessage(voiceConfId, recordStream, recording, timestamp) @@ -52,30 +51,26 @@ class VoiceConferenceService(sender: RedisPublisher) extends IVoiceConferenceSer } def deskShareStarted(voiceConfId: String, callerIdNum: String, callerIdName: String) { - val trimmedVoiceConfId = voiceConfId.replace(DESKSHARE_CONFERENCE_NAME_SUFFIX, "") - println("******** FreeswitchConferenceService send deskShareStarted to BBB " + trimmedVoiceConfId) - val msg = new DeskShareStartedEventMessage(trimmedVoiceConfId, callerIdNum, callerIdName) + println("******** FreeswitchConferenceService send deskShareStarted to BBB " + voiceConfId) + val msg = new DeskShareStartedEventMessage(voiceConfId, callerIdNum, callerIdName) sender.publish(FROM_VOICE_CONF_SYSTEM_CHAN, msg.toJson()) } def deskShareEnded(voiceConfId: String, callerIdNum: String, callerIdName: String) { - val trimmedVoiceConfId = voiceConfId.replace(DESKSHARE_CONFERENCE_NAME_SUFFIX, "") - println("******** FreeswitchConferenceService send deskShareStopped to BBB " + trimmedVoiceConfId) - val msg = new DeskShareStoppedEventMessage(trimmedVoiceConfId, callerIdNum, callerIdName) + println("******** FreeswitchConferenceService send deskShareStopped to BBB " + voiceConfId) + val msg = new DeskShareStoppedEventMessage(voiceConfId, callerIdNum, callerIdName) sender.publish(FROM_VOICE_CONF_SYSTEM_CHAN, msg.toJson()) } def deskShareRTMPBroadcastStarted(voiceConfId: String, streamname: String, vw: java.lang.Integer, vh: java.lang.Integer, timestamp: String) { - val trimmedVoiceConfId = voiceConfId.replace(DESKSHARE_CONFERENCE_NAME_SUFFIX, "") - println("******** FreeswitchConferenceService send deskShareRTMPBroadcastStarted to BBB " + trimmedVoiceConfId) - val msg = new DeskShareRTMPBroadcastStartedEventMessage(trimmedVoiceConfId, streamname, vw, vh, timestamp) + println("******** FreeswitchConferenceService send deskShareRTMPBroadcastStarted to BBB " + voiceConfId) + val msg = new DeskShareRTMPBroadcastStartedEventMessage(voiceConfId, streamname, vw, vh, timestamp) sender.publish(FROM_VOICE_CONF_SYSTEM_CHAN, msg.toJson()) } def deskShareRTMPBroadcastStopped(voiceConfId: String, streamname: String, vw: java.lang.Integer, vh: java.lang.Integer, timestamp: String) { - val trimmedVoiceConfId = voiceConfId.replace(DESKSHARE_CONFERENCE_NAME_SUFFIX, "") - println("******** FreeswitchConferenceService send deskShareRTMPBroadcastStopped to BBB " + trimmedVoiceConfId) - val msg = new DeskShareRTMPBroadcastStoppedEventMessage(trimmedVoiceConfId, streamname, vw, vh, timestamp) + println("******** FreeswitchConferenceService send deskShareRTMPBroadcastStopped to BBB " + voiceConfId) + val msg = new DeskShareRTMPBroadcastStoppedEventMessage(voiceConfId, streamname, vw, vh, timestamp) sender.publish(FROM_VOICE_CONF_SYSTEM_CHAN, msg.toJson()) } diff --git a/bigbluebutton-html5/start.sh b/bigbluebutton-html5/start.sh index 38926a7a4dd285be7e68ef81ae55a22d405b4d21..9d97a072f5fc5a5796daaa12c3784b2cf8126e1f 100755 --- a/bigbluebutton-html5/start.sh +++ b/bigbluebutton-html5/start.sh @@ -1,4 +1,4 @@ # # the idea is that this way we prevent test runs (for whenever needed) -HOME=/usr/share/meteor JASMINE_SERVER_UNIT=0 JASMINE_SERVER_INTEGRATION=0 JASMINE_CLIENT_INTEGRATION=0 JASMINE_BROWSER=PhantomJS JASMINE_MIRROR_PORT=3000 ROOT_URL=http://127.0.0.1/html5client meteor +JASMINE_SERVER_UNIT=0 JASMINE_SERVER_INTEGRATION=0 JASMINE_CLIENT_INTEGRATION=0 JASMINE_BROWSER=PhantomJS JASMINE_MIRROR_PORT=3000 ROOT_URL=http://127.0.0.1/html5client meteor # ROOT_URL_PATH_PREFIX=html5client meteor diff --git a/video-broadcast/build.gradle b/video-broadcast/build.gradle index c0df10b2ac9bac5943d6fe95aed0cc139f36b2af..2982d5f96f8887d9f5e95750d1efaecf949afaad 100755 --- a/video-broadcast/build.gradle +++ b/video-broadcast/build.gradle @@ -59,7 +59,7 @@ dependencies { //redis compile 'redis.clients:jedis:2.0.0' - providedCompile 'commons-pool:commons-pool:1.5.6' + compile 'commons-pool:commons-pool:1.5.6' compile 'com.google.code.gson:gson:1.7.1' compile 'org.bigbluebutton:bbb-common-message:0.0.18-SNAPSHOT'