--
You received this message because you are subscribed to a topic in the Google Groups "BigBlueButton-dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/bigbluebutton-dev/kNgnh7wLWV4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to bigbluebutton-dev+unsubscribe@googlegroups.com.
To post to this group, send email to bigbluebutton-dev@googlegroups.com.
Visit this group at https://groups.google.com/group/bigbluebutton-dev.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "BigBlueButton-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bigbluebutton-dev+unsubscribe@googlegroups.com.
To post to this group, send email to bigbluebutton-dev@googlegroups.com.
Visit this group at https://groups.google.com/group/bigbluebutton-dev.
For more options, visit https://groups.google.com/d/optout.
using System;
using System.Collections.Specialized;
using System.Linq;
using System.Data;
using System.Net;
using System.IO;
using System.Text;
using System.Web;
namespace TuberEdu.Web.Helper.VirtualRoom
{
public class TestBbb
{
public string StrServerIPAddress = "https://xxxx.xxxxxxx.org";
public string StrSalt = "nnnnnnnnnnnnnnnnnnnnnnnnnnnnnn";
public string CreateMeeting(string meetingName, string meetingId, string attendeePW, string moderatorPW)
{
string strParameters = "name=" + meetingName + "&meetingID=" + meetingId + "&attendeePW=" + attendeePW + "&moderatorPW=" + moderatorPW
+ "&allowStartStopRecording=false&autoStartRecording=true&record=true";
string strSha1CheckSum = ClsData.GetSha1("create" + strParameters + StrSalt);
string url = StrServerIPAddress + "/bigbluebutton/api/create?" + strParameters + "&checksum=" + strSha1CheckSum;
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);
HttpWebResponse response = (HttpWebResponse)request.GetResponse();
StreamReader sr = new StreamReader(response.GetResponseStream());
string strResponse = sr.ReadToEnd();
return strResponse;
}
public string JoinMeeting(string userName, string meetingId, string password, string userID)
{
string strParameters = "fullName=" + userName + "&meetingID=" + meetingId + "&password=" + password + "&userID=" + userID;
string strSha1CheckSum = ClsData.GetSha1("join" + strParameters + StrSalt);
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(StrServerIPAddress + "/bigbluebutton/api/join?" + strParameters + "&checksum=" + strSha1CheckSum);
HttpWebResponse response = (HttpWebResponse)request.GetResponse();
StreamReader sr = new StreamReader(response.GetResponseStream());
return sr.ReadToEnd();
}
//string meetingId = "6d63303f-539d-48db-b58f-4aeda4c0cdc0";
//string configXML = "<config><modules><localeversion supressWarning=\"false\">0.9.0</localeversion></modules></config>";
public string GetMeetingConfigToken(string meetingId, string configXml)
{
configXml = HttpUtility.UrlEncode(configXml, Encoding.UTF8);
string strParameters = "configXML=" + configXml + "&meetingID=" + meetingId;
string strSha1CheckSum = ClsData.GetSha1("setConfigXML" + strParameters + StrSalt);
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(StrServerIPAddress + "/bigbluebutton/api/setConfigXML");
string postData = strParameters + "&checksum=" + strSha1CheckSum;
byte[] data = Encoding.UTF8.GetBytes(postData);
request.Method = "POST";
request.ContentType = "application/x-www-form-urlencoded";
request.ContentLength = data.Length;
using (var stream = request.GetRequestStream())
{
stream.Write(data, 0, data.Length);
}
HttpWebResponse response = (HttpWebResponse)request.GetResponse();
StreamReader sr = new StreamReader(response.GetResponseStream());
string strResponse = sr.ReadToEnd();
return strResponse;
}
}
public class ClsData
{
public static string GetSha1(string StrValue)
{
HashFx md = new HashFx();
return md.EncryptString1(StrValue, 1);
}
}
}