web应用程序集成openmeeting v3.0解决方案

openmeeting是一个开源的基于web视频会议系统,项目中有视频会议需求,自己开发从成本和时间都不允许。

正好同事是个开源达人,有很多的开源搭建经验辅助我搭建了好了openmeeting。

测试一切正常,也满足项目需求。想把它无缝集成到自己的项目中,参考了它wiik给出的解决方案登陆直接打开视频房间,安装流程逐步测试都可以成功运行,但是最后关联生产的hash码,进入系统报“未知错误”。


从它提供的api中查找其它的替代方案,在“RoomService中发现了“getInvitationHash”的方法

以下是API的解释

Method: public String getInvitationHash(String SID, String username, Long room_id, Boolean isPasswordProtected, String invitationpass, Integer valid, String validFromDate, String validFromTime, String validToDate, String validToTime)

Create a Invitation hash the From to Date is as String as some SOAP libraries do not accept Date Objects in SOAP Calls Date is parsed as dd.mm.yyyy, time as hh:mm (don't forget the leading zero's)

Returns a HASH value that can be made into a URL with http://$OPENMEETINGS_HOST:$PORT/openmeetings/?invitationHash=$invitationsHash;

available since  Issue 1154 

Params:

typenamedescription
StringSIDThe SID of the User. This SID must be marked as Loggedin
Stringusernamethe username of the User that he will get
Longroom_idthe username of the User that he will get
BooleanisPasswordProtectedif the invitation is password protected
Stringinvitationpassthe password for accessing the conference room via the invitation hash
Integervalidthe type of validation for the hash 1: endless, 2: from-to period, 3: one-time
StringvalidFromDateDate in Format of dd.mm.yyyy only of interest if valid is type 2
StringvalidFromTimetime in Format of hh:mm only of interest if valid is type 2
StringvalidToDateDate in Format of dd.mm.yyyy only of interest if valid is type 2
StringvalidToTimetime in Format of hh:mm only of interest if valid is type 2

我以.NET为例进行项目集成登录代码

            cls.opMeeting opModel = new opMeeting();
            opModel = (opMeeting)JsonConvert.DeserializeObject(jsonStr, typeof(opMeeting));

            openMeetings.UserServicePortTypeClient opClient = new openMeetings.UserServicePortTypeClient();
            openMeetings.Sessiondata session = opClient.getSession();
            long lg = opClient.loginUser(session.session_id, "administrator", "123456");

            openMeetingsRS.RoomServicePortTypeClient rsClient = new openMeetingsRS.RoomServicePortTypeClient();
            DateTime dTimeFrom = DateTime.Now;
            DateTime dTimeTo = dTimeFrom.AddDays(1);
            string timeFrom = dTimeFrom.Day.ToString() + "." + dTimeFrom.Month.ToString() + "." + dTimeFrom.Year.ToString();
            string timeTo = dTimeTo.Day.ToString() + "." + dTimeTo.Month.ToString() + "." + dTimeTo.Year.ToString();
            string invitationHash = rsClient.getInvitationHash(session.session_id, cls.ECLic.DESDecrypt(opModel.username.Replace(' ', '+')), opModel.roomId, false, "123456", 2, timeFrom, "00.00", timeTo, "00.00");
            string invitationHashUrl = "http://192.168.0.84:5080/openmeetings/?invitationHash=" + invitationHash + "&language=11" ;
注意:language=11参数是会议室的语音种类为“中文”
opClient.loginUser(session.session_id, "administrator", "123456");
其中的用户必须具备管理员权限的用户,否则返回-26的错误代码。

参考官方 API

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值