bigbluebutton-Github/bbb-webhooks
2021-04-23 19:21:10 +02:00
..
config [add] default.yml vars thks to fcecagno 2021-04-23 19:21:10 +02:00
extra start refactoring bbb-webhooks to use a proper config library 2019-03-26 17:03:05 -03:00
log promote bbb-webhooks to a well-supported module (removed from labs) 2015-05-06 00:11:02 -03:00
test Start fixing webhooks tests 2019-03-29 20:52:58 +00:00
.dockerignore fix rap events 2018-10-26 14:28:57 -03:00
.gitignore Remove coffee files from gitignore. Corrections to the readme.md 2021-02-07 16:08:09 -08:00
.nvmrc Update .nvmrc to proper node version 2017-11-01 19:09:46 +00:00
app.js Feature: Convert webhooks application to JS ES6 2017-09-11 11:54:15 -03:00
application.js [add] enable bbb-webhooks to bind nodejs localhost, and make it default 2021-04-22 09:42:58 +02:00
callback_emitter.js bbb-webhooks: add a timeout configuration to be used on POST requests 2020-06-24 18:03:55 +00:00
Dockerfile update Dockerfile 2019-04-04 11:08:46 -03:00
hook.js Fix redis client and a loop in webhooks 2019-03-28 20:17:20 +00:00
id_mapping.js Fix redis client and a loop in webhooks 2019-03-28 20:17:20 +00:00
logger.js update webhooks dependencies in order to fix vulnerabilities 2018-12-18 23:25:55 -03:00
messageMapping.js fix microphone information on webhooks 2020-02-06 10:15:56 -03:00
package-lock.json Bump lodash from 4.17.15 to 4.17.19 in /bbb-webhooks 2020-07-28 20:26:32 +00:00
package.json Bump lodash from 4.17.15 to 4.17.19 in /bbb-webhooks 2020-07-28 20:26:32 +00:00
README.md Remove coffee files from gitignore. Corrections to the readme.md 2021-02-07 16:08:09 -08:00
responses.js start refactoring bbb-webhooks to use a proper config library 2019-03-26 17:03:05 -03:00
userMapping.js Fix redis client and a loop in webhooks 2019-03-28 20:17:20 +00:00
utils.js start refactoring bbb-webhooks to use a proper config library 2019-03-26 17:03:05 -03:00
web_hooks.js Start fixing webhooks tests 2019-03-29 20:52:58 +00:00
web_server.js [add] enable bbb-webhooks to bind nodejs localhost, and make it default 2021-04-22 09:42:58 +02:00

bbb-webhooks

This is a node.js application that listens for all events on BigBlueButton and sends POST requests with details about these events to hooks registered via an API. A hook is any external URL that can receive HTTP POST requests.

You can read the full documentation at: https://docs.bigbluebutton.org/dev/webhooks.html

Development

With a working development environment, follow the commands below from within the bigbluebutton/bbb-webhooks directory.

  1. Install the node dependencies:

    • npm install
  2. Copy the configuration file:

    • cp config/default.example.yml config/default.yml
    • Update the serverDomain and sharedSecret values to match your BBB server configuration in the newly copied config/default.yml.
  3. Stop the bbb-webhook service:

    • sudo service bbb-webhooks stop
  4. Run the application:

    • node app.js
    • Note: If the node app.js script stops, it's likely an issue with the configuration, or the bbb-webhooks service may have not been terminated.

Persistent Hooks

If you want all webhooks from a BBB server to post to your 3rd party application/s, you can modify the configuration file to include permanentURLs and define one or more server urls which you would like the webhooks to post back to.

To add these permanent urls, do the follow:

  • sudo nano config/default.yml
  • Locate hooks.permanentURLs in your config/default.yml and modify it as follows:
    • hooks:
         permanentURLs: 
            - url: 'https://staging.example.com/webhook-post-route',
              getRaw: false
            - url: 'https://app.example.com/webhook-post-route',
              getRaw: false
      

Once you have adjusted your configuration file, you will need to restart your development/app server to adapt to the new configuration.

If you are editing these permanent urls after they have already been committed to the application once, you may need to flush the redis database in order for adjustments to these permanent hooks to get picked up by your application. Use the following command to do so:

  • redis-cli flushall
  • IMPORTANT: Running the above command clears the redis database entirely. This will result in all meetings, processing or not, to be cleared from the database, and may result in broken meetings currently processing.

Production

Follow the commands below starting within the bigbluebutton/bbb-webhooks directory.

  1. Copy the entire webhooks directory:

    • sudo cp -r . /usr/local/bigbluebutton/bbb-webhooks
  2. Move into the directory we just copied the files to:

    • cd /usr/local/bigbluebutton/bbb-webhooks
  3. Install the dependencies:

    • npm install
  4. Copy the configuration file:

    • sudo cp config/default.example.yml config/default.yml
    • Update the serverDomain and sharedSecret values to match your BBB server configuration:
      • sudo nano config/default.yml
  5. Start the bbb-webhooks service:

    • sudo service bbb-webhooks restart