We have a OpenMeeting service classs which handles the communication
between our application and OpenMeeting. I have attached the service
class with this mail. I guess you can hard code the parameter passed
to the service calls and reproduce the issue.
You can write a main class in this file and call the invite method to
get the hash codes.
We are using jersey library to access the service so make sure having
the library in the class path.
Thanks,
Pradeep D
On Sat, Apr 21, 2012 at 4:03 PM, [email protected]
<[email protected]> wrote:
> No,
>
> the userlevel that you are refering to is the "system user level"
> meaning if the user has admin privileges and can manipulate users or
> not.
>
> The moderator of a conference room has nothing to do with the
> moderator on system level. It is just confusing that they have the
> same name.
>
> I would suggest you download the latest Nightly Build from:
> https://builds.apache.org/job/openmeetings/
>
> Try with that one, I will do some tests with the latest snapshot too.
> Also it would be good if you could create a sample code snippet that
> can be run standalone so that I can reproduce your issue.
>
> Sebastian
>
> 2012/4/21 Pradeep D <[email protected]>:
>> For all the external users the level_id is set as "1" in the table.
>> But for the admin its set as "3".
>>
>> I checked the userlevel table and for "Moderator" the id is "2". So i
>> guess any relationship with this level_id in the user table linked
>> with moderator privilege in the meeting??
>>
>> Thanks
>> Pradeep D
>>
>> On Sat, Apr 21, 2012 at 3:20 PM, [email protected]
>> <[email protected]> wrote:
>>> Sorry Pradeep,
>>>
>>> I did not understand your concerns regarding userlevel.
>>>
>>> I also cannot reproduce your issue.
>>> But there is no issue for example when you are using:
>>> moodle.openmeetings.de, the moodle integration is using the same
>>> methods.
>>>
>>> I am going to test with the latest snapshot from trunk today.
>>>
>>>
>>> Sebastian
>>>
>>> 2012/4/21 Pradeep D <[email protected]>:
>>>> Is there any problem with the user table, we can see the users table
>>>> having the external users entry (Last three records in the screenshot)
>>>> which have the userlevel column as "1". I checked in the userlevel
>>>> table and its has moderator id as "3"
>>>>
>>>> Whether is there any relationship with this. But as per our
>>>> requirement the moderator is not constant will change for every
>>>> meeting. So the moderator will be decided by our application and pass
>>>> it to the openmeeting through the service call.
>>>>
>>>> Thanks,
>>>> Pradeep D
>>>>
>>>> On Sat, Apr 21, 2012 at 2:48 PM, [email protected]
>>>> <[email protected]> wrote:
>>>>>
>>>>> And the result of the method: setUserObjectAndGenerateRoomHashByURL
>>>>> you attach that as parameter "secureHash=$YOUR_HASH" to the URL ?
>>>>>
>>>>> So according to your screenshot something like secureHash=cd0...
>>>>>
>>>>> Sebastian
>>>>>
>>>>> 2012/4/21 Pradeep D <[email protected]>:
>>>>> > It has a value "1", Please refer the attached screenshot
>>>>> >
>>>>> > Thanks,
>>>>> > Pradeep D
>>>>> >
>>>>> >
>>>>> > On Sat, Apr 21, 2012 at 2:36 PM, [email protected]
>>>>> > <[email protected]> wrote:
>>>>> >>
>>>>> >> In the table "soaplogin" is the column "becomemoderator" 1 or 0 ?
>>>>> >>
>>>>> >>
>>>>> >> Sebastian
>>>>> >>
>>>>> >> 2012/4/21 Pradeep D <[email protected]>
>>>>> >>>
>>>>> >>> Sebastian,
>>>>> >>>
>>>>> >>> We are using openmeeting 1.9.1 version and we dont find any error in
>>>>> >>> the
>>>>> >>> log file. We are able to launch into the meeting using the generated
>>>>> >>> has
>>>>> >>> value. But for the admin we are not getting the moderator privilege
>>>>> >>> though
>>>>> >>> we are sending becomeModeratorAsInt as "1" for the admin during the
>>>>> >>> second
>>>>> >>> service call.
>>>>> >>>
>>>>> >>> I checked the source code for the user service and dont see any
>>>>> >>> special
>>>>> >>> usage of this flag. Kindly advice on this issue.
>>>>> >>>
>>>>> >>> Thanks,
>>>>> >>> Pradeep D
>>>>> >>>
>>>>> >>> On Sat, Apr 21, 2012 at 12:25 PM, [email protected]
>>>>> >>> <[email protected]> wrote:
>>>>> >>>>
>>>>> >>>> Hallo Pradeep,
>>>>> >>>>
>>>>> >>>> have you checked your red5/openmeetings/error log for potential
>>>>> >>>> issues?
>>>>> >>>> What version of OpenMeetings are you using exactly?
>>>>> >>>>
>>>>> >>>> Sebastian
>>>>> >>>>
>>>>> >>>>
>>>>> >>>> 2012/4/21 Pradeep D <[email protected]>
>>>>> >>>>>
>>>>> >>>>>
>>>>> >>>>> Hi All,
>>>>> >>>>>
>>>>> >>>>> We are trying to integrate openmeeting with our web application
>>>>> >>>>> using
>>>>> >>>>> the
>>>>> >>>>> web services provided by openmeeting. The flow starts with
>>>>> >>>>> dynamically
>>>>> >>>>> creating new room for the meeting using the below web service.
>>>>> >>>>>
>>>>> >>>>> /RoomService/addRoomWithModerationAndExternalTypeAndStartEnd
>>>>> >>>>>
>>>>> >>>>> And pass all the parameters to this service call.
>>>>> >>>>>
>>>>> >>>>> Then we call be below service to generate hash and use the hash
>>>>> >>>>> value
>>>>> >>>>> to
>>>>> >>>>> join the user into the meeting,
>>>>> >>>>>
>>>>> >>>>> /UserService/setUserObjectAndGenerateRoomHashByURL
>>>>> >>>>>
>>>>> >>>>> All these things works fine, but only one user will be a moderator
>>>>> >>>>> for
>>>>> >>>>> this
>>>>> >>>>> meeting and we pass becomeModeratorAsInt as "1" while calling the
>>>>> >>>>> second
>>>>> >>>>> service call. For the other users it will be "0". But the admin dont
>>>>> >>>>> have
>>>>> >>>>> moderator privilege in the meeting. As per the documentation we are
>>>>> >>>>> passing
>>>>> >>>>> all the parameters. But none of the users joined the meeting have
>>>>> >>>>> moderator
>>>>> >>>>> privilege.
>>>>> >>>>>
>>>>> >>>>> Please let us know where we are going wrong.
>>>>> >>>>>
>>>>> >>>>> Thanks,
>>>>> >>>>> Pradeep D
>>>>> >>>>>
>>>>> >>>>>
>>>>> >>>>
>>>>> >>>>
>>>>> >>>>
>>>>> >>>> --
>>>>> >>>> Sebastian Wagner
>>>>> >>>> https://twitter.com/#!/dead_lock
>>>>> >>>> http://www.openmeetings.de
>>>>> >>>> http://www.webbase-design.de
>>>>> >>>> http://www.wagner-sebastian.com
>>>>> >>>> [email protected]
>>>>> >>>
>>>>> >>>
>>>>> >>
>>>>> >>
>>>>> >>
>>>>> >> --
>>>>> >> Sebastian Wagner
>>>>> >> https://twitter.com/#!/dead_lock
>>>>> >> http://www.openmeetings.de
>>>>> >> http://www.webbase-design.de
>>>>> >> http://www.wagner-sebastian.com
>>>>> >> [email protected]
>>>>> >
>>>>> >
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Sebastian Wagner
>>>>> https://twitter.com/#!/dead_lock
>>>>> http://www.openmeetings.de
>>>>> http://www.webbase-design.de
>>>>> http://www.wagner-sebastian.com
>>>>> [email protected]
>>>
>>>
>>>
>>> --
>>> Sebastian Wagner
>>> https://twitter.com/#!/dead_lock
>>> http://www.openmeetings.de
>>> http://www.webbase-design.de
>>> http://www.wagner-sebastian.com
>>> [email protected]
>
>
>
> --
> Sebastian Wagner
> https://twitter.com/#!/dead_lock
> http://www.openmeetings.de
> http://www.webbase-design.de
> http://www.wagner-sebastian.com
> [email protected]
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package com.amphisoft.meeting;
import com.amphisoft.framework.User;
import com.amphisoft.framework.OpenMeeting;
import com.amphisoft.openmeeting.Invite;
import com.amphisoft.openmeeting.ResponseHandler;
import com.amphisoft.openmeeting.SAXParserHelper;
import com.amphisoft.openmeeting.SessionResponse;
import com.sun.jersey.api.client.Client;
import com.sun.jersey.api.client.WebResource;
import com.sun.jersey.core.util.MultivaluedMapImpl;
import java.util.List;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.ws.rs.core.MultivaluedMap;
import com.amphisoft.framework.Meeting;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
/**
*
* @author pradeep
*/
public class OpenMeetingService implements IMeeting{
String openMeetingServiceUrl = "http://192.168.8.203:5080/openmeetings/services";
String openMeetingUrl = "http://192.168.8.203:5080/openmeetings/?secureHash=";
public String invite(String videoTag, String[] email) {
throw new UnsupportedOperationException("Not supported yet.");
}
public Object invite(String videoTag,Meeting meeting, User user,int isLeader) {
String meetingUrl = null;
Long roomId = null;
try {
SessionResponse sessionResponse = getSession();
ResponseHandler loginResponse = doSOAPLogin(sessionResponse);
if(((OpenMeeting)meeting).getRoomId() == null) {
roomId = addNewRoomWithModeratorLimitedTime(sessionResponse,meeting,meeting.getParticipants().size());
//((OpenMeeting)meeting).setRoomId(roomId);
}else
roomId = ((OpenMeeting)meeting).getRoomId();
Invite invite = generateMeetingHash(sessionResponse,roomId,user,isLeader);
meetingUrl = openMeetingUrl + invite.getInviteHash();
} catch (Exception ex) {
Logger.getLogger(OpenMeetingService.class.getName()).log(Level.SEVERE, null, ex);
}
List returnValue = new ArrayList();
returnValue.add(roomId);
returnValue.add(meetingUrl);
return returnValue;
}
public SessionResponse getSession() throws Exception {
Client client = new Client();
WebResource webResource = client.resource(openMeetingServiceUrl+"/UserService");
String buffer = webResource.path("getSession").get(String.class);
SessionResponse sessionResponse = (SessionResponse) SAXParserHelper.parse(buffer,SessionResponse.class);
return sessionResponse;
}
public ResponseHandler doSOAPLogin(SessionResponse sessionResponse) throws Exception {
Client client = new Client();
WebResource webResource = client.resource(openMeetingServiceUrl+"/UserService");
MultivaluedMap queryParams = new MultivaluedMapImpl();
queryParams.add("SID",sessionResponse.getSession_id());
queryParams.add("username","soap");
queryParams.add("userpass","soap123");
String buffer = webResource.path("loginUser").queryParams(queryParams).get(String.class);
ResponseHandler login = (ResponseHandler) SAXParserHelper.parse(buffer,ResponseHandler.class);
return login;
}
public Invite generateMeetingHash(SessionResponse sessionResponse,Long roomId, User user,int isLeader) throws Exception {
Client client = new Client();
WebResource webResource = client.resource(openMeetingServiceUrl+"/UserService");
MultivaluedMap queryParams = new MultivaluedMapImpl();
queryParams.add("SID",sessionResponse.getSession_id());
queryParams.add("username",user.getUsername());
queryParams.add("firstname",user.getName());
queryParams.add("lastname","D");
queryParams.add("email",user.getEmail());
queryParams.add("externalUserId",user.getId().toString());
queryParams.add("externalUserType","ebox");
queryParams.add("room_id",roomId.toString());
queryParams.add("becomeModeratorAsInt",new Integer(isLeader).toString());
if(isLeader == 1)
queryParams.add("showAudioVideoTestAsInt","1");
else
queryParams.add("showAudioVideoTestAsInt","0");
System.out.println("Url:"+queryParams);
String buffer = webResource.path("setUserObjectAndGenerateRoomHashByURL").queryParams(queryParams).get(String.class);
Invite roomHash = (Invite) SAXParserHelper.parse(buffer,Invite.class);
return roomHash;
}
public Long addNewRoomWithModeratorLimitedTime(SessionResponse sessionResponse,Meeting meeting,Integer numberOfUsers) throws Exception {
Long roomId = null;
SimpleDateFormat dfDate = new SimpleDateFormat("dd-MM-yyyy");
SimpleDateFormat dfTime = new SimpleDateFormat("mm:hh");
Client client = new Client();
WebResource webResource = client.resource(openMeetingServiceUrl+"/RoomService");
MultivaluedMap queryParams = new MultivaluedMapImpl();
queryParams.add("SID",sessionResponse.getSession_id());
queryParams.add("name","Meeting_"+meeting.getId());
queryParams.add("roomtypes_id","1");
queryParams.add("numberOfPartizipants",numberOfUsers.toString());
queryParams.add("ispublic","false");
queryParams.add("appointment","true");
queryParams.add("isDemoRoom","false");
queryParams.add("isModeratedRoom","true");
queryParams.add("externalRoomType","ebox");
queryParams.add("validFromDate",dfDate.format(meeting.getStartTime()));
queryParams.add("validFromTime",dfTime.format(meeting.getStartTime()));
queryParams.add("validToDate",dfDate.format(meeting.getEndTime()));
queryParams.add("validToTime",dfTime.format(meeting.getEndTime()));
queryParams.add("isPasswordProtected","false");
queryParams.add("reminderTypeId","1");
queryParams.add("redirectURL","1");
String buffer = webResource.path("addRoomWithModerationAndExternalTypeAndStartEnd").queryParams(queryParams).get(String.class);
System.out.println("response:"+buffer);
ResponseHandler handler = (ResponseHandler) SAXParserHelper.parse(buffer,ResponseHandler.class);
roomId = new Long(handler.getResponse());
return roomId;
}
}