My simple workaround was to change the setRoomValues method and insert my 
custom logic there. I run some system checks (CPU, MEM and network usage, also 
look for current active users within conference rooms) and decide whether to 
allow the user to enter a room or not. If I decide that the user can't enter 
then I do something like roomStatus.setRoomFull(true).

Could it be possible for the native OM to include a "hook" in the setRoomValues 
method (such as a system call or a plug-in) so that any other system 
admin/programmer can run their own checks and decide to allow or not access to 
a room without the need to modify OM's source code?
The simplest hack would be to run an external process from setRoomValues (via 
process/exec) and read its output. So admins would only have to write scripts 
or programs in any language and output either 1 or 0 (in this case). According 
to the exit code setRoomValues would then decide to set the room as 
full/inaccessible or not.

Could this be useful?

--- On Wed, 1/30/13, Vieri <[email protected]> wrote:

> Thanks Sebastian.
> 
> So maybe I could add my custom logic in setRoomValues. Now I
> just need to find the correct way to "auto-disconnect" the
> user from the room when my custom logic decides to do so
> (basically depends on my network and cpu resources at a
> given time).
> 
> Any suggestions?
> 
> Vieri
> 
> --- On Wed, 1/30/13, [email protected]
> <[email protected]>
> wrote:
> 
> > From: [email protected]
> <[email protected]>
> > Subject: Re: roomConnect
> > To: "dev" <[email protected]>
> > Date: Wednesday, January 30, 2013, 2:36 AM
> > Hallo Vieri
> > 
> > roomConnect is an event handler that gets
> automatically
> > called in the
> > server interface. The client never actively "calls"
> this
> > method. You can
> > see that by the @Override annotation in the
> > ScopeApplicationAdapter. Every
> > Override is an event, not a actively called method.
> > 
> > The client simply disconnects and uses the url:
> > rtmp://host:port/openmeetings/1 (for room_id 1)
> > 
> > And later on calls "setRoomValues" as soon as he has
> > successfully connected.
> > 
> > Sebastian
> > 
> > 
> > 2013/1/30 Vieri <[email protected]>
> > 
> > > Hi,
> > >
> > > I'd like to know which part of the OM source code
> is
> > executed when a user
> > > clicks on the "Enter" button when trying to access
> a
> > room. I believe it
> > > could be:
> > >
> > >
> >
> org.apache.openmeetings.remote.red5.ScopeApplicationAdapter#roomConnect
> > >
> > > I also suppose that this method is called even
> when
> > users enter a room via
> > > invitation hash.
> > >
> > > I'm trying to find the right place in the source
> code
> > to customize room
> > > access (allow/deny) according to custom
> requirements.
> > > Is roomConnect always called before entering ANY
> > conference room?
> > >
> > > Are there any other classes/methods I should look
> for?
> > >
> > > Thanks,
> > >
> > > Vieri
> > >
> > >
> > 
> > 
> > -- 
> > Sebastian Wagner
> > https://twitter.com/#!/dead_lock
> > http://www.webbase-design.de
> > http://www.wagner-sebastian.com
> > [email protected]
> > 
> 

Reply via email to