Skip to content
This repository has been archived by the owner on Mar 4, 2021. It is now read-only.

Conference Call - List Calls, Join and Listen #346

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

jpwalters
Copy link
Contributor

This new features gives the standard conference call plugin a new menu under the "Call Log" section which allows a user to see a list of all conference calls in-progress and gives the option to join or listen to the call. When the user clicks Join the browser client immediately connects them to the call, announces their entrance and exit with a beep and allows them to listen and speak. When the user chooses the Listen option their browser client immediately connects them to the call but does not announce their entry or exit and only allows the user to listen to the call.

conference-join-listen

The conference call applet now has the ability to optionally record a call when setting up the flow.
1. The standard conference call plugin now has a "Conference Calls" menu under the "Call Log" parent menu.
2. The conference calls page show you a list of all active conference calls plus gives you the option to Join or Listen to the call.  The list is updated every 5 seconds and will add and remove entries.
3. Join Call - Clicking "Join" will immedately connect you to the call via your web browser, it beep when you enter or leave and let you full listen and talk on the call.
4. Listen - Clicking "Listen" will immedately connect you to the call viaw your web browser, it will not beep as you enter or leave and auto mute your voice so that you'll never be heard on the call.
   -- Note: Clicking Mute/Unmute will effectively do nothing if you clicked the listen link.
* @param string $beep
* @return void
*/
protected function join_conference($conference_name,$muted,$beep)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit pick: spaces after commas.

1. Changed upper case NULL to lower.
2. Added spaces after function parameter names.
3. Using the shared object OpenVBX::getAccount() instead of some other way.
4. Added the json content type header.
5. Changed die to exit.
6. Wrapped the jquery functions inside of jQuery(function($) {};
7. Fixed some tabbing issues in the plugin.json file.
1. Moved all the javascript to its own conferences.js file.
2. Wrapped the javascript in a document.ready function like the script.js file in dial plugin.
3. Removed the jquery include.
4. Added the conferences.js file via a php include function.
1. Made the print of the conference call rows a little more readable.
2. Added thead and tbody like the usage plugin.
row += '<td>' + call.date_created + '</td>';
row += '<td>' + call.friendly_name + '</td>';
row += '<td>' + call.status + '</td>';
row += '<td><a onclick="join_call(\'' + call.friendly_name + '\');">Join</a></td>';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd still like all JS actions to be handled via listeners. We only really use onclick for window.open and I'd even like to go through and nuke all of those too.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The reason I didn't use $('#calls').on('click', '.listen', function(e) ... is because the version of jquery the project is using doesn't support the .on function. As best I can tell the project is using jquery v1.6.2 and the .on function wasn't added to jquery until v1.7. Version 1.7 was only released a few months after 1.6.2 so possibly upgrading jquery wouldn't be a breaking change. Let me know how you want to proceed.

@Gipetto
Copy link
Contributor

Gipetto commented Oct 18, 2015

I think my last suggestion is to move the conference page to a new folder in the standard plugin folder. Put it under plugins/standard/pages. I think also the URL should be a little simpler, just logs/conferences and the Top level menu heading could also just be Logs. This would better allow for general log grouping later on since we wouldn't need a top level log section just for SMS. So:

{
  "links": [{
    "menu": "Logs",
    "url": "logs/conferences",
    "script": "pages/conference/conference-calls.php",
    "label": "Conference Calls"
  }],
}

Though... its not really a log page because its really an active management page. So maybe the menu for this should be Conferences and the label should be Manager.

Thoughts?

1. Moved the conference-calls.php and conferences.js to a new folder named pages.
2. Updated the plugin.json file to reflect the file moves plus changed the menu, url and label.
3. Renamed conference-calls.php to conferences.php.
4. Removed the usage of onclick from the conference.js page and changed it use a jquery click listener.
@jpwalters
Copy link
Contributor Author

I believe I'm made all the changes you've requested. Let me know if you find anything else.


$(document).ready(function(){
jQuery(function($) {
$(function(){
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Heh, just noticed this, but $(document).ready(function() {});, jQuery(function($) {}); and $(function() {}); all do the same thing... so we've got 3 levels of code all waiting for DOMReady. Fortunately jQuery is smart enough to automatically fire event listeners for DOMReady if they're registered after the DOM is ready.

@Gipetto
Copy link
Contributor

Gipetto commented Nov 27, 2015

I've been going back and forth about including the manager page in OpenVBX core. Let me know what you think of this idea: I'll take all the changes made to existing OpenVBX files. Then you move the conference manager page to a stand alone plugin that gets included on http://www.openvbx.org/plugins/

This is cleaner to me for a couple of reasons:

  1. Not everybody would use/need the manager plugin, so I'd want to include it deactivated by default. This would hurt discoverability. Including it in the plugins list would allow more people to find it.
  2. By moving that page out in to a separate plugin (i.e.: its own repository here on GitHub) you retain ownership of the code, so any improvements, changes, updates, you can do on your own without having to submit to code review. This would speed up your ability to iterate and improve the plugin.

@jpwalters
Copy link
Contributor Author

I like your suggestion and I'm find to create a stand alone plugin if you pull in the changes to the core OpenVBX files.

@cromulus
Copy link

👍 this is a common enough usecase for conference calls that it should be part of the core.

@jpwalters
Copy link
Contributor Author

Yes @cromulus that's what I thought too. But I did understand @Gipetto concerns and if they'll add the basic conference calling features to the core application I can easily make this a standalone plugin. I guess I should really just open another PR with the dozen or so code changes to OpenVBX/controllers/twiml.php.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants