Today is day 11/30 of building Goodtok, an open-source alternative to Uptok 💫
I'm not supposed to show this yet, but here's a sneak peek at how the branding work is progressing (keep it a secret!).
Today is day 8/30 of building Goodtok, the open-source alternative to Uptok.
I've made huge progress, and it feels like I'm still on track to finish the entire application by the end of the month.
Watch the video for the latest update.
#buildinginpublic#Hacktoberfest
🎉 A few weeks ago, I joined the 5k club on X! I'm also making the leap as full-time open-source maintainer.
Want to hangout? I’m hosting my second-ever space and would love to see you there 🙏
Set a reminder ⏰👇
https://t.co/kZh6Tno3M2
The official handbook for Routr (v2) has been out for three weeks, and the feedback has been amazing!
It's the perfect gift for any of your friends in the VoIP world 📘🎁
(Plus, by purchasing it, you'll also be supporting my open-source work 🤓)
Link in comments 👇
Getting started with Programmable Voice Apps (PVAs) using Asterisk and the Asterisk REST Interface (ARI) ⭐
ARI is a powerful API that can control the flow of a call, and it can be the foundation for your PVAs and more.
So when is this useful? 🧵👇
Load balancing makes it into the top 5 challenging aspects of a VoIP network. 😱
But Routr v2, features a fantastic solution.
You can connect multiple Peers, and it will take care of load balancing the traffic for you. 💪
Building a programmable voice stack from scratch ⚡
Here is what you will need:
- A signaling server to connect to the PSTN
- A media server for managing voice, flow control, etc.
- Media control service to instruct the media server
- Speech APIs
- JWT for authentication (optional)
Asterisk PBX is a popular choice for the first two components.
Additionally, Asterisk comes with a set of APIs for flow control. 🎮
You can choose between Asterisk Gateway Interface (AGI) or Asterisk REST Interface (ARI.)
(I find ARI more flexible for my use cases.)
For speech, you have many choices.
For speech, you have many choices.
Here are some:
- Deepgram => https://t.co/vYhVgD1Hxk
- AWS Polly
- Google Speech API
- Microsoft Speech API
- IBM Watson
Here's how to build the system 🏗:
We can divide the process into three steps:
1. Decide which verbs to support
2. Build the voice server
3. Develop the call dispatcher
Step #1: Decide which verbs to support 🗣
Verbs are commonly used constructs for programmable voice and provide an abstraction layer for flow control.
Typical verbs include the following:
- Answer: To accept the request and initiate the flow
- Hangup: To end the call
- Play: To play a sound file from the disk or a URL
- Say: Takes a text and returns a URL with a sound file
- Gather: Waits for voice/DTMF input and returns the text
- Record: For voice recording
- Mute: Halts media flow
- Unmute: Resumes media flow
- Dial: Calls a party and merges the channels
Asterisk has support for ALL of these functionalities.
Step #2: Build the voice server 💬
The voice server component is in charge of flow control.
Developers will extend the voice server to build their apps.
The workflow may resemble this:
- The server receives requests from the dispatcher*
- Requests should include the ARI endpoint
- Optionally, a JWT token for authentication
- The server uses the Answer verb to accept new calls
- The server sends control commands (e.g., Say, Gather)
- The server ends the call
Step #3: Develop the call dispatcher 🔀
The final piece of the puzzle is the dispatcher.
The dispatcher is the "backend" for your voice server.
Among other things, it is in charge of:
1. Implementing the backend for all verbs
2. Creating short-lived tokens for authentication 🔑
3. Monitoring Asterisk
That's all friends. Follow the previous steps to build your next programmable voice stack from scratch using Asterisk.
Routr tip 💡:
Integration with Routr via its Restful APIs was really boring. I’m thrilled it now includes an SDK with gRPC under the hood. Here’s a snippet of the NodeSDK for creating a new Domain.
How to deploy Asterisk PBX:
Old Way
- Manually install Asterisk on your server
- Single server deployment: Pray it never goes down
- Configure everything manually
- Need a few hundred boxes? Forget it
New Way
- Run Asterisk in a Docker container
- Reuse the configuration across all Asterisk boxes
- Use Routr as a frontend for HA and scaling
- Use Routr to manage your endpoints with an SDK
Routr + Asterisk = 🤝