Fonos: An Open Source Alternative to Twilio
GitHub - fonoster/fonoster: 🚀 The open-source alternative to Twilio.
Fonoster: The open-source alternative to Twilio
Fonoster Inc is researching an innovative Programmable Telecommunications Stack that will allow businesses to connect telephony services with the Internet entirely through a cloud-based utility.

     
Warning
Exploring Fonoster: We encourage new users to initially explore Fonoster's features through our SaaS (Software as a Service) option. This platform is free to start and offers a comprehensive experience of what Fonoster can do.
Installation Advisory: Please note that the current installation process for Fonoster is complex. We are actively working to simplify this process. We recommend waiting for our upcoming v0.6.x release before attempting a direct installation. These future releases are designed to offer a more user-friendly installation experience.
Thank you for your interest in Fonoster. We are committed to enhancing your experience with every release.

Features
The most notable features of Fonoster 0.4 are:

 Multitenancy
 Easy deployment of PBX functionalities
 Programmable Voice Applications
 NodeJS SDK
 Support for Amazon Simple Storage Service (S3)
 Secure API endpoints with Let's Encrypt
 Authentication with OAuth2
 Authentication with JWT
 Role-Based Access Control (RBAC)
 Plugins-based Command-line Tool
 Support for Google Speech APIs
 Secrets managed by Hashicorp Vault

Code Examples
A Voice Application is a server that takes control of the flow in a call. A Voice Application can use any combination of the following verbs:

Answer - Accepts an incoming call
Hangup - Closes the call
Play - Takes a URL or file and streams the sound back to the calling party
Say - Takes a text, synthesizes the text into audio, and streams back the result
Gather - Waits for DTMF or speech events and returns back the result
SGather - Returns a stream for future DTMF and speech results
Dial - Passes the call to an Agent or a Number at the PSTN
Record - It records the voice of the calling party and saves the audio on the Storage sub-system
Mute - It tells the channel to stop sending media, effectively muting the channel
Unmute - It tells the channel to allow media flow

Voice Application Example:
const { VoiceServer } = require("@fonoster/voice");

const serverConfig = {
  pathToFiles: `${process.cwd()}/sounds`,
};

new VoiceServer(serverConfig).listen(
  async (req, res) => {
    console.log(req);
    await res.answer();
    await res.play(`sound:${req.selfEndpoint}/sounds/hello-world.sln16`);
    await res.hangup();
  }
);

// your app will live at http://127.0.0.1:3000 
// and you can easily publish it to the Internet with:
// ngrok http 3000
Everything in Fonoster is an API first, and initiating a call is no exception. You can use the SDK to start a call with a few lines of code.
Example of originating a call with the SDK:
const Fonoster = require("@fonoster/sdk");
const callManager = new Fonoster.CallManager();

callManager.call({
 from: "9842753574",
 to: "17853178070",
 webhook: "https://5a2d2ea5d84d.ngrok.io/voiceapp"
})
 .then(console.log)
 .catch(console.error);
Getting Started
To get started with Fonoster, use the following resources:

Deploying Fonoster with Docker
Getting started with Fonoster
Connecting Fonoster with Dialogflow
Using Google Speech APIs
How we created an open-source alternative to Twilio and why it matters

Give a Star! ⭐
Please give it a star if you like this project or plan to use it. Thanks 🙏
Bugs and Feedback
For bugs, questions, and discussions, please use the Github Issues
Contributing
For contributing, please see the following links:

Contribution Documents
Contributors




    
        
            
            
            Pedro Sanders
        
    
    
        
            
            
            Efrain Peralta
        
    
    
        
            
            
            Wardner Lara
        
    
    
        
            
            
            Richard HC
        
    
    
        
            
            
            Hoan Luu Huu
        
    
    
        
            
            
            Speedy Monster
        
    


    
        
            
            
            Brayan Munoz V.
        
    
    
        
            
            
            Dede kurniawan
        
    
    
        
            
            
            gabriel duncan
        
    
    
        
            
            
            Prasurjya Pran Borah
        
    
    
        
            
            
            Hector Ventura
        
    
    
        
            
            
            Aman Rawat
        
    


    
        
            
            
            0xflotus
        
    
    
        
            
            
            Osama Sehgol
        
    
    
        
            
            
            Paul Sütterlin
        
    
    
        
            
            
            Riad Vargas
        
    
    
        
            
            
            Shailendra Paliwal
        
    
    
        
            
            
            The Gitter Badger
        
    


    
        
            
            
            Tom Sebastian
        
    
    
        
            
            
            Yuri
        
    
    
        
            
            
            cdrsociate
        
    
    
        
            
            
            pavan
        
    
    
        
            
            
            nrjchnd
        
    
    
        
            
            
            Salami Bashir
        
    


    
        
            
            
            Shivam Deepak Chaudhary
        
    
    
        
            
            
            showf68
        
    
    
        
            
            
            telenautical
        
    
    
        
            
            
            Wisdom Elendu
        
    
    
        
            
            
            Manish
        
    
    
        
            
            
            Judge Godwins
        
    


    
        
            
            
            Jon Chin
        
    
    
        
            
            
            Harish Chander
        
    
    
        
            
            
            Gary Barnes
        
    
    
        
            
            
            Fidal Mathew
        
    
    
        
            
            
            Dung Duc Huynh (Kaka)
        
    
    
        
            
            
            Ciprian
        
    


    
        
            
            
            Christopher Adigun
        
    
    
        
            
            
            Bruno Gomes
        
    
    
        
            
            
            Bruno Arueira
        
    
    
        
            
            
            Antonius Ostermann
        
    
    
        
            
            
            Ali Firat ARI
        
    
    
        
            
            
            Alex
        
    


    
        
            
            
            Albert E. Hidalgo Taveras
        
    


Sponsors
We're glad to be supported by respected companies and individuals from several industries.

Find all our supporters here

Become a Github Sponsor

Authors

Pedro Sanders

License
Copyright (C) 2024 by Fonoster Inc. MIT License (see LICENSE for details).
