Introducing Dana the Stream Gatekeeper

In this troubling time of dealing with COVID-19 around the world we’re seeing more and more need for tools to help in communicating with co-workers, friends and family. Asterisk has historically proven itself as one of the key puzzle pieces when it comes to enacting change and evolution in the communications space. The power of Asterisk can help in these dark times too, along with projects that use Asterisk’s abilities for the power of good. Let’s take a look at a relatively new project which should enable you to use Asterisk’s SFU (video conferencing) capabilities.

For any of you stuck at home looking for useful video conferencing solutions, this is a great chance to try out #Asterisk’s SFU functionality (we use it for most of our team meetings)

— Matthew Fredrickson (@creslin287) March 23, 2020

Dana is a project from Nimble Ape as a front-end GUI to Asterisk’s SFU capabilities; but it also shows off Asterisk’s other capabilities such as piping raw audio out of Asterisk in order to be able to send it to a speech to text engine for transcriptions on conference calls (for example).

Dana was born from conversations at multiple Astricons over the past couple of years; ever since the Asterisk team released Cyber Mega Phone 2k as an example project on how to use Asterisk’s SFU. Every year, I’d proclaim that we really needed a better demo application that didn’t make people want to pull their eyes out of their sockets and I’d get the reply – it needs a Web Developer Dan! Well, they were right – I took up the challenge and created Dana.

Dana is built using modern web technologies – WebRTC for connecting to Asterisk’s SFU using the JsSIP library as well as React for building the web application itself with Web Components – for example using Google’s Material Design elements to be able to build a UI with little to no design skills. This means that you can go write some JavaScript and bring in other Open Source code and enhance Dana to do as you want it to.

Running it yourself is pretty simple. We’ll have a follow-up blog post that goes into more detail on the exact configuration specifics, but here’s a quick overview.

You’ll need Node.js and Yarn and of course Asterisk – preferably the latest version of 17 at time of writing. You’ll also need a working TLS certificate, because WebRTC enforces security out of the box.

Clone the repo `git clone https://github.com/nimbleape/dana-the-stream-gatekeeper.git`

Install the dependencies using `yarn` and then you can either run the development server yourself by running `yarn start` or you can build a static version of Dana using `yarn build`. Dana itself requires no server side components to run, only an Asterisk server to handle the WebRTC media session.

Now you need to setup Asterisk with a dialplan, confbridge settings, and WebRTC extensions. Follow the guide over on the Asterisk Wiki for setting up Cyber Mega Phone 2k – it’s still 100% relevant here – specifically the asterisk related configuration files and settings, not necessarily the instructions to download Cyber Mega Phone 2k.

Now you should be able to start up Dana, fill in the settings page with your connection settings for Asterisk and be able to join a video conference room in Asterisk. Woohoo!

But that’s not all.

Dana, ARI and Transcriptions

Confbridge is a great dialplan application, but as a bridge isn’t as flexible as I would like. Dana comes with another GitHub repo – an ARI bridge for Dana which also enables the use of External Media to be able to send raw media from each individual participant in a conference bridge out to Google for transcription. In order for transcriptions to work you’ll also need the RTP-Server project from GitHub as well as an MQTT server.

To run both the ARI project as well as the RTP Server project you’ll need to clone the projects, change the config inside of the `config` directory, run `yarn` and then `yarn start-pretty` which will start the projects up and print out pretty’ified logging.

Again, in our next blog post in this series, we’ll go into more detail on how to get this up and running as well.

Open Source

Nimble Ape firmly believes in Open Source software and therefore all three of these projects are released under the MIT license.

Dana is built on open source technology and released as open source, go build with it, try out Asterisk’s new capabilities and connect with those who you’re unable to see in person at the moment. Stay safe, stay indoors.

Leave a Reply

Your email address will not be published. Required fields are marked *


The reCAPTCHA verification period has expired. Please reload the page.

About the Author

What can we help you find?