Coder Social home page Coder Social logo

michaelulloa / fonos Goto Github PK

View Code? Open in Web Editor NEW

This project forked from fonoster/fonoster

0.0 0.0 0.0 52.31 MB

๐Ÿš€ An open-source alternative to Twilio.

Home Page: https://fonoster.github.io/fonos/

License: MIT License

JavaScript 52.99% TypeScript 46.31% Shell 0.25% Batchfile 0.01% Mustache 0.18% Dockerfile 0.25% HCL 0.01%

fonos's Introduction

build license: MIT Tweet

Repo Banner

With Project Fonos, Fonoster Inc researches an innovative Programmable Telecommunications Stack that will allow for an entirely cloud-based utility for businesses to connect telephony services with the Internet.

Project Fonos aims to solve businesses needing to add voice, video, and messaging features to their websites and applications. Companies are, in most cases, unable to accomplish this independently due to the complexity and number of telephony services involved in the task. Instead, businesses rely on third-party providers that offer software as a service (SaaS) that allows for communication between telephony devices and internet-based APIs, services, etc.

The primary innovation of Project Fonos lies in researching and developing the means for creating a highly portable, extensible, cloud-based Programmable Telecommunications Stack. Using this form of CPaaS, businesses will call up an API to dial, answer a call, establish a video session, send SMS, etc., all with just HTTP requests and without worrying what servers and networks are doing with that information in the background. For Project Fonos to be a viable alternative to existing CPaaS, the system must be portable. Therefore, Project Fonos must take advantage of the various cloud environments such as Kubernetes and AWS ECS to run solutions at scale. Guaranteeing portability for Project Fonos will also mean ensuring the deployability of the system using a "single-click-install" when possible.


Special Announcement:

We now have a Slack Channel
There we plan to discuss roadmaps, feature requests and more
Join the channel


Architecture

High-level overview

Repo Banner

Conceptual architecture and stack. We will post more details soon.

Features

The most notable features on PF 0.1 are:

  • Cloud initialization with Cloud-Init
  • Multitenancy
  • Easy deployment of PBXs 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 API
  • Experimental support for Cloud Functions
  • Experimental support for Secret management

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:

  • Play - Takes an 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
  • 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("@fonos/voice");
const voiceServer = new VoiceServer({ base: '/voiceapp' });

voiceServer.listen((req, res) => {
  console.log(req);
  res.play("sound:hello-world");
});

// your app will leave at http://127.0.0.1/voiceapp 
// and you can easily publish it to the Internet with:
// ngrok http 3000

Everything in PF 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 Fonos = require("@fonos/sdk");
const callManager = new Fonos.CallManager();

callManager.call({
 from: "9842753574",
 to: "17853178070",
 webhook: "https://5a2d2ea5d84d.ngrok.io/voiceapp"
})
.then(console.log)
.catch(console.error);

Getting Started

command-line tool

To get started with PF use the following resources:

Bugs and Feedback

For bugs, questions, and discussions, please use the Github Issues

Contributing

For contributing, please see the following links:

We're glad to be supported by respected companies and individuals from several industries. See our Github Sponsors learn more.

Platinum Sponsors

Find all supporters in our BACKERS.md file.

Support Fono's developers on Gh Sponsors


Authors

License

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

fonos's People

Contributors

psanders avatar wardner avatar rihernandez avatar speedymonster avatar dependabot[bot] avatar github-actions[bot] avatar brunoarueira avatar gitter-badger avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.