You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openmeetings.apache.org by so...@apache.org on 2016/05/17 17:22:36 UTC
svn commit: r1744295 - in /openmeetings/application:
branches/3.1.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/red5/
branches/3.1.x/openmeetings-db/src/main/java/org/apache/openmeetings/db/dao/room/
branches/3.1.x/openmeetings-...
Author: solomax
Date: Tue May 17 17:22:35 2016
New Revision: 1744295
URL: http://svn.apache.org/viewvc?rev=1744295&view=rev
Log:
[OPENMEETINGS-1403] basic support for external cameras is added
Modified:
openmeetings/application/branches/3.1.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/red5/ScopeApplicationAdapter.java
openmeetings/application/branches/3.1.x/openmeetings-db/src/main/java/org/apache/openmeetings/db/dao/room/SipDao.java
openmeetings/application/branches/3.1.x/openmeetings-db/src/main/java/org/apache/openmeetings/db/entity/room/Client.java
openmeetings/application/branches/3.1.x/openmeetings-flash/src/main/swf/base/hibernate/hibRtmpConnection.lzx
openmeetings/application/branches/3.1.x/openmeetings-flash/src/main/swf/base/mainAttributes.lzx
openmeetings/application/branches/3.1.x/openmeetings-flash/src/main/swf/base/remote/rtmpConnection.lzx
openmeetings/application/branches/3.1.x/openmeetings-flash/src/main/swf/commonVideoViewContentSWF10.lzx
openmeetings/application/branches/3.1.x/openmeetings-flash/src/main/swf/modules/conference/interviewuserlist/interviewUserList.lzx
openmeetings/application/branches/3.1.x/openmeetings-flash/src/main/swf/modules/conference/participants/participants.lzx
openmeetings/application/branches/3.1.x/openmeetings-flash/src/main/swf/modules/conference/restricted/restrictedUserList.lzx
openmeetings/application/branches/3.1.x/openmeetings-flash/src/main/swf/modules/invitation/invitationQuickLoader.lzx
openmeetings/application/branches/3.1.x/openmeetings-install/src/main/java/org/apache/openmeetings/installation/InstallationConfig.java
openmeetings/application/branches/3.1.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/WebSession.java
openmeetings/application/branches/3.2.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/red5/ScopeApplicationAdapter.java
openmeetings/application/branches/3.2.x/openmeetings-db/src/main/java/org/apache/openmeetings/db/dao/room/SipDao.java
openmeetings/application/branches/3.2.x/openmeetings-db/src/main/java/org/apache/openmeetings/db/entity/room/Client.java
openmeetings/application/branches/3.2.x/openmeetings-db/src/main/java/org/apache/openmeetings/db/entity/user/AsteriskSipUser.java
openmeetings/application/branches/3.2.x/openmeetings-flash/src/main/swf/base/hibernate/hibRtmpConnection.lzx
openmeetings/application/branches/3.2.x/openmeetings-flash/src/main/swf/base/mainAttributes.lzx
openmeetings/application/branches/3.2.x/openmeetings-flash/src/main/swf/commonVideoViewContentSWF10.lzx
openmeetings/application/branches/3.2.x/openmeetings-flash/src/main/swf/modules/invitation/invitationQuickLoader.lzx
openmeetings/application/branches/3.2.x/openmeetings-install/src/main/java/org/apache/openmeetings/installation/InstallationConfig.java
openmeetings/application/branches/3.2.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/WebSession.java
openmeetings/application/trunk/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/red5/ScopeApplicationAdapter.java
openmeetings/application/trunk/openmeetings-db/src/main/java/org/apache/openmeetings/db/dao/room/SipDao.java
openmeetings/application/trunk/openmeetings-db/src/main/java/org/apache/openmeetings/db/entity/room/Client.java
openmeetings/application/trunk/openmeetings-db/src/main/java/org/apache/openmeetings/db/entity/user/AsteriskSipUser.java
openmeetings/application/trunk/openmeetings-install/src/main/java/org/apache/openmeetings/installation/InstallationConfig.java
openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/WebSession.java
Modified: openmeetings/application/branches/3.1.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/red5/ScopeApplicationAdapter.java
URL: http://svn.apache.org/viewvc/openmeetings/application/branches/3.1.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/red5/ScopeApplicationAdapter.java?rev=1744295&r1=1744294&r2=1744295&view=diff
==============================================================================
--- openmeetings/application/branches/3.1.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/red5/ScopeApplicationAdapter.java (original)
+++ openmeetings/application/branches/3.1.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/red5/ScopeApplicationAdapter.java Tue May 17 17:22:35 2016
@@ -62,6 +62,7 @@ import org.apache.openmeetings.util.Init
import org.apache.openmeetings.util.OmFileHelper;
import org.apache.openmeetings.util.OpenmeetingsVariables;
import org.apache.openmeetings.util.Version;
+import org.apache.wicket.util.string.Strings;
import org.red5.logging.Red5LoggerFactory;
import org.red5.server.adapter.ApplicationAdapter;
import org.red5.server.api.IClient;
@@ -165,6 +166,7 @@ public class ScopeApplicationAdapter ext
Map<String, Object> map = conn.getConnectParams();
String swfURL = map.containsKey("swfUrl") ? (String)map.get("swfUrl") : "";
+ String securityCode = params != null && params.length > 0 ? (String)params[0] : "";
Client parentClient = null;
//TODO add similar code for other connections
@@ -193,13 +195,13 @@ public class ScopeApplicationAdapter ext
SessionVariablesUtil.setIsScreenClient(conn.getClient());
rcm.setUserId(parentClient.getUserId());
- Long uid = rcm.getUserId();
- SessionVariablesUtil.setUserId(conn.getClient(), uid);
+ Long userId = rcm.getUserId();
+ SessionVariablesUtil.setUserId(conn.getClient(), userId);
rcm.setStreamPublishName(parentSid);
User u = null;
- if (uid != null) {
- long _uid = uid.longValue();
+ if (userId != null) {
+ long _uid = userId.longValue();
u = userDao.get(_uid < 0 ? -_uid : _uid);
}
if (u != null) {
@@ -210,6 +212,11 @@ public class ScopeApplicationAdapter ext
log.debug("publishName :: " + rcm.getStreamPublishName());
sessionManager.updateClientByStreamId(streamId, rcm, false, null);
}
+ if (!Strings.isEmpty(securityCode)) {
+ //FIXME TODO check if client by code is in this room
+ rcm.setSecurityCode(securityCode);
+ sessionManager.updateClientByStreamId(streamId, rcm, false, null);
+ }
// Log the User
conferenceLogDao.add(ConferenceLog.Type.clientConnect,
@@ -504,50 +511,50 @@ public class ScopeApplicationAdapter ext
* This function is kind of private/protected as the client won't be able
* to call it with proper values.
*
- * @param currentClient
- * @param currentScope
+ * @param client
+ * @param scope
*/
- public void roomLeaveByScope(Client currentClient, IScope currentScope, boolean removeUserFromSessionList) {
+ public void roomLeaveByScope(Client client, IScope scope, boolean removeUserFromSessionList) {
try {
- log.debug("currentClient " + currentClient);
- Long roomId = currentClient.getRoomId();
+ log.debug("currentClient " + client);
+ Long roomId = client.getRoomId();
// Log the User
conferenceLogDao.add(ConferenceLog.Type.roomLeave,
- currentClient.getUserId(), currentClient.getStreamid(),
- roomId, currentClient.getUserip(), "");
+ client.getUserId(), client.getStreamid(),
+ roomId, client.getUserip(), "");
// Remove User from Sync List's
if (roomId != null) {
- whiteBoardService.removeUserFromAllLists(currentScope, currentClient);
+ whiteBoardService.removeUserFromAllLists(scope, client);
}
- log.debug("removing Username " + currentClient.getUsername() + " "
- + currentClient.getConnectedSince() + " streamid: "
- + currentClient.getStreamid());
+ log.debug("removing Username " + client.getUsername() + " "
+ + client.getConnectedSince() + " streamid: "
+ + client.getStreamid());
// stop and save any recordings
- if (currentClient.getIsRecording()) {
+ if (client.getIsRecording()) {
log.debug("*** roomLeave Current Client is Recording - stop that");
- if (currentClient.getInterviewPodId() != null) {
+ if (client.getInterviewPodId() != null) {
//interview, TODO need better check
- _stopInterviewRecording(currentClient, currentScope);
+ _stopInterviewRecording(client, scope);
} else {
- recordingService.stopRecordAndSave(currentScope, currentClient, null);
+ recordingService.stopRecordAndSave(scope, client, null);
// set to true and overwrite the default one cause otherwise no
// notification is send
- currentClient.setIsRecording(true);
+ client.setIsRecording(true);
}
}
// Notify all clients of the same currentScope (room) with domain
// and room except the current disconnected cause it could throw an exception
- log.debug("currentScope " + currentScope);
+ log.debug("currentScope " + scope);
- if (currentScope != null && currentScope.getClientConnections() != null) {
+ if (scope != null && scope.getClientConnections() != null) {
// Notify Users of the current Scope
- for (IConnection cons : currentScope.getClientConnections()) {
+ for (IConnection cons : scope.getClientConnections()) {
if (cons != null && cons instanceof IServiceCapableConnection) {
log.debug("sending roomDisconnect to {} client id {}", cons, cons.getClient().getId());
@@ -560,16 +567,16 @@ public class ScopeApplicationAdapter ext
}
//Do not send back to sender, but actually all other clients should receive this message swagner 01.10.2009
- if (!currentClient.getStreamid().equals(rcl.getStreamid())) {
+ if (!client.getStreamid().equals(rcl.getStreamid())) {
// add Notification if another user isrecording
- log.debug("###########[roomLeave]");
+ log.debug("###########[roomLeaveByScope]");
if (rcl.getIsRecording()) {
log.debug("*** roomLeave Any Client is Recording - stop that");
- recordingService.stopRecordingShowForClient(cons, currentClient);
+ recordingService.stopRecordingShowForClient(cons, client);
}
boolean isScreen = rcl.isScreenClient();
- if (isScreen && currentClient.getPublicSID().equals(rcl.getStreamPublishName())) {
+ if (isScreen && client.getPublicSID().equals(rcl.getStreamPublishName())) {
//going to terminate screen sharing started by this client
((IServiceCapableConnection) cons).invoke("stopStream", new Object[] { },this);
continue;
@@ -579,7 +586,7 @@ public class ScopeApplicationAdapter ext
}
// Send to all connected users
- ((IServiceCapableConnection) cons).invoke("roomDisconnect", new Object[] { currentClient },this);
+ ((IServiceCapableConnection) cons).invoke("roomDisconnect", new Object[] { client },this);
log.debug("sending roomDisconnect to " + cons);
}
}
@@ -587,7 +594,7 @@ public class ScopeApplicationAdapter ext
}
if (removeUserFromSessionList) {
- sessionManager.removeClient(currentClient.getStreamid(), null);
+ sessionManager.removeClient(client.getStreamid(), null);
}
} catch (Exception err) {
log.error("[roomLeaveByScope]", err);
@@ -622,6 +629,19 @@ public class ScopeApplicationAdapter ext
currentClient.setScreenPublishStarted(true);
sessionManager.updateClientByStreamId(streamid, currentClient, false, null);
}
+ if (!Strings.isEmpty(currentClient.getSecurityCode())) {
+ //FIXME TODO add better mechanism
+ Client parent = sessionManager.getClientByPublicSID(currentClient.getSecurityCode(), null);
+ if (parent == null || !parent.getScope().equals(stream.getScope().getName())) {
+ rejectClient();
+ return;
+ }
+ currentClient.setBroadCastID(Long.parseLong(stream.getPublishedName()));
+ currentClient.setIsBroadcasting(true);
+ currentClient.setVWidth(320);
+ currentClient.setVHeight(240);
+ sessionManager.updateClientByStreamId(streamid, currentClient, false, null);
+ }
log.debug("newStream SEND: " + currentClient);
@@ -841,7 +861,7 @@ public class ScopeApplicationAdapter ext
sendMessageToCurrentScope("setNewModeratorByList", currentMods, true);
} catch (Exception err) {
- log.error("[addModerator]", err);
+ log.error("[removeModerator]", err);
}
return -1L;
}
Modified: openmeetings/application/branches/3.1.x/openmeetings-db/src/main/java/org/apache/openmeetings/db/dao/room/SipDao.java
URL: http://svn.apache.org/viewvc/openmeetings/application/branches/3.1.x/openmeetings-db/src/main/java/org/apache/openmeetings/db/dao/room/SipDao.java?rev=1744295&r1=1744294&r2=1744295&view=diff
==============================================================================
--- openmeetings/application/branches/3.1.x/openmeetings-db/src/main/java/org/apache/openmeetings/db/dao/room/SipDao.java (original)
+++ openmeetings/application/branches/3.1.x/openmeetings-db/src/main/java/org/apache/openmeetings/db/dao/room/SipDao.java Tue May 17 17:22:35 2016
@@ -45,6 +45,7 @@ public class SipDao {
private String sipPassword;
private ManagerConnectionFactory factory;
private ManagerConnection connection;
+ private ManagerConnection eventConnection;
@SuppressWarnings("unused")
private SipDao() {
@@ -58,6 +59,7 @@ public class SipDao {
this.sipPassword = sipPassword;
factory = new ManagerConnectionFactory(this.sipHostname, this.sipPort, this.sipUsername, this.sipPassword);
connection = factory.createManagerConnection(); // TODO secure
+ eventConnection = factory.createManagerConnection(); // TODO secure
}
private ManagerResponse exec(ManagerAction action) {
@@ -65,38 +67,52 @@ public class SipDao {
log.warn("There is no Asterisk configured");
return null;
}
- try {
- connection.login();
- ManagerResponse r = connection.sendAction(action);
- connection.logoff();
- if (log.isDebugEnabled() && r != null) {
- log.debug(r.toString());
- }
- return (r instanceof ManagerError) ? null : r;
- } catch (Exception e) {
- if (log.isDebugEnabled()) {
- log.error("Error while executing ManagerAction: " + action, e);
+ synchronized (connection) {
+ try {
+ connection.login();
+ ManagerResponse r = connection.sendAction(action);
+ if (log.isDebugEnabled() && r != null) {
+ log.debug(r.toString());
+ }
+ return (r instanceof ManagerError) ? null : r;
+ } catch (Exception e) {
+ if (log.isDebugEnabled()) {
+ log.error("Error while executing ManagerAction: " + action, e);
+ }
+ } finally {
+ try {
+ connection.logoff();
+ } catch (Exception e) {
+ // no-op
+ }
}
}
return null;
}
private ResponseEvents execEvent(EventGeneratingAction action) {
- if (connection == null) {
+ if (eventConnection == null) {
log.warn("There is no Asterisk configured");
return null;
}
- try {
- connection.login("on");
- ResponseEvents r = connection.sendEventGeneratingAction(action);
- connection.logoff();
- if (log.isDebugEnabled() && r != null) {
- log.debug(r.getResponse().toString());
- }
- return (r == null || r.getResponse() instanceof ManagerError) ? null : r;
- } catch (Exception e) {
- if (log.isDebugEnabled()) {
- log.error("Error while executing EventGeneratingAction: " + action, e);
+ synchronized (eventConnection) {
+ try {
+ eventConnection.login("on");
+ ResponseEvents r = eventConnection.sendEventGeneratingAction(action);
+ if (log.isDebugEnabled() && r != null) {
+ log.debug(r.getResponse().toString());
+ }
+ return (r == null || r.getResponse() instanceof ManagerError) ? null : r;
+ } catch (Exception e) {
+ if (log.isDebugEnabled()) {
+ log.error("Error while executing EventGeneratingAction: " + action, e);
+ }
+ } finally {
+ try {
+ eventConnection.logoff();
+ } catch (Exception e) {
+ // no-op
+ }
}
}
return null;
@@ -167,6 +183,6 @@ public class SipDao {
oa.setPriority(1);
oa.setTimeout(30000L);
- ManagerResponse resp = exec(oa);
+ exec(oa); //TODO handle response
}
}
Modified: openmeetings/application/branches/3.1.x/openmeetings-db/src/main/java/org/apache/openmeetings/db/entity/room/Client.java
URL: http://svn.apache.org/viewvc/openmeetings/application/branches/3.1.x/openmeetings-db/src/main/java/org/apache/openmeetings/db/entity/room/Client.java?rev=1744295&r1=1744294&r2=1744295&view=diff
==============================================================================
--- openmeetings/application/branches/3.1.x/openmeetings-db/src/main/java/org/apache/openmeetings/db/entity/room/Client.java (original)
+++ openmeetings/application/branches/3.1.x/openmeetings-db/src/main/java/org/apache/openmeetings/db/entity/room/Client.java Tue May 17 17:22:35 2016
@@ -258,10 +258,10 @@ public class Client implements IDataProv
private String lastLogin;
/**
- * @see Client#getOfficial_code()
+ * @see Client#getSecurityCode()
*/
- @Column(name = "official_code")
- private String official_code;
+ @Column(name = "security_code")
+ private String securityCode;
/**
* @see Client#getPicture_uri()
@@ -559,12 +559,12 @@ public class Client implements IDataProv
this.email = email;
}
- public String getOfficial_code() {
- return official_code;
+ public String getSecurityCode() {
+ return securityCode;
}
- public void setOfficial_code(String official_code) {
- this.official_code = official_code;
+ public void setSecurityCode(String securityCode) {
+ this.securityCode = securityCode;
}
public String getPicture_uri() {
Modified: openmeetings/application/branches/3.1.x/openmeetings-flash/src/main/swf/base/hibernate/hibRtmpConnection.lzx
URL: http://svn.apache.org/viewvc/openmeetings/application/branches/3.1.x/openmeetings-flash/src/main/swf/base/hibernate/hibRtmpConnection.lzx?rev=1744295&r1=1744294&r2=1744295&view=diff
==============================================================================
--- openmeetings/application/branches/3.1.x/openmeetings-flash/src/main/swf/base/hibernate/hibRtmpConnection.lzx (original)
+++ openmeetings/application/branches/3.1.x/openmeetings-flash/src/main/swf/base/hibernate/hibRtmpConnection.lzx Tue May 17 17:22:35 2016
@@ -476,8 +476,7 @@
hib.userobject.lastname = lName;
canvas.setAttribute('lastLogin','');
- canvas.setAttribute('official_code','');
- canvas.setAttribute('picture_uri',value.picture_uri);
+ canvas.setAttribute('picture_uri', value.picture_uri);
canvas.setAttribute('language','');
if (canvas.wicketroomid > 0) {
@@ -627,7 +626,6 @@
canvas.setAttribute('lastName', value.lastname == null ? "" : value.lastname);
canvas.setAttribute('mail','');
canvas.setAttribute('lastLogin','');
- canvas.setAttribute('official_code','');
canvas.setAttribute('picture_uri','');
canvas.setAttribute('language','');
canvas.setAttribute('currentuser',value.login);
@@ -635,11 +633,7 @@
canvas.timeZoneId = value.timeZoneId;
}
if (value.rights != null) {
- for (var i = 0; i < value.rights.length; ++i) {
- if ('Admin' == value.rights[i]) {
- canvas.becomemoderator = true;
- }
- }
+ canvas.becomemoderator = value.rights.indexOf('Admin') > -1;
}
if ($debug) Debug.write("hibRtmpConnection::loginWicket -> canvas.becomemoderator", canvas.becomemoderator);
if (value.sessionData == null) {
@@ -737,7 +731,7 @@
if (value == null || value.screenClient) {
return;
}
- canvas.commonVideoViewContent.startStream(value.publicSID,value.broadCastID,value.firstname,value.lastname,value.interviewPodId,value.VWidth,value.VHeight);
+ canvas.commonVideoViewContent.startStream(value);
</method>
<netRemoteCallHib name="closeStream" funcname="closeStream">
@@ -802,7 +796,7 @@
if ($debug) Debug.write("canvas.currentBaseConferenceRoom._chatPanelStrict: ", canvas.currentBaseConferenceRoom._chatPanelStrict);
canvas.currentBaseConferenceRoom._chatPanelStrict.closeprivatechat(["close", value.publicSID]);
}
- if (canvas.currentActivityList != null) {
+ if (!value.securityCode && canvas.currentActivityList != null) {
canvas.currentActivityList.addMessageRequest(value, canvas.getLabelName(1367), new Date().getTime());
}
this.roomDisconnectUser(value, value.publicSID);
Modified: openmeetings/application/branches/3.1.x/openmeetings-flash/src/main/swf/base/mainAttributes.lzx
URL: http://svn.apache.org/viewvc/openmeetings/application/branches/3.1.x/openmeetings-flash/src/main/swf/base/mainAttributes.lzx?rev=1744295&r1=1744294&r2=1744295&view=diff
==============================================================================
--- openmeetings/application/branches/3.1.x/openmeetings-flash/src/main/swf/base/mainAttributes.lzx (original)
+++ openmeetings/application/branches/3.1.x/openmeetings-flash/src/main/swf/base/mainAttributes.lzx Tue May 17 17:22:35 2016
@@ -246,7 +246,6 @@ the LAST RoomClient Object that has been
<attribute name="lastName" value="" type="string" />
<attribute name="mail" value="" type="string" />
<attribute name="lastLogin" value="" type="string" />
-<attribute name="official_code" value="" type="string" />
<attribute name="picture_uri" value="" type="string" />
<attribute name="language" value="" type="string" />
<attribute name="currentClient" value="null" />
Modified: openmeetings/application/branches/3.1.x/openmeetings-flash/src/main/swf/base/remote/rtmpConnection.lzx
URL: http://svn.apache.org/viewvc/openmeetings/application/branches/3.1.x/openmeetings-flash/src/main/swf/base/remote/rtmpConnection.lzx?rev=1744295&r1=1744294&r2=1744295&view=diff
==============================================================================
--- openmeetings/application/branches/3.1.x/openmeetings-flash/src/main/swf/base/remote/rtmpConnection.lzx (original)
+++ openmeetings/application/branches/3.1.x/openmeetings-flash/src/main/swf/base/remote/rtmpConnection.lzx Tue May 17 17:22:35 2016
@@ -52,7 +52,7 @@
this._nc.proxyType = canvas.proxyType;
- var ok = this._nc.connect(src == "null" ? null : src, false);
+ var ok = this._nc.connect(src == "null" ? null : src, "");
if (this.debug) {
if($debug) Debug.write("*** debug ***");
}
Modified: openmeetings/application/branches/3.1.x/openmeetings-flash/src/main/swf/commonVideoViewContentSWF10.lzx
URL: http://svn.apache.org/viewvc/openmeetings/application/branches/3.1.x/openmeetings-flash/src/main/swf/commonVideoViewContentSWF10.lzx?rev=1744295&r1=1744294&r2=1744295&view=diff
==============================================================================
--- openmeetings/application/branches/3.1.x/openmeetings-flash/src/main/swf/commonVideoViewContentSWF10.lzx (original)
+++ openmeetings/application/branches/3.1.x/openmeetings-flash/src/main/swf/commonVideoViewContentSWF10.lzx Tue May 17 17:22:35 2016
@@ -95,7 +95,7 @@
vidContainer.setAttribute("height",281);
}
vidContainer.clientVars = object;
- vidContainer.setAttribute('visibility','hidden');
+ vidContainer.setAttribute('visible', false);
return vidContainer;
</method>
@@ -362,29 +362,37 @@
]]>
</method>
- <method name="startStream" args="publicSID,broadcastId,firstname,lastname,interviewPodId,width,height">
- <![CDATA[
- if ($debug) Debug.write("startStream: ", publicSID,broadcastId,firstname,lastname,interviewPodId,width,height);
- var obj = this.getVideoObjectByPublicSID(publicSID);
- //if ($debug) Debug.write("startStream obj: ",obj);
- if (obj != null ){
- obj._chatvideoinner._videostream.playStream(broadcastId,-1);
- obj.setDefaultVideoSize(width,height);
- obj.setAttribute('chatpartnername',firstname+' '+lastname);
- }
- //we have to do this again when the stream starts, the initial video
- //component does not know the interviewPodId as the user has not selected
- //which interview video pod he is going to use
- if (canvas.isInterview && interviewPodId != null && interviewPodId > 0) {
- if ($debug) Debug.write("Is interview ",interviewPodId,"x",canvas["interviewPod"+interviewPodId+"_x"]);
- obj.setAttribute("interviewPodId", interviewPodId);
- obj.setAttribute("x",canvas["interviewPod"+interviewPodId+"_x"]);
- obj.setAttribute("y",canvas["interviewPod"+interviewPodId+"_y"]);
- obj.setAttribute("width",322);
- obj.setAttribute("height",281);
- }
- return;
- ]]>
+ <method name="startStream" args="value">
+ <![CDATA[
+ //value.publicSID,value.broadCastID,value.firstname,value.lastname,value.interviewPodId,value.VWidth,value.VHeight
+
+ if ($debug) Debug.write("startStream: ", value);
+ var obj = null;
+ if (!!value.securityCode) {
+ obj = createVideoObject(value.publicSID, true, -1, value);
+ obj.setAttribute('visible', true);
+ } else {
+ obj = getVideoObjectByPublicSID(value.publicSID);
+ }
+ //if ($debug) Debug.write("startStream obj: ",obj);
+ if (obj != null ){
+ obj._chatvideoinner._videostream.playStream(value.broadCastID, -1);
+ obj.setDefaultVideoSize(value.VWidth, value.VHeight);
+ obj.setAttribute('chatpartnername', value.firstname + ' ' + value.lastname);
+ }
+ //we have to do this again when the stream starts, the initial video
+ //component does not know the interviewPodId as the user has not selected
+ //which interview video pod he is going to use
+ var interviewPodId = value.interviewPodId;
+ if (canvas.isInterview && interviewPodId != null && interviewPodId > 0) {
+ if ($debug) Debug.write("Is interview ", interviewPodId, "x", canvas["interviewPod" + interviewPodId + "_x"]);
+ obj.setAttribute("interviewPodId", interviewPodId);
+ obj.setAttribute("x",canvas["interviewPod" + interviewPodId + "_x"]);
+ obj.setAttribute("y",canvas["interviewPod" + interviewPodId + "_y"]);
+ obj.setAttribute("width", 322);
+ obj.setAttribute("height", 281);
+ }
+ ]]>
</method>
<!---
Modified: openmeetings/application/branches/3.1.x/openmeetings-flash/src/main/swf/modules/conference/interviewuserlist/interviewUserList.lzx
URL: http://svn.apache.org/viewvc/openmeetings/application/branches/3.1.x/openmeetings-flash/src/main/swf/modules/conference/interviewuserlist/interviewUserList.lzx?rev=1744295&r1=1744294&r2=1744295&view=diff
==============================================================================
--- openmeetings/application/branches/3.1.x/openmeetings-flash/src/main/swf/modules/conference/interviewuserlist/interviewUserList.lzx (original)
+++ openmeetings/application/branches/3.1.x/openmeetings-flash/src/main/swf/modules/conference/interviewuserlist/interviewUserList.lzx Tue May 17 17:22:35 2016
@@ -189,14 +189,6 @@
]]>
</method>
- <!--
- invoked whenever a User starts to Stream Video in this Room,
- interviewPodId has only a meaning in the Room Type Interview
- -->
- <method name="startStream" args="publicSID,broadcastId,firstname,lastname,interviewPodId,VWidth,VHeight">
- canvas.commonVideoViewContent.startStream(publicSID,broadcastId,firstname,lastname,interviewPodId,VWidth,VHeight);
- </method>
-
<method name="updateMuteStatusVideoView" args="roomClient">
canvas.commonVideoViewContent.updateMuteStatusVideoView(roomClient);
</method>
Modified: openmeetings/application/branches/3.1.x/openmeetings-flash/src/main/swf/modules/conference/participants/participants.lzx
URL: http://svn.apache.org/viewvc/openmeetings/application/branches/3.1.x/openmeetings-flash/src/main/swf/modules/conference/participants/participants.lzx?rev=1744295&r1=1744294&r2=1744295&view=diff
==============================================================================
--- openmeetings/application/branches/3.1.x/openmeetings-flash/src/main/swf/modules/conference/participants/participants.lzx (original)
+++ openmeetings/application/branches/3.1.x/openmeetings-flash/src/main/swf/modules/conference/participants/participants.lzx Tue May 17 17:22:35 2016
@@ -234,14 +234,6 @@
canvas.commonVideoViewContent.resetAllValues();
</method>
- <!--
- invoked whenever a User starts to Stream Video in this Room,
- interviewPodId has only a meaning in the Room Type Interview
- -->
- <method name="startStream" args="publicSID,broadcastId,firstname,lastname,interviewPodId,VWidth,VHeight">
- canvas.commonVideoViewContent.startStream(publicSID,broadcastId,firstname,lastname,interviewPodId,VWidth,VHeight);
- </method>
-
<method name="addClientItem" args="connectedSince,isMod,streamid,username,roomId,formatedDate,position,color,object">
<![CDATA[
if ($debug) Debug.write("### initializeStreams addClientItem: ",connectedSince,isMod,streamid,username,roomId,formatedDate);
Modified: openmeetings/application/branches/3.1.x/openmeetings-flash/src/main/swf/modules/conference/restricted/restrictedUserList.lzx
URL: http://svn.apache.org/viewvc/openmeetings/application/branches/3.1.x/openmeetings-flash/src/main/swf/modules/conference/restricted/restrictedUserList.lzx?rev=1744295&r1=1744294&r2=1744295&view=diff
==============================================================================
--- openmeetings/application/branches/3.1.x/openmeetings-flash/src/main/swf/modules/conference/restricted/restrictedUserList.lzx (original)
+++ openmeetings/application/branches/3.1.x/openmeetings-flash/src/main/swf/modules/conference/restricted/restrictedUserList.lzx Tue May 17 17:22:35 2016
@@ -235,14 +235,6 @@
]]>
</method>
- <!--
- invoked whenever a User starts to Stream Video in this Room,
- interviewPodId has only a meaning in the Room Type Interview
- -->
- <method name="startStream" args="publicSID,broadcastId,firstname,lastname,interviewPodId,VWidth,VHeight">
- canvas.commonVideoViewContent.startStream(publicSID,broadcastId,firstname,lastname,interviewPodId,VWidth,VHeight);
- </method>
-
<method name="setSpeakingByPos" args="publicSID,bool">
canvas.commonVideoViewContent.setSpeakingByPos(publicSID, bool);
</method>
Modified: openmeetings/application/branches/3.1.x/openmeetings-flash/src/main/swf/modules/invitation/invitationQuickLoader.lzx
URL: http://svn.apache.org/viewvc/openmeetings/application/branches/3.1.x/openmeetings-flash/src/main/swf/modules/invitation/invitationQuickLoader.lzx?rev=1744295&r1=1744294&r2=1744295&view=diff
==============================================================================
--- openmeetings/application/branches/3.1.x/openmeetings-flash/src/main/swf/modules/invitation/invitationQuickLoader.lzx (original)
+++ openmeetings/application/branches/3.1.x/openmeetings-flash/src/main/swf/modules/invitation/invitationQuickLoader.lzx Tue May 17 17:22:35 2016
@@ -119,7 +119,6 @@
canvas.setAttribute('firstName', fName);
canvas.setAttribute('lastName', lName);
canvas.setAttribute('lastLogin', invitee.lastlogin);
- canvas.setAttribute('official_code','');
canvas.setAttribute('picture_uri', invitee.pictureuri);
canvas.setAttribute('language', invitee.language_id);
Modified: openmeetings/application/branches/3.1.x/openmeetings-install/src/main/java/org/apache/openmeetings/installation/InstallationConfig.java
URL: http://svn.apache.org/viewvc/openmeetings/application/branches/3.1.x/openmeetings-install/src/main/java/org/apache/openmeetings/installation/InstallationConfig.java?rev=1744295&r1=1744294&r2=1744295&view=diff
==============================================================================
--- openmeetings/application/branches/3.1.x/openmeetings-install/src/main/java/org/apache/openmeetings/installation/InstallationConfig.java (original)
+++ openmeetings/application/branches/3.1.x/openmeetings-install/src/main/java/org/apache/openmeetings/installation/InstallationConfig.java Tue May 17 17:22:35 2016
@@ -23,7 +23,7 @@ import static org.apache.openmeetings.ut
import java.io.Serializable;
import org.apache.openmeetings.db.dao.basic.ConfigurationDao;
-import org.apache.openmeetings.util.crypt.MD5Implementation;
+import org.apache.openmeetings.util.crypt.SHA256Implementation;
public class InstallationConfig implements Serializable {
private static final long serialVersionUID = 1L;
@@ -37,7 +37,7 @@ public class InstallationConfig implemen
public String createDefaultRooms = "1";
public String ical_timeZone = "Europe/Berlin";
- public String cryptClassName = MD5Implementation.class.getCanonicalName();
+ public String cryptClassName = SHA256Implementation.class.getCanonicalName();
//email
public Integer smtpPort = 25;
public String smtpServer = "localhost";
Modified: openmeetings/application/branches/3.1.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/WebSession.java
URL: http://svn.apache.org/viewvc/openmeetings/application/branches/3.1.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/WebSession.java?rev=1744295&r1=1744294&r2=1744295&view=diff
==============================================================================
--- openmeetings/application/branches/3.1.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/WebSession.java (original)
+++ openmeetings/application/branches/3.1.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/WebSession.java Tue May 17 17:22:35 2016
@@ -422,7 +422,7 @@ public class WebSession extends Abstract
if (browserTz == null) {
try {
browserTz = getClientInfo().getProperties().getTimeZone();
- if (!AVAILABLE_TIMEZONE_SET.contains(browserTz.getID())) {
+ if (browserTz != null && !AVAILABLE_TIMEZONE_SET.contains(browserTz.getID())) {
for (String availableID : AVAILABLE_TIMEZONES) {
TimeZone zone = TimeZone.getTimeZone(availableID);
if (zone.hasSameRules(browserTz)) {
@@ -433,6 +433,9 @@ public class WebSession extends Abstract
}
_zone = browserTz;
} catch (Exception e) {
+ //no-op
+ }
+ if (browserTz == null) {
_zone = Calendar.getInstance(getBrowserLocale()).getTimeZone();
}
}
Modified: openmeetings/application/branches/3.2.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/red5/ScopeApplicationAdapter.java
URL: http://svn.apache.org/viewvc/openmeetings/application/branches/3.2.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/red5/ScopeApplicationAdapter.java?rev=1744295&r1=1744294&r2=1744295&view=diff
==============================================================================
--- openmeetings/application/branches/3.2.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/red5/ScopeApplicationAdapter.java (original)
+++ openmeetings/application/branches/3.2.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/red5/ScopeApplicationAdapter.java Tue May 17 17:22:35 2016
@@ -166,6 +166,7 @@ public class ScopeApplicationAdapter ext
String swfURL = map.containsKey("swfUrl") ? (String)map.get("swfUrl") : "";
String tcUrl = map.containsKey("tcUrl") ? (String)map.get("tcUrl") : "";
String uid = params != null && params.length > 0 ? (String)params[0] : "";
+ String securityCode = null;//FIXME TODO should named parameter!!!! params != null && params.length > 0 ? (String)params[0] : "";
Client parentClient = null;
//TODO add similar code for other connections
@@ -224,6 +225,11 @@ public class ScopeApplicationAdapter ext
log.debug("publishName :: " + rcm.getStreamPublishName());
sessionManager.updateClientByStreamId(streamId, rcm, false, null);
}
+ if (!Strings.isEmpty(securityCode)) {
+ //FIXME TODO check if client by code is in this room
+ rcm.setSecurityCode(securityCode);
+ sessionManager.updateClientByStreamId(streamId, rcm, false, null);
+ }
// Log the User
conferenceLogDao.add(ConferenceLog.Type.clientConnect,
@@ -641,6 +647,19 @@ public class ScopeApplicationAdapter ext
currentClient.setScreenPublishStarted(true);
sessionManager.updateClientByStreamId(streamid, currentClient, false, null);
}
+ if (!Strings.isEmpty(currentClient.getSecurityCode())) {
+ //FIXME TODO add better mechanism
+ Client parent = sessionManager.getClientByPublicSID(currentClient.getSecurityCode(), null);
+ if (parent == null || !parent.getScope().equals(stream.getScope().getName())) {
+ rejectClient();
+ return;
+ }
+ currentClient.setBroadCastID(Long.parseLong(stream.getPublishedName()));
+ currentClient.setIsBroadcasting(true);
+ currentClient.setVWidth(320);
+ currentClient.setVHeight(240);
+ sessionManager.updateClientByStreamId(streamid, currentClient, false, null);
+ }
log.debug("newStream SEND: " + currentClient);
Modified: openmeetings/application/branches/3.2.x/openmeetings-db/src/main/java/org/apache/openmeetings/db/dao/room/SipDao.java
URL: http://svn.apache.org/viewvc/openmeetings/application/branches/3.2.x/openmeetings-db/src/main/java/org/apache/openmeetings/db/dao/room/SipDao.java?rev=1744295&r1=1744294&r2=1744295&view=diff
==============================================================================
--- openmeetings/application/branches/3.2.x/openmeetings-db/src/main/java/org/apache/openmeetings/db/dao/room/SipDao.java (original)
+++ openmeetings/application/branches/3.2.x/openmeetings-db/src/main/java/org/apache/openmeetings/db/dao/room/SipDao.java Tue May 17 17:22:35 2016
@@ -45,6 +45,7 @@ public class SipDao {
private String sipPassword;
private ManagerConnectionFactory factory;
private ManagerConnection connection;
+ private ManagerConnection eventConnection;
@SuppressWarnings("unused")
private SipDao() {
@@ -58,6 +59,7 @@ public class SipDao {
this.sipPassword = sipPassword;
factory = new ManagerConnectionFactory(this.sipHostname, this.sipPort, this.sipUsername, this.sipPassword);
connection = factory.createManagerConnection(); // TODO secure
+ eventConnection = factory.createManagerConnection(); // TODO secure
}
private ManagerResponse exec(ManagerAction action) {
@@ -65,38 +67,52 @@ public class SipDao {
log.warn("There is no Asterisk configured");
return null;
}
- try {
- connection.login();
- ManagerResponse r = connection.sendAction(action);
- connection.logoff();
- if (log.isDebugEnabled() && r != null) {
- log.debug(r.toString());
- }
- return (r instanceof ManagerError) ? null : r;
- } catch (Exception e) {
- if (log.isDebugEnabled()) {
- log.error("Error while executing ManagerAction: " + action, e);
+ synchronized (connection) {
+ try {
+ connection.login();
+ ManagerResponse r = connection.sendAction(action);
+ if (log.isDebugEnabled() && r != null) {
+ log.debug(r.toString());
+ }
+ return (r instanceof ManagerError) ? null : r;
+ } catch (Exception e) {
+ if (log.isDebugEnabled()) {
+ log.error("Error while executing ManagerAction: " + action, e);
+ }
+ } finally {
+ try {
+ connection.logoff();
+ } catch (Exception e) {
+ // no-op
+ }
}
}
return null;
}
private ResponseEvents execEvent(EventGeneratingAction action) {
- if (connection == null) {
+ if (eventConnection == null) {
log.warn("There is no Asterisk configured");
return null;
}
- try {
- connection.login("on");
- ResponseEvents r = connection.sendEventGeneratingAction(action);
- connection.logoff();
- if (log.isDebugEnabled() && r != null) {
- log.debug(r.getResponse().toString());
- }
- return (r == null || r.getResponse() instanceof ManagerError) ? null : r;
- } catch (Exception e) {
- if (log.isDebugEnabled()) {
- log.error("Error while executing EventGeneratingAction: " + action, e);
+ synchronized (eventConnection) {
+ try {
+ eventConnection.login("on");
+ ResponseEvents r = eventConnection.sendEventGeneratingAction(action);
+ if (log.isDebugEnabled() && r != null) {
+ log.debug(r.getResponse().toString());
+ }
+ return (r == null || r.getResponse() instanceof ManagerError) ? null : r;
+ } catch (Exception e) {
+ if (log.isDebugEnabled()) {
+ log.error("Error while executing EventGeneratingAction: " + action, e);
+ }
+ } finally {
+ try {
+ eventConnection.logoff();
+ } catch (Exception e) {
+ // no-op
+ }
}
}
return null;
@@ -167,6 +183,6 @@ public class SipDao {
oa.setPriority(1);
oa.setTimeout(30000L);
- ManagerResponse resp = exec(oa);
+ exec(oa); //TODO handle response
}
}
Modified: openmeetings/application/branches/3.2.x/openmeetings-db/src/main/java/org/apache/openmeetings/db/entity/room/Client.java
URL: http://svn.apache.org/viewvc/openmeetings/application/branches/3.2.x/openmeetings-db/src/main/java/org/apache/openmeetings/db/entity/room/Client.java?rev=1744295&r1=1744294&r2=1744295&view=diff
==============================================================================
--- openmeetings/application/branches/3.2.x/openmeetings-db/src/main/java/org/apache/openmeetings/db/entity/room/Client.java (original)
+++ openmeetings/application/branches/3.2.x/openmeetings-db/src/main/java/org/apache/openmeetings/db/entity/room/Client.java Tue May 17 17:22:35 2016
@@ -258,10 +258,10 @@ public class Client implements IDataProv
private String lastLogin;
/**
- * @see Client#getOfficial_code()
+ * @see Client#getSecurityCode()
*/
- @Column(name = "official_code")
- private String official_code;
+ @Column(name = "security_code")
+ private String securityCode;
/**
* @see Client#getPicture_uri()
@@ -562,12 +562,12 @@ public class Client implements IDataProv
this.email = email;
}
- public String getOfficial_code() {
- return official_code;
+ public String getSecurityCode() {
+ return securityCode;
}
- public void setOfficial_code(String official_code) {
- this.official_code = official_code;
+ public void setSecurityCode(String securityCode) {
+ this.securityCode = securityCode;
}
public String getPicture_uri() {
Modified: openmeetings/application/branches/3.2.x/openmeetings-db/src/main/java/org/apache/openmeetings/db/entity/user/AsteriskSipUser.java
URL: http://svn.apache.org/viewvc/openmeetings/application/branches/3.2.x/openmeetings-db/src/main/java/org/apache/openmeetings/db/entity/user/AsteriskSipUser.java?rev=1744295&r1=1744294&r2=1744295&view=diff
==============================================================================
--- openmeetings/application/branches/3.2.x/openmeetings-db/src/main/java/org/apache/openmeetings/db/entity/user/AsteriskSipUser.java (original)
+++ openmeetings/application/branches/3.2.x/openmeetings-db/src/main/java/org/apache/openmeetings/db/entity/user/AsteriskSipUser.java Tue May 17 17:22:35 2016
@@ -34,7 +34,7 @@ import org.simpleframework.xml.Element;
import org.simpleframework.xml.Root;
@Entity
-@Table(name = "sipuser")
+@Table(name = "sipusers")
@Root(name="asterisksipuser")
public class AsteriskSipUser implements Serializable {
private static final long serialVersionUID = 1L;
Modified: openmeetings/application/branches/3.2.x/openmeetings-flash/src/main/swf/base/hibernate/hibRtmpConnection.lzx
URL: http://svn.apache.org/viewvc/openmeetings/application/branches/3.2.x/openmeetings-flash/src/main/swf/base/hibernate/hibRtmpConnection.lzx?rev=1744295&r1=1744294&r2=1744295&view=diff
==============================================================================
--- openmeetings/application/branches/3.2.x/openmeetings-flash/src/main/swf/base/hibernate/hibRtmpConnection.lzx (original)
+++ openmeetings/application/branches/3.2.x/openmeetings-flash/src/main/swf/base/hibernate/hibRtmpConnection.lzx Tue May 17 17:22:35 2016
@@ -457,7 +457,6 @@
hib.userobject.lastname = lName;
canvas.setAttribute('lastLogin','');
- canvas.setAttribute('official_code','');
canvas.setAttribute('picture_uri',value.picture_uri);
canvas.setAttribute('language','');
@@ -607,7 +606,6 @@
canvas.setAttribute('lastName', value.lastname == null ? "" : value.lastname);
canvas.setAttribute('mail','');
canvas.setAttribute('lastLogin','');
- canvas.setAttribute('official_code','');
canvas.setAttribute('picture_uri','');
canvas.setAttribute('language','');
canvas.setAttribute('currentuser',value.login);
@@ -706,7 +704,7 @@
if (value == null || value.screenClient) {
return;
}
- canvas.commonVideoViewContent.startStream(value.publicSID,value.broadCastID,value.firstname,value.lastname,value.interviewPodId,value.VWidth,value.VHeight);
+ canvas.commonVideoViewContent.startStream(value);
</method>
<netRemoteCallHib name="closeStream" funcname="closeStream">
Modified: openmeetings/application/branches/3.2.x/openmeetings-flash/src/main/swf/base/mainAttributes.lzx
URL: http://svn.apache.org/viewvc/openmeetings/application/branches/3.2.x/openmeetings-flash/src/main/swf/base/mainAttributes.lzx?rev=1744295&r1=1744294&r2=1744295&view=diff
==============================================================================
--- openmeetings/application/branches/3.2.x/openmeetings-flash/src/main/swf/base/mainAttributes.lzx (original)
+++ openmeetings/application/branches/3.2.x/openmeetings-flash/src/main/swf/base/mainAttributes.lzx Tue May 17 17:22:35 2016
@@ -246,7 +246,6 @@ the LAST RoomClient Object that has been
<attribute name="lastName" value="" type="string" />
<attribute name="mail" value="" type="string" />
<attribute name="lastLogin" value="" type="string" />
-<attribute name="official_code" value="" type="string" />
<attribute name="picture_uri" value="" type="string" />
<attribute name="language" value="" type="string" />
<attribute name="currentClient" value="null" />
Modified: openmeetings/application/branches/3.2.x/openmeetings-flash/src/main/swf/commonVideoViewContentSWF10.lzx
URL: http://svn.apache.org/viewvc/openmeetings/application/branches/3.2.x/openmeetings-flash/src/main/swf/commonVideoViewContentSWF10.lzx?rev=1744295&r1=1744294&r2=1744295&view=diff
==============================================================================
--- openmeetings/application/branches/3.2.x/openmeetings-flash/src/main/swf/commonVideoViewContentSWF10.lzx (original)
+++ openmeetings/application/branches/3.2.x/openmeetings-flash/src/main/swf/commonVideoViewContentSWF10.lzx Tue May 17 17:22:35 2016
@@ -95,7 +95,7 @@
vidContainer.setAttribute("height",281);
}
vidContainer.clientVars = object;
- vidContainer.setAttribute('visibility','hidden');
+ vidContainer.setAttribute('visible', false);
return vidContainer;
</method>
@@ -362,29 +362,37 @@
]]>
</method>
- <method name="startStream" args="publicSID,broadcastId,firstname,lastname,interviewPodId,width,height">
- <![CDATA[
- if ($debug) Debug.write("startStream: ", publicSID,broadcastId,firstname,lastname,interviewPodId,width,height);
- var obj = this.getVideoObjectByPublicSID(publicSID);
- //if ($debug) Debug.write("startStream obj: ",obj);
- if (obj != null ){
- obj._chatvideoinner._videostream.playStream(broadcastId,-1);
- obj.setDefaultVideoSize(width,height);
- obj.setAttribute('chatpartnername',firstname+' '+lastname);
- }
- //we have to do this again when the stream starts, the initial video
- //component does not know the interviewPodId as the user has not selected
- //which interview video pod he is going to use
- if (canvas.isInterview && interviewPodId != null && interviewPodId > 0) {
- if ($debug) Debug.write("Is interview ",interviewPodId,"x",canvas["interviewPod"+interviewPodId+"_x"]);
- obj.setAttribute("interviewPodId", interviewPodId);
- obj.setAttribute("x",canvas["interviewPod"+interviewPodId+"_x"]);
- obj.setAttribute("y",canvas["interviewPod"+interviewPodId+"_y"]);
- obj.setAttribute("width",322);
- obj.setAttribute("height",281);
- }
- return;
- ]]>
+ <method name="startStream" args="value">
+ <![CDATA[
+ //value.publicSID,value.broadCastID,value.firstname,value.lastname,value.interviewPodId,value.VWidth,value.VHeight
+
+ if ($debug) Debug.write("startStream: ", value);
+ var obj = null;
+ if (!!value.securityCode) {
+ obj = createVideoObject(value.publicSID, true, -1, value);
+ obj.setAttribute('visible', true);
+ } else {
+ obj = getVideoObjectByPublicSID(value.publicSID);
+ }
+ //if ($debug) Debug.write("startStream obj: ",obj);
+ if (obj != null ){
+ obj._chatvideoinner._videostream.playStream(value.broadCastID, -1);
+ obj.setDefaultVideoSize(value.VWidth, value.VHeight);
+ obj.setAttribute('chatpartnername', value.firstname + ' ' + value.lastname);
+ }
+ //we have to do this again when the stream starts, the initial video
+ //component does not know the interviewPodId as the user has not selected
+ //which interview video pod he is going to use
+ var interviewPodId = value.interviewPodId;
+ if (canvas.isInterview && interviewPodId != null && interviewPodId > 0) {
+ if ($debug) Debug.write("Is interview ", interviewPodId, "x", canvas["interviewPod" + interviewPodId + "_x"]);
+ obj.setAttribute("interviewPodId", interviewPodId);
+ obj.setAttribute("x",canvas["interviewPod" + interviewPodId + "_x"]);
+ obj.setAttribute("y",canvas["interviewPod" + interviewPodId + "_y"]);
+ obj.setAttribute("width", 322);
+ obj.setAttribute("height", 281);
+ }
+ ]]>
</method>
<!---
Modified: openmeetings/application/branches/3.2.x/openmeetings-flash/src/main/swf/modules/invitation/invitationQuickLoader.lzx
URL: http://svn.apache.org/viewvc/openmeetings/application/branches/3.2.x/openmeetings-flash/src/main/swf/modules/invitation/invitationQuickLoader.lzx?rev=1744295&r1=1744294&r2=1744295&view=diff
==============================================================================
--- openmeetings/application/branches/3.2.x/openmeetings-flash/src/main/swf/modules/invitation/invitationQuickLoader.lzx (original)
+++ openmeetings/application/branches/3.2.x/openmeetings-flash/src/main/swf/modules/invitation/invitationQuickLoader.lzx Tue May 17 17:22:35 2016
@@ -100,7 +100,6 @@
canvas.setAttribute('firstName', fName);
canvas.setAttribute('lastName', lName);
canvas.setAttribute('lastLogin', invitee.lastlogin);
- canvas.setAttribute('official_code','');
canvas.setAttribute('picture_uri', invitee.pictureuri);
canvas.setAttribute('language', invitee.language_id);
Modified: openmeetings/application/branches/3.2.x/openmeetings-install/src/main/java/org/apache/openmeetings/installation/InstallationConfig.java
URL: http://svn.apache.org/viewvc/openmeetings/application/branches/3.2.x/openmeetings-install/src/main/java/org/apache/openmeetings/installation/InstallationConfig.java?rev=1744295&r1=1744294&r2=1744295&view=diff
==============================================================================
--- openmeetings/application/branches/3.2.x/openmeetings-install/src/main/java/org/apache/openmeetings/installation/InstallationConfig.java (original)
+++ openmeetings/application/branches/3.2.x/openmeetings-install/src/main/java/org/apache/openmeetings/installation/InstallationConfig.java Tue May 17 17:22:35 2016
@@ -23,7 +23,7 @@ import static org.apache.openmeetings.ut
import java.io.Serializable;
import org.apache.openmeetings.db.dao.basic.ConfigurationDao;
-import org.apache.openmeetings.util.crypt.MD5Implementation;
+import org.apache.openmeetings.util.crypt.SHA256Implementation;
public class InstallationConfig implements Serializable {
private static final long serialVersionUID = 1L;
@@ -37,7 +37,7 @@ public class InstallationConfig implemen
public String createDefaultRooms = "1";
public String ical_timeZone = "Europe/Berlin";
- public String cryptClassName = MD5Implementation.class.getCanonicalName();
+ public String cryptClassName = SHA256Implementation.class.getCanonicalName();
//email
public Integer smtpPort = 25;
public String smtpServer = "localhost";
Modified: openmeetings/application/branches/3.2.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/WebSession.java
URL: http://svn.apache.org/viewvc/openmeetings/application/branches/3.2.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/WebSession.java?rev=1744295&r1=1744294&r2=1744295&view=diff
==============================================================================
--- openmeetings/application/branches/3.2.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/WebSession.java (original)
+++ openmeetings/application/branches/3.2.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/WebSession.java Tue May 17 17:22:35 2016
@@ -422,7 +422,7 @@ public class WebSession extends Abstract
if (browserTz == null) {
try {
browserTz = getClientInfo().getProperties().getTimeZone();
- if (!AVAILABLE_TIMEZONE_SET.contains(browserTz.getID())) {
+ if (browserTz != null && !AVAILABLE_TIMEZONE_SET.contains(browserTz.getID())) {
for (String availableID : AVAILABLE_TIMEZONES) {
TimeZone zone = TimeZone.getTimeZone(availableID);
if (zone.hasSameRules(browserTz)) {
@@ -433,6 +433,9 @@ public class WebSession extends Abstract
}
_zone = browserTz;
} catch (Exception e) {
+ //no-op
+ }
+ if (browserTz == null) {
_zone = Calendar.getInstance(getBrowserLocale()).getTimeZone();
}
}
Modified: openmeetings/application/trunk/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/red5/ScopeApplicationAdapter.java
URL: http://svn.apache.org/viewvc/openmeetings/application/trunk/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/red5/ScopeApplicationAdapter.java?rev=1744295&r1=1744294&r2=1744295&view=diff
==============================================================================
--- openmeetings/application/trunk/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/red5/ScopeApplicationAdapter.java (original)
+++ openmeetings/application/trunk/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/red5/ScopeApplicationAdapter.java Tue May 17 17:22:35 2016
@@ -166,6 +166,7 @@ public class ScopeApplicationAdapter ext
String swfURL = map.containsKey("swfUrl") ? (String)map.get("swfUrl") : "";
String tcUrl = map.containsKey("tcUrl") ? (String)map.get("tcUrl") : "";
String uid = params != null && params.length > 0 ? (String)params[0] : "";
+ String securityCode = null;//FIXME TODO should named parameter!!!! params != null && params.length > 0 ? (String)params[0] : "";
Client parentClient = null;
//TODO add similar code for other connections
@@ -224,6 +225,11 @@ public class ScopeApplicationAdapter ext
log.debug("publishName :: " + rcm.getStreamPublishName());
sessionManager.updateClientByStreamId(streamId, rcm, false, null);
}
+ if (!Strings.isEmpty(securityCode)) {
+ //FIXME TODO check if client by code is in this room
+ rcm.setSecurityCode(securityCode);
+ sessionManager.updateClientByStreamId(streamId, rcm, false, null);
+ }
// Log the User
conferenceLogDao.add(ConferenceLog.Type.clientConnect,
@@ -641,6 +647,19 @@ public class ScopeApplicationAdapter ext
currentClient.setScreenPublishStarted(true);
sessionManager.updateClientByStreamId(streamid, currentClient, false, null);
}
+ if (!Strings.isEmpty(currentClient.getSecurityCode())) {
+ //FIXME TODO add better mechanism
+ Client parent = sessionManager.getClientByPublicSID(currentClient.getSecurityCode(), null);
+ if (parent == null || !parent.getScope().equals(stream.getScope().getName())) {
+ rejectClient();
+ return;
+ }
+ currentClient.setBroadCastID(Long.parseLong(stream.getPublishedName()));
+ currentClient.setIsBroadcasting(true);
+ currentClient.setVWidth(320);
+ currentClient.setVHeight(240);
+ sessionManager.updateClientByStreamId(streamid, currentClient, false, null);
+ }
log.debug("newStream SEND: " + currentClient);
Modified: openmeetings/application/trunk/openmeetings-db/src/main/java/org/apache/openmeetings/db/dao/room/SipDao.java
URL: http://svn.apache.org/viewvc/openmeetings/application/trunk/openmeetings-db/src/main/java/org/apache/openmeetings/db/dao/room/SipDao.java?rev=1744295&r1=1744294&r2=1744295&view=diff
==============================================================================
--- openmeetings/application/trunk/openmeetings-db/src/main/java/org/apache/openmeetings/db/dao/room/SipDao.java (original)
+++ openmeetings/application/trunk/openmeetings-db/src/main/java/org/apache/openmeetings/db/dao/room/SipDao.java Tue May 17 17:22:35 2016
@@ -45,6 +45,7 @@ public class SipDao {
private String sipPassword;
private ManagerConnectionFactory factory;
private ManagerConnection connection;
+ private ManagerConnection eventConnection;
@SuppressWarnings("unused")
private SipDao() {
@@ -58,6 +59,7 @@ public class SipDao {
this.sipPassword = sipPassword;
factory = new ManagerConnectionFactory(this.sipHostname, this.sipPort, this.sipUsername, this.sipPassword);
connection = factory.createManagerConnection(); // TODO secure
+ eventConnection = factory.createManagerConnection(); // TODO secure
}
private ManagerResponse exec(ManagerAction action) {
@@ -65,38 +67,52 @@ public class SipDao {
log.warn("There is no Asterisk configured");
return null;
}
- try {
- connection.login();
- ManagerResponse r = connection.sendAction(action);
- connection.logoff();
- if (log.isDebugEnabled() && r != null) {
- log.debug(r.toString());
- }
- return (r instanceof ManagerError) ? null : r;
- } catch (Exception e) {
- if (log.isDebugEnabled()) {
- log.error("Error while executing ManagerAction: " + action, e);
+ synchronized (connection) {
+ try {
+ connection.login();
+ ManagerResponse r = connection.sendAction(action);
+ if (log.isDebugEnabled() && r != null) {
+ log.debug(r.toString());
+ }
+ return (r instanceof ManagerError) ? null : r;
+ } catch (Exception e) {
+ if (log.isDebugEnabled()) {
+ log.error("Error while executing ManagerAction: " + action, e);
+ }
+ } finally {
+ try {
+ connection.logoff();
+ } catch (Exception e) {
+ // no-op
+ }
}
}
return null;
}
private ResponseEvents execEvent(EventGeneratingAction action) {
- if (connection == null) {
+ if (eventConnection == null) {
log.warn("There is no Asterisk configured");
return null;
}
- try {
- connection.login("on");
- ResponseEvents r = connection.sendEventGeneratingAction(action);
- connection.logoff();
- if (log.isDebugEnabled() && r != null) {
- log.debug(r.getResponse().toString());
- }
- return (r == null || r.getResponse() instanceof ManagerError) ? null : r;
- } catch (Exception e) {
- if (log.isDebugEnabled()) {
- log.error("Error while executing EventGeneratingAction: " + action, e);
+ synchronized (eventConnection) {
+ try {
+ eventConnection.login("on");
+ ResponseEvents r = eventConnection.sendEventGeneratingAction(action);
+ if (log.isDebugEnabled() && r != null) {
+ log.debug(r.getResponse().toString());
+ }
+ return (r == null || r.getResponse() instanceof ManagerError) ? null : r;
+ } catch (Exception e) {
+ if (log.isDebugEnabled()) {
+ log.error("Error while executing EventGeneratingAction: " + action, e);
+ }
+ } finally {
+ try {
+ eventConnection.logoff();
+ } catch (Exception e) {
+ // no-op
+ }
}
}
return null;
@@ -167,6 +183,6 @@ public class SipDao {
oa.setPriority(1);
oa.setTimeout(30000L);
- ManagerResponse resp = exec(oa);
+ exec(oa); //TODO handle response
}
}
Modified: openmeetings/application/trunk/openmeetings-db/src/main/java/org/apache/openmeetings/db/entity/room/Client.java
URL: http://svn.apache.org/viewvc/openmeetings/application/trunk/openmeetings-db/src/main/java/org/apache/openmeetings/db/entity/room/Client.java?rev=1744295&r1=1744294&r2=1744295&view=diff
==============================================================================
--- openmeetings/application/trunk/openmeetings-db/src/main/java/org/apache/openmeetings/db/entity/room/Client.java (original)
+++ openmeetings/application/trunk/openmeetings-db/src/main/java/org/apache/openmeetings/db/entity/room/Client.java Tue May 17 17:22:35 2016
@@ -258,10 +258,10 @@ public class Client implements IDataProv
private String lastLogin;
/**
- * @see Client#getOfficial_code()
+ * @see Client#getSecurityCode()
*/
- @Column(name = "official_code")
- private String official_code;
+ @Column(name = "security_code")
+ private String securityCode;
/**
* @see Client#getPicture_uri()
@@ -562,12 +562,12 @@ public class Client implements IDataProv
this.email = email;
}
- public String getOfficial_code() {
- return official_code;
+ public String getSecurityCode() {
+ return securityCode;
}
- public void setOfficial_code(String official_code) {
- this.official_code = official_code;
+ public void setSecurityCode(String securityCode) {
+ this.securityCode = securityCode;
}
public String getPicture_uri() {
Modified: openmeetings/application/trunk/openmeetings-db/src/main/java/org/apache/openmeetings/db/entity/user/AsteriskSipUser.java
URL: http://svn.apache.org/viewvc/openmeetings/application/trunk/openmeetings-db/src/main/java/org/apache/openmeetings/db/entity/user/AsteriskSipUser.java?rev=1744295&r1=1744294&r2=1744295&view=diff
==============================================================================
--- openmeetings/application/trunk/openmeetings-db/src/main/java/org/apache/openmeetings/db/entity/user/AsteriskSipUser.java (original)
+++ openmeetings/application/trunk/openmeetings-db/src/main/java/org/apache/openmeetings/db/entity/user/AsteriskSipUser.java Tue May 17 17:22:35 2016
@@ -34,7 +34,7 @@ import org.simpleframework.xml.Element;
import org.simpleframework.xml.Root;
@Entity
-@Table(name = "sipuser")
+@Table(name = "sipusers")
@Root(name="asterisksipuser")
public class AsteriskSipUser implements Serializable {
private static final long serialVersionUID = 1L;
Modified: openmeetings/application/trunk/openmeetings-install/src/main/java/org/apache/openmeetings/installation/InstallationConfig.java
URL: http://svn.apache.org/viewvc/openmeetings/application/trunk/openmeetings-install/src/main/java/org/apache/openmeetings/installation/InstallationConfig.java?rev=1744295&r1=1744294&r2=1744295&view=diff
==============================================================================
--- openmeetings/application/trunk/openmeetings-install/src/main/java/org/apache/openmeetings/installation/InstallationConfig.java (original)
+++ openmeetings/application/trunk/openmeetings-install/src/main/java/org/apache/openmeetings/installation/InstallationConfig.java Tue May 17 17:22:35 2016
@@ -23,7 +23,7 @@ import static org.apache.openmeetings.ut
import java.io.Serializable;
import org.apache.openmeetings.db.dao.basic.ConfigurationDao;
-import org.apache.openmeetings.util.crypt.MD5Implementation;
+import org.apache.openmeetings.util.crypt.SHA256Implementation;
public class InstallationConfig implements Serializable {
private static final long serialVersionUID = 1L;
@@ -37,7 +37,7 @@ public class InstallationConfig implemen
public String createDefaultRooms = "1";
public String ical_timeZone = "Europe/Berlin";
- public String cryptClassName = MD5Implementation.class.getCanonicalName();
+ public String cryptClassName = SHA256Implementation.class.getCanonicalName();
//email
public Integer smtpPort = 25;
public String smtpServer = "localhost";
Modified: openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/WebSession.java
URL: http://svn.apache.org/viewvc/openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/WebSession.java?rev=1744295&r1=1744294&r2=1744295&view=diff
==============================================================================
--- openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/WebSession.java (original)
+++ openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/WebSession.java Tue May 17 17:22:35 2016
@@ -422,7 +422,7 @@ public class WebSession extends Abstract
if (browserTz == null) {
try {
browserTz = getClientInfo().getProperties().getTimeZone();
- if (!AVAILABLE_TIMEZONE_SET.contains(browserTz.getID())) {
+ if (browserTz != null && !AVAILABLE_TIMEZONE_SET.contains(browserTz.getID())) {
for (String availableID : AVAILABLE_TIMEZONES) {
TimeZone zone = TimeZone.getTimeZone(availableID);
if (zone.hasSameRules(browserTz)) {
@@ -433,6 +433,9 @@ public class WebSession extends Abstract
}
_zone = browserTz;
} catch (Exception e) {
+ //no-op
+ }
+ if (browserTz == null) {
_zone = Calendar.getInstance(getBrowserLocale()).getTimeZone();
}
}