Modified API to be able to map conferences by their name instead of their voiceBridge number. To preserve backwards compatibility is sufficient to pass the voiceBridge number as the conference name in the API call.
This commit is contained in:
parent
c2d4415b38
commit
a7156aa0a6
@ -87,6 +87,10 @@ public class BigBlueButtonApplication extends MultiThreadedApplicationAdapter {
|
||||
|
||||
@Override
|
||||
public boolean roomConnect(IConnection connection, Object[] params) {
|
||||
System.out.println("\n\nVOISMART: ROOM CONNECT\n\n");
|
||||
for (int i = 0; i < params.length; i++) {
|
||||
System.out.println("VOISMART: Parameter " + (i+1) + ": " + params[i]);
|
||||
}
|
||||
String remoteHost = Red5.getConnectionLocal().getRemoteAddress();
|
||||
int remotePort = Red5.getConnectionLocal().getRemotePort();
|
||||
String username = ((String) params[0]).toString();
|
||||
@ -98,7 +102,9 @@ public class BigBlueButtonApplication extends MultiThreadedApplicationAdapter {
|
||||
* equivalent (i.e. zero (0) becomes 48) if we don't.
|
||||
*/
|
||||
long clientID = Long.parseLong(Red5.getConnectionLocal().getClient().getId());
|
||||
String sessionName = connection.getScope().getName();
|
||||
//VOISMART
|
||||
//String sessionName = connection.getScope().getName();
|
||||
String sessionName = ((String)params[3]).toString();
|
||||
log.info("[clientid=" + clientID + "] connected from " + remoteHost + ":" + remotePort + ".");
|
||||
|
||||
String voiceBridge = ((String) params[4]).toString();
|
||||
|
@ -79,11 +79,18 @@ public class VoiceHandler extends ApplicationAdapter implements IApplication{
|
||||
|
||||
@Override
|
||||
public boolean roomConnect(IConnection connection, Object[] params) {
|
||||
System.out.println("\n\nVOISMART: roomConnect in VoiceHandler\n\n");
|
||||
|
||||
for (int i = 0; i < params.length; i++) {
|
||||
System.out.println("Parameter " + i + ": " + params[i]);
|
||||
}
|
||||
|
||||
log.debug(APP + ":roomConnect");
|
||||
log.debug("In live mode");
|
||||
ISharedObject so = getSharedObject(connection.getScope(), VOICE_SO);
|
||||
|
||||
String voiceBridge = getBbbSession().getVoiceBridge();
|
||||
String voiceBridge = getBbbSession().getSessionName();
|
||||
System.out.println("\n\nVOISMART: roomConnect voiceBridge (sessionName): " + voiceBridge);
|
||||
String meetingid = getBbbSession().getConference();
|
||||
Boolean record = getBbbSession().getRecord();
|
||||
|
||||
|
@ -34,10 +34,10 @@ public class VoiceService {
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public Map<String, List> getMeetMeUsers() {
|
||||
String voiceBridge = getBbbSession().getVoiceBridge();
|
||||
String confName = getBbbSession().getSessionName();
|
||||
|
||||
log.debug("GetMeetmeUsers request for room[" + voiceBridge + "]");
|
||||
ArrayList<Participant> p = conferenceService.getParticipants(voiceBridge);
|
||||
log.debug("GetMeetmeUsers request for room[" + confName + "]");
|
||||
ArrayList<Participant> p = conferenceService.getParticipants(confName);
|
||||
|
||||
Map participants = new HashMap();
|
||||
if (p == null) {
|
||||
@ -71,30 +71,30 @@ public class VoiceService {
|
||||
}
|
||||
|
||||
public void muteAllUsers(boolean mute) {
|
||||
String conference = getBbbSession().getVoiceBridge();
|
||||
String conference = getBbbSession().getSessionName();
|
||||
log.debug("Mute all users in room[" + conference + "]");
|
||||
conferenceService.mute(conference, mute);
|
||||
}
|
||||
|
||||
public boolean isRoomMuted(){
|
||||
String conference = getBbbSession().getVoiceBridge();
|
||||
String conference = getBbbSession().getSessionName();
|
||||
return conferenceService.isRoomMuted(conference);
|
||||
}
|
||||
|
||||
public void muteUnmuteUser(Integer userid,Boolean mute) {
|
||||
String conference = getBbbSession().getVoiceBridge();
|
||||
String conference = getBbbSession().getSessionName();
|
||||
log.debug("MuteUnmute request for user [" + userid + "] in room[" + conference + "]");
|
||||
conferenceService.mute(userid, conference, mute);
|
||||
}
|
||||
|
||||
public void lockMuteUser(Integer userid, Boolean lock) {
|
||||
String conference = getBbbSession().getVoiceBridge();
|
||||
String conference = getBbbSession().getSessionName();
|
||||
log.debug("Lock request for user [" + userid + "] in room[" + conference + "]");
|
||||
conferenceService.lock(userid, conference, lock);
|
||||
}
|
||||
|
||||
public void kickUSer(Integer userid) {
|
||||
String conference = getBbbSession().getVoiceBridge();
|
||||
String conference = getBbbSession().getSessionName();
|
||||
log.debug("KickUser " + userid + " from " + conference);
|
||||
conferenceService.eject(userid, conference);
|
||||
}
|
||||
|
@ -306,7 +306,7 @@ class ApiController {
|
||||
us.fullname = fullName
|
||||
us.role = role
|
||||
us.conference = meeting.getInternalId()
|
||||
us.room = meeting.getInternalId()
|
||||
us.room = meeting.getName()
|
||||
us.voicebridge = meeting.getTelVoice()
|
||||
us.webvoiceconf = meeting.getWebVoice()
|
||||
us.mode = "LIVE"
|
||||
@ -718,7 +718,6 @@ class ApiController {
|
||||
|
||||
} else {
|
||||
UserSession us = meetingService.getUserSession(session['user-token']);
|
||||
log.info("Found conference for " + us.fullname)
|
||||
response.addHeader("Cache-Control", "no-cache")
|
||||
withFormat {
|
||||
xml {
|
||||
|
Loading…
Reference in New Issue
Block a user