From 67943d194db924f345c51df81da7f1e77c53ab82 Mon Sep 17 00:00:00 2001 From: Yannick Warnier Date: Mon, 18 May 2015 23:03:29 -0500 Subject: [PATCH] Fix issue with BigBlueButton plugin and unique voiceBridge per conference room - refs #7669 --- plugin/bbb/changelog.md | 6 ++++++ plugin/bbb/lib/bbb.lib.php | 5 ++++- plugin/bbb/lib/bbb_plugin.class.php | 3 ++- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/plugin/bbb/changelog.md b/plugin/bbb/changelog.md index 1ee34e9ef2..6d94acb6b7 100644 --- a/plugin/bbb/changelog.md +++ b/plugin/bbb/changelog.md @@ -1,3 +1,9 @@ +version 2.3 - 2015-05-18 +------------------------ +Changes: +* Added support for variable voiceBridge to be sent on meeting creation. See https://code.google.com/p/bigbluebutton/issues/detail?can=2&start=0&num=100&q=&colspec=ID%20Type%20Status%20Priority%20Milestone%20Owner%20Component%20Summary&groupby=&sort=&id=1186 and https://support.chamilo.org/issues/7669 for details. +* Requires you to "ALTER TABLE plugin_bbb_meeting ADD COLUMN voice_bridge INT NOT NULL DEFAULT 1;" + version 2.2 - 2014-10-15 ------------------------ Changes: diff --git a/plugin/bbb/lib/bbb.lib.php b/plugin/bbb/lib/bbb.lib.php index 43bcd9d8aa..50cde7aced 100755 --- a/plugin/bbb/lib/bbb.lib.php +++ b/plugin/bbb/lib/bbb.lib.php @@ -133,6 +133,9 @@ class bbb // Generate a pseudo-global-unique-id to avoid clash of conferences on // the same BBB server with several Chamilo portals $params['remote_id'] = uniqid(true, true); + // Each simultaneous conference room needs to have a different + // voice_bridge composed of a 5 digits number, so generating a random one + $params['voice_bridge'] = rand(10000,99999); if ($this->debug) { error_log("enter create_meeting ".print_r($params, 1)); @@ -161,7 +164,7 @@ class bbb 'moderatorPw' => $moderatorPassword, // Match this value in getJoinMeetingURL() to join as moderator. 'welcomeMsg' => $welcomeMessage, // ''= use default. Change to customize. 'dialNumber' => '', // The main number to call into. Optional. - 'voiceBridge' => '12345', // PIN to join voice. Required. + 'voiceBridge' => $params['voice_bridge'], // PIN to join voice. Required. 'webVoice' => '', // Alphanumeric to join voice. Optional. 'logoutUrl' => $this->logout_url, 'maxParticipants' => $max, // Optional. -1 = unlimitted. Not supported in BBB. [number] diff --git a/plugin/bbb/lib/bbb_plugin.class.php b/plugin/bbb/lib/bbb_plugin.class.php index 838f64f2fd..8019a5edaa 100755 --- a/plugin/bbb/lib/bbb_plugin.class.php +++ b/plugin/bbb/lib/bbb_plugin.class.php @@ -52,7 +52,8 @@ class BBBPlugin extends Plugin welcome_msg VARCHAR(255) NOT NULL DEFAULT '', session_id INT unsigned DEFAULT 0, remote_id CHAR(30), - visibility TINYINT NOT NULL DEFAULT 1 + visibility TINYINT NOT NULL DEFAULT 1, + voice_bridge INT NOT NULL DEFAULT 1 )"; Database::query($sql);