Giter VIP home page Giter VIP logo

fonoster's Introduction

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.

Fonoster community banner

build release Discord Code Of Conduct GitHub Twitter Follow

Attention โš ๏ธ:

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 0.4 or 0.5 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:

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:

Pedro
Pedro Sanders
Efrain
Efrain Peralta
Wardner
Wardner Lara
Richard
Richard HC
Hoan
Hoan Luu Huu
Speedy
Speedy Monster
Brayan
Brayan Munoz Vargas
Dede
Dede kurniawan
gabriel
gabriel duncan
Prasurjya
Prasurjya Pran Borah
Hector
Hector Ventura
0xflotus/
0xflotus
Manish/
Manish
Osama
Osama Sehgol
Paul
Paul Sรผtterlin
Riad
Riad Vargas
Shailendra
Shailendra Paliwal
The
The Gitter Badger
Yuri/
Yuri
cdrsociate/
cdrsociate
pavan/
pavan
nrjchnd/
nrjchnd
Salami
Salami Bashir
Shivam
Shivam Deepak Chaudhary
showf68/
showf68
telenautical/
telenautical
Wisdom
Wisdom Elendu
Judge
Judge Godwins
Jon
Jon Chin
Harish
Harish Chander
Gary
Gary Barnes
Fidal
Fidal Mathew
Dung
Dung Duc Huynh (Kaka)
Ciprian/
Ciprian
Christopher
Christopher Adigun
Bruno
Bruno Wego
Bruno
Bruno Arueira
Antonius
Antonius Ostermann
Ali
Ali Firat ARI
Alex/
Alex
Albert
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

License

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

fonoster's People

Contributors

0xflotus avatar brayanmnz avatar cdrsociate avatar dedekrnwan avatar dependabot[bot] avatar efraa avatar gad2103 avatar ghana7989 avatar github-actions[bot] avatar gitter-badger avatar hectorvent avatar iamppborah avatar itzmanish avatar judgegodwins avatar nrjchnd avatar osehgol avatar psanders avatar psuet avatar riadvargas avatar rihernandez avatar salami-dev avatar scshiv29-dev avatar showf68 avatar speedymonster avatar telenautical avatar theewiz avatar vcidst avatar wardner avatar xquanluu avatar yuricodes avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

fonoster's Issues

Implement a CLI plugin for the Apps API

Is your feature request related to a problem? Please describe.

The Apps API, which is optional, should have a CLI plugin.

Describe the solution you'd like
We like to have a CLI plugin

Describe alternatives you've considered
None

Additional context
None

The version warning shows after every call to the ctl

Describe the bug

The @fonos/ctl shows the update warning, every time you issue a command. The only way to prevent the warning is to update the package.

To Reproduce
Steps to reproduce the behavior:

  1. Go to your terminal
  2. Type any command under fonos
  3. See the version warning after each command

You will only see this if your version is older than the current version

Expected behavior
The warning should show up once per update.

System information (please complete the following):

  • OS: All
  • NodeJS, NPM versions [All]
  • CTL version [All]

Additional context

The module we use to obtain the warning is @oclif/plugin-warn-if-update-available. Ideally, we want to fix the issue directly at the plugin.

Add the github/oauth2 service to Fonos release action

Is your feature request related to a problem? Please describe.
The oauth2 service is not being released with the rest of the services.

Describe the solution you'd like
We need to trigger the oauth2's release with the rest of the services.

Describe alternatives you've considered
None

Feedback on Getting Started Documentation

I have followed the guide available at: https://learn.fonoster.com/docs/getting_started/overview and here is my feedback so far:

Create a User Account -> no problem

Install and setup the CLI -> no problem

Create a Project -> no problems but two things:

  • the CLI prompts me to allow 'experiments', but the guide doesn't explain what that is (at least, not at this point). I was hesitant to allow it but I did anyway.
  • a quality of life suggestion. when running fonoster projects:use [ref], would it be possible to use the friendly name instead of the id? I come from a Firebase background and their CLI let's me write something like firebase projects:use share-meals-dev, where "share-meals-dev" is the project name. it's not a huge issue.

Configure a Number -> no problems but the CLI asks me for an "expire" value. from the guide, it's not clear what this is. the only thing I can relate it to is the TTL for a DNS record. the questions in my head are "what unit of measurement is expire using?" and "what happens after a number expires"?

Create a Voice Application -> I followed the guide and everything was smooth. however, the last instruction is to use ngrok to expose my server. what do I do with this URL now? my instinct is to log into voip.ms and configure something there. I think that's what I would have to do with Twilio, ie point the number to an endpoint on my server. I held off on that for now and moved onto the next step in the guide.

Receive and respond to a call -> it's unclear what command I should run. the documentation says fonoster numbers:update [ID] but what does ID represent? the only thing I can think of is to put the url from ngrok from before, so I ran: fonoster numbers:update https://xxxx-xx-xx-xx-xxx.ngrok.io. I'm then prompted for an "aor link". I don't even know what AOR stands for.

at this point, I stopped following the guide.

Port conflict breaks the docker-in-docker installation process

Describe the bug
The docker-in-docker installation fails if the port 50051 is used by another process.

To Reproduce
Steps to reproduce the behavior:

  1. Start any process on port 50051
  2. Install Fonoster as described here
  3. Notice error starting the apiserver and minio

Expected behavior
We should display a better error for this situation, and a way to fix the issue. Additionally, we could use a less common port...

Screenshots

...
Creating fonoster_providers_1   ... done
Creating fonoster_projects_1    ... done
Creating fonoster_fs_1          ... done
Creating fonoster_callmanager_1 ... done
Creating fonoster_auth_1        ... done
Creating fonoster_storage_1     ... 
Creating fonoster_sipproxy_1    ... done
Creating fonoster_storage_1     ... done
Creating fonoster_numbers_1     ... done
Creating fonoster_users_1       ... done

ERROR: for apiserver  Cannot start service apiserver: Ports are not available: listen tcp 0.0.0.0:50051: bind: address already in use
ERROR: Encountered errors while bringing up the project.

Workaround
Set the environment variable HTTP_PORT use a different port. For example:

docker run -it --rm \
  -e CONFIG_PATH=$(pwd)/fonoster/config \
  -e HTTP_PORT=50052 \
  --volume /var/run/docker.sock:/var/run/docker.sock \
  --volume $(pwd)/fonoster:/out:rw \
  --entrypoint="/install.sh" \
  fonoster/fonoster:0.2.20

System information (please complete the following):

  • OS: [e.g. OSX]

Additional context
None

The status page should include individual services

Is your feature request related to a problem? Please describe.

The Fonoster Cloud item in the Fonoster Status page should include individual services such as API.

Describe the solution you'd like

We need to itemize the service to have for example Media Server, Signaling Server, Voice Server, etc.

Describe alternatives you've considered
None

Additional context
None

Move Secrets CLI to Core CLI

Is your feature request related to a problem? Please describe.
Since Secrets is now a Core API, we should have it as part of the Core CLI.

Describe the solution you'd like
Deprecate the plugin-secrets repo and move its content into its own topic inside the Core CLI

Describe alternatives you've considered
None

Additional context
The plugin should also be deprecated from NPM.

errors installing SDK in windows 10

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'npm install @fonos/sdk '
  2. Type '....'
  3. Then, '....'
  4. See error
    image

image

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

System information (please complete the following):

  • OS: Windows 10
  • NodeJS 14.16.0, NPM 6.14.11
  • CTL version 0.1.1-alpha.0

Additional context
Add any other context about the problem here.

Confusing error -> Error: 2 UNKNOWN: Cannot read property 'spec' of null

Describe the bug
The command fonoster agents:rm [ID] should return "Not found" if the ID of the Agent doesnt exist. Instead is failing with the following error:

This utility will help you update an existing Agent
Press ^C at any time to quit.
    Error: 2 UNKNOWN: Cannot read property 'spec' of null
    Code: 2

To Reproduce
Steps to reproduce the behavior:

  1. Go to your console
  2. Create a test Agent
  3. Type fonoster agents:rm [ID]
  4. See error above

Expected behavior
It should return a "Not found"

System information (please complete the following):

  • OS: Tested on OSX
  • NodeJS, NPM versions [e.g. v14.16.0, 7.10.0]
  • CTL version 0.2.17

Additional context
Nothing follows...

The CLI shows the full stack trace

Describe the bug
The CLI is showing the full stack trace for the errors. But the trace adds no valuable information to the user.

To Reproduce
Steps to reproduce the behavior:

  1. Go to console
  2. Type fonoster auth:login
  3. Then, use bad login information
  4. See error

Expected behavior
It should instead provide information on how to fix the error.

Screenshots

Error: 16 UNAUTHENTICATED: invalid authentication
    at Object.callErrorFromStatus (/usr/local/lib/node_modules/@fonoster/ctl/node_modules/@grpc/grpc-js/build/src/call.js:31:26)
    at Object.onReceiveStatus (/usr/local/lib/node_modules/@fonoster/ctl/node_modules/@grpc/grpc-js/build/src/client.js:180:52)
    at Object.onReceiveStatus (/usr/local/lib/node_modules/@fonoster/ctl/node_modules/@grpc/grpc-js/build/src/client-interceptors.js:336:141)
    at Object.onReceiveStatus (/usr/local/lib/node_modules/@fonoster/ctl/node_modules/@grpc/grpc-js/build/src/client-interceptors.js:299:181)
    at /usr/local/lib/node_modules/@fonoster/ctl/node_modules/@grpc/grpc-js/build/src/call-stream.js:160:78
    at processTicksAndRejections (internal/process/task_queues.js:75:11) {
  code: 16,
  details: 'invalid authentication',
  metadata: Metadata { internalRepr: Map(0) {}, options: {} }
}

System information (please complete the following):

  • OS: All
  • NodeJS, NPM versions [v14.16.0, 7.10.0]
  • CTL version [e.g. 0.2.20 ]

File retention policy on Rox

Is your feature request related to a problem? Please describe.

The docker container for Rox is currently keeping all of the generated media files (e.g. from the TTS engine), which causes an increase in disk utilization.

Describe the solution you'd like

We should have a cleanup mechanism to remove unused files. For example, a cron job that runs every n hours and removes files that haven't been accessed for x hours.

Describe alternatives you've considered

We could add a flag on Rox to avoid storing files.

Additional context
None

[email protected]

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Type '....'
  3. Then, '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

System information (please complete the following):

  • OS: [e.g. Linux]
  • NodeJS, NPM versions [e.g. v14.16.0, 7.10.0]
  • CTL version [e.g. 0.1 ]

Additional context
Add any other context about the problem here.

Move token validation to Auth service

Description

We need to move the token validation from the auth_middleware to the auth service. This is important to avoid having the authentication private key in too many places (since we presently separated the API into multiple services.)

I propose creating a new endpoint, under /fonos.auth.v1alpha1.Auth/ValidateToken and use this endpoint from the auth_middleware instead of directly accessing the private key.

@speedymonster, what are your thoughts?

Please add sms

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Describe the solution you'd like
A clear and concise description of what you want to happen.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

installing CLI

I'm on a new laptop, so I haven't quite gotten my whole dev environment set up. however, when running npm -g install @fonoster/ctl I have gotten the following error:

> [email protected] install /home/jon/.nvm/versions/node/v14.18.1/lib/node_modules/@fonoster/ctl/node_modules/cpu-features
> node-gyp rebuild

gyp ERR! build error 
gyp ERR! stack Error: not found: make
gyp ERR! stack     at getNotFoundError (/home/jon/.nvm/versions/node/v14.18.1/lib/node_modules/npm/node_modules/which/which.js:13:12)
gyp ERR! stack     at F (/home/jon/.nvm/versions/node/v14.18.1/lib/node_modules/npm/node_modules/which/which.js:68:19)
gyp ERR! stack     at E (/home/jon/.nvm/versions/node/v14.18.1/lib/node_modules/npm/node_modules/which/which.js:80:29)
gyp ERR! stack     at /home/jon/.nvm/versions/node/v14.18.1/lib/node_modules/npm/node_modules/which/which.js:89:16
gyp ERR! stack     at /home/jon/.nvm/versions/node/v14.18.1/lib/node_modules/npm/node_modules/isexe/index.js:42:5
gyp ERR! stack     at /home/jon/.nvm/versions/node/v14.18.1/lib/node_modules/npm/node_modules/isexe/mode.js:8:5
gyp ERR! stack     at FSReqCallback.oncomplete (fs.js:191:21)
gyp ERR! System Linux 5.13.0-21-generic
gyp ERR! command "/home/jon/.nvm/versions/node/v14.18.1/bin/node" "/home/jon/.nvm/versions/node/v14.18.1/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/jon/.nvm/versions/node/v14.18.1/lib/node_modules/@fonoster/ctl/node_modules/cpu-features
gyp ERR! node -v v14.18.1
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok 

> [email protected] install /home/jon/.nvm/versions/node/v14.18.1/lib/node_modules/@fonoster/ctl/node_modules/ssh2
> node install.js

gyp ERR! build error 
gyp ERR! stack Error: not found: make
gyp ERR! stack     at getNotFoundError (/home/jon/.nvm/versions/node/v14.18.1/lib/node_modules/npm/node_modules/which/which.js:13:12)
gyp ERR! stack     at F (/home/jon/.nvm/versions/node/v14.18.1/lib/node_modules/npm/node_modules/which/which.js:68:19)
gyp ERR! stack     at E (/home/jon/.nvm/versions/node/v14.18.1/lib/node_modules/npm/node_modules/which/which.js:80:29)
gyp ERR! stack     at /home/jon/.nvm/versions/node/v14.18.1/lib/node_modules/npm/node_modules/which/which.js:89:16
gyp ERR! stack     at /home/jon/.nvm/versions/node/v14.18.1/lib/node_modules/npm/node_modules/isexe/index.js:42:5
gyp ERR! stack     at /home/jon/.nvm/versions/node/v14.18.1/lib/node_modules/npm/node_modules/isexe/mode.js:8:5
gyp ERR! stack     at FSReqCallback.oncomplete (fs.js:191:21)
gyp ERR! System Linux 5.13.0-21-generic
gyp ERR! command "/home/jon/.nvm/versions/node/v14.18.1/bin/node" "/home/jon/.nvm/versions/node/v14.18.1/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "--target=v14.18.1" "rebuild"
gyp ERR! cwd /home/jon/.nvm/versions/node/v14.18.1/lib/node_modules/@fonoster/ctl/node_modules/ssh2/lib/protocol/crypto
gyp ERR! node -v v14.18.1
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok 
Failed to build optional crypto binding

I'm running Ubuntu 21.10. according to Google, this should fix such an error: sudo apt-get install build-essential but it doesn't work. I don't get an error about ssh2 but it still fails on cpu-features

The agents update command fails with a useless message

Describe the bug
Using the fonoster agents:update command fails with a useless message.

To Reproduce
Steps to reproduce the behavior:

  1. Go to your console
  2. Create a new Agent or use an existing one
  3. Then attempt to update using fonoster agents:update [ID]
  4. See error

Error example:

Error: 9 FAILED_PRECONDITION: $[0].spec.credentials.username: must be at least 3 characters long, $[0].spec.credentials.username: is a readonly field, it cannot be changed

Expected behavior
There should be no errors

System information (please complete the following):

  • OS: OSX
  • NodeJS, NPM versions: v14.16.0, 7.10.0
  • CTL version: 0.2.17

Additional context
No

Modify Command-Line to expand all topics

Is your feature request related to a problem? Please describe.
Currently, the command line interface is "contracted" into topics. Because of that, we constantly have to ask for help on a particular topic.

Describe the solution you'd like
We need to have the topics expanded by default.

Describe alternatives you've considered
None

Additional context

This is how it currently looks like:

Fonoster CLI

The new version will like more like Firebase's CLI.

Firebase CLI

Please look at Oclif Topics for more information.

The voice server (Rox) is missing an option to fall back on user silence.

Is your feature request related to a problem? Please describe.

The interactionTimeout option is not yet implemented.

Describe the solution you'd like

We need to add the timer for lack of interaction (silence).

Describe alternatives you've considered
None

Additional context

We will need an additional parameter to determine the action on timeout. Perhaps interactionTimeoutTrigger or interactionTimeoutEvent.

Permission Denied while running sample call.js

Hello,

I am very new on this project. Just trying to follow this doc, https://learn.fonoster.com/docs/getting_started/create_a_voice_application and bring up a simple call test. I have created a project, provider, and number.

I have created call.js as describe here, https://learn.fonoster.com/docs/getting_started/make_an_outbound_call

but getting following error while we run node call.js

image

I have no idea is there anything wrong I have done, please help me to find the issue.

Thanks,
Salah

Updating a Number with the CLI hangs

Describe the bug
Running the command fonoster numbers:update without the Number's reference, fails without a useful message.

To Reproduce
Steps to reproduce the behavior:

  1. Go to the terminal
  2. Type 'fonoster numbers:update'
  3. See process symbol shows but the process won't complete

Expected behavior
Should return a "not found" with a message indicating how to fix the issue

Screenshots
NA

System information (please complete the following):

  • OS: [e.g. Linux]
  • NodeJS, NPM versions [all]
  • CTL version [0.2.21 ]

Additional context
None

SyntaxError: Invalid regular expression: /^\tts\(?:([^\/]+?))\/?$/: Unmatched ')'

Describe the bug

The bug is a path not normalized to work properly on Windows OS.

Is located on \node_modules@fonos\voice\dist\server.js:38:13)

To Reproduce

To reproduce the behavior just run the Voice Server script on a Windows Machine and it will raise a Syntax Error.

Steps to reproduce the behavior:

  1. Go to 'git bash, cmd or PowerShell'
  2. Type 'node index.js on Project Directory'
  3. Then, 'Syntax Error is Raised'
  4. See error

Expected behavior
The Voice Server needs to run properly here without any problem on any OS.

Screenshots
image

System information (please complete the following):

-  OS: Windows 10
-     NodeJS, NPM versions [e.g. v14.17.4, 6.14.14]
-     CTL version [e.g. 0.1 ]

Additional context
Add any other context about the problem here.

SyntaxError: Invalid regular expression: /^\tts\(?:([^\/]+?))\/?$/: Unmatched ')' at new RegExp (<anonymous>) at pathtoRegexp (C:\Users\Braya\OneDrive\Escritorio\Workspace\voiceapp\node_modules\path-to-regexp\index.js:128:10) at new Layer (C:\Users\Braya\OneDrive\Escritorio\Workspace\voiceapp\node_modules\express\lib\router\layer.js:45:17) at Function.route (C:\Users\Braya\OneDrive\Escritorio\Workspace\voiceapp\node_modules\express\lib\router\index.js:494:15) at Function.app.<computed> [as get] (C:\Users\Braya\OneDrive\Escritorio\Workspace\voiceapp\node_modules\express\lib\application.js:481:30) at VoiceServer.listen (C:\Users\Braya\OneDrive\Escritorio\Workspace\voiceapp\node_modules\@fonos\voice\dist\server.js:38:13) at Module._compile (internal/modules/cjs/loader.js:1072:14) at Object.Module._extensions..js (internal/modules/cjs/loader.js:1101:10) at Module.load (internal/modules/cjs/loader.js:937:32)

I can't sign up with github

After installing the Fonoster CTL, I went to https://console.fonoster.io/, I tried to register with sign in with Github dog after giving it permission from github it does not go to the next step.

System information:

  • OS: Windows 10
  • NodeJS, NPM versions: v16.13.0, v8.1.0
  • Fonoster CTL version : 0.2.18

Memory leak in Rox AI due to excessive use of require

Describe the bug

The voice application module, Rox, reads the configuration file for every call which causes a memory leake.

To Reproduce

See the relevant code here

Expected behavior

The configuration should be loaded only at on start.

Screenshots
If applicable, add screenshots to help explain your problem.

System information (please complete the following):

  • OS: All
  • NodeJS, NPM versions: All
  • CTL version at until 0.0.13

Additional context

NA

Using "gather" verb on windows missing tmp folder on C:\

Describe the bug
When trying to use the verb gather after it listen on the call and try to reproduce this with the verb say it cannot find the file because tmp folder is not being created on C:\tmp automatically.
To Reproduce
Steps to reproduce the behavior:

Just run the code on the image below under a Windows machine. Error raised is on this image too.

  1. Go to '...'
  2. Type '....'
  3. Then, '....'
  4. See error
    image

Expected behavior
Here it's expected to run properly both verbs gather and say. If I manually create this tmp folder on C:\ problem is solved and application run properly.

Screenshots
If applicable, add screenshots to help explain your problem.

System information (please complete the following):

  • OS: [e.g. Windows 10]
  • NodeJS, NPM versions [e.g. v14.17.4, 6.14.14]

Developer Guide For Setup ?

please attach the developer guide for setup the repo and architecture explanation. So newbie (like me) can contribute to repo.

Missing Fonos Config

Describe the bug
When install using Helm Chart, services like apiserver, mediacontroller, mediaserver needs fonos-config, that not exists with the current instalation.

Warning  FailedMount  57s (x11 over 7m8s)   kubelet            MountVolume.SetUp failed for volume "fonos-config" : secret "fonos-config" not found

To Reproduce

helm install fonoster fonoster/fonos \
  --namespace fonoster-system \
  --version 0.0.7

Screenshots
Screen Shot 2021-11-10 at 09 07 34

Conditional call bypass

Is your feature request related to a problem? Please describe.

A call loop occurs when call forwarding rules are set up in a way that allows a single call to go back to a destination infinitely, without allowing the call to reach a voicemail box. - reference

We need to add a flag to automatically skip a call when this condition is detected.

A related feature is skipping calls based on a rate. For example, if you are deploying a new bot you could tell the bot to skip 1:4 (25%) calls until you decided that the bot can handle 100% of the calls.

Relevant to Rox

Describe the solution you'd like

I like to have a global configuration to handle avoiding call loops and a per-number setting to answer calls based on rate. Ideally, the rate-setting is done dynamically(i.e with a webhook).

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

Community Dashboard

Is your feature request related to a problem? Please describe.
The ctl tool is cool but for some, a Web UI is more user-friendly...

Describe the solution you'd like
We create basic Web UI covering the same functionalities we have in the ctl

Describe alternatives you've considered
None

Additional context
A good starting point for this is the OpenAPI spec.

Audio problems with Voip.ms

Describe the bug
While using VoIP.ms the call connects to the Voice Application but the audio is not working

To Reproduce
Steps to reproduce the behavior:

  1. Create Provider, Number, and a Voice Application (And connect all of them)
  2. Call the Number
  3. Observe the call arriving at your Voice Application
  4. Notice that no audio is being receiving

Expected behavior
I expect to hear audio

System information (please complete the following):
NA

Additional context
No

The TTSPlugin interface has a typo

Describe the bug

There is a typo in the TTSPlugin interface in the package@fonoster/tts. The name of the function synthetize is a typo and should be renamed as synthesize.

To Reproduce
NA

Expected behavior
NA

Screenshots
NA

System information (please complete the following):
NA

Additional context
Add any other context about the problem here.

Introduce an option to update Fonoster using docker-in-docker

Is your feature request related to a problem? Please describe.

Updating Fonoster is currently a manual process that involves modifying the environment variables manually. This is a problem that makes CICD more complex.

Describe the solution you'd like
We should introduce an option, as part of the docker-in-docker installer, to assist in updating Fonoster.

The new feature should:

  • Allow ONLY patch updates
  • Update to the latest patch by default
  • Allow passing the version manually
  • Fail if the version parameter is not a patch
  • Update existing environment variables
  • Update documentation to explain the new feature

Describe alternatives you've considered
None

Additional context

The docker-in-docker command currently defaults to the install.sh entrypoint. The new option should therefore be in the update.sh entrypoint.

See here the documentation for the current version.

Alert user when installation is not possible

Is your feature request related to a problem? Please describe.
The docker-in-docker installer should inform the user when installation is not possible. For example:

  • If an installation already exists
  • A required port is already being used

Describe the solution you'd like

I like to have a clear message indicating why the installation is not possible. For example:

Error: Unable to continue the installation. Another process is using port 24244.

Describe alternatives you've considered
None

Additional context
None

We need a test suite to avoid regressions with RTPEngine

Is your feature request related to a problem? Please describe.
We need a way to test and validate the new RTPEngine images don't break for every new build.

Describe the solution you'd like
Ideally, we create a "contained" test that runs after the image is built

Describe alternatives you've considered
An entering solution is to freeze RTPEngine to the last known working version

Additional context
Not having this suite is causing important issues that are difficult to trace

Error Typing "fonos" in Windows, First Time

Describe the bug

The problem here is after install Fonos and try to run it at first time.

When typing fonos on any command line. i.e cmd, bash, PowerShell
It throws a ".Fonos" directory missing.

To immediately fix it, just need to create a directory called .fonos at the route specified.

To Reproduce
Steps to reproduce the behavior:
At first time running fonos on Windows:

  1. Go to 'cmd, git bash or PowerShell'
  2. Type ' fonos '
  3. Then, 'It throws a ".Fonos" directory missing error'
  4. See error

Expected behavior
The Fonos command to run properly, you may need to add the directory creation "automatically" in the case of using Windows.

Screenshots
If applicable, add screenshots to help explain your problem.

System information (please complete the following):

  • OS: Windows 10
  • NodeJS, NPM versions [e.g. v14.17.4, 6.14.14]
  • CTL version [e.g. 0.1 ]

Additional context
Add any other context about the problem here.

Basic Network Script Error

Getting Docker compose error on ./basic-network.sh stop|start Script

When i run ./basic-network.sh stop or start i am getting the following error

ERROR: The Compose file './01_api.yml' is invalid because:
Unsupported config option for services.agents: 'extends'
Unsupported config option for services.auth: 'extends'
Unsupported config option for services.callmanager: 'extends'
Unsupported config option for services.domains: 'extends'
Unsupported config option for services.numbers: 'extends'
Unsupported config option for services.projects: 'extends'
Unsupported config option for services.providers: 'extends'
Unsupported config option for services.storage: 'extends'
Unsupported config option for services.users: 'extends'

Using Docker

Client:
 Version:           20.10.5+dfsg1
 API version:       1.41
 Go version:        go1.15.9
 Git commit:        55c4c88
 Built:             Wed Aug  4 19:55:57 2021
 OS/Arch:           linux/amd64
 Context:           default
 Experimental:      true

Server:
 Engine:
  Version:          20.10.5+dfsg1
  API version:      1.41 (minimum version 1.12)
  Go version:       go1.15.9
  Git commit:       363e9a8
  Built:            Wed Aug  4 19:55:57 2021
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          1.4.5~ds1
  GitCommit:        1.4.5~ds1-2
 runc:
  Version:          1.0.0~rc93+ds1
  GitCommit:        1.0.0~rc93+ds1-5+b2
 docker-init:
  Version:          0.19.0
  GitCommit:

To Reproduce
Steps to reproduce the behavior:

  1. Go to '/opt/fonos' or '/root/fonoster/operator'
  2. Type './basic-network.sh stop'
  3. See error

Expected behavior
Normal behavior should be the docker containers will stop on stop command and start on start command and apply the new .env params

System information (please complete the following):

  • OS: Debian 11
  • Docker 20.10.05

Outbound calls fail for numbers starting with "+" symbol.

Describe the bug
Outbound calls fail for numbers starting with "+" symbol

To Reproduce
Steps to reproduce the behavior:

  1. Create a new call script using the CallManager
  2. Start a call with a Provider that requires E164 Numbers (like Twilio)
  3. See error 400 Invalid phone number or equivalent

Expected behavior
The API should send the numbers as input by the users

Screenshots

400 Invalid phone number

System information (please complete the following):

  • API version [0.2.21 ]

Additional context
The root of the issue seems to be at: call.ts

traefik letencrypt not setting correctly

Describe the bug
I have enabled letsencrypt and the certificate is getting generated correctly and mapping to the container however the traefik is still using self signed certificate instead of generated Certificate

To Reproduce
Steps to reproduce the behavior:

  1. Go to '.env' and do the letencrypt required config
  2. Type './basic-network stop | start'
  3. Then, 'curl to localhost or the public IP or through fonos:auth'
  4. See error

Expected behavior
Normal scenario should be that letencrypt will be used for ssl on traefik and fonos cli will connect to it for the call flow

Screenshots
ssl cert details
curl screenshot

System information (please complete the following):

  • OS: Debian 10
  • version : Fonoster 0.2.14

Allow to pass extra services during installation

Is your feature request related to a problem? Please describe.
Adding or removing extra services is currently a manual process, making CICD more complex.

Describe the solution you'd like

The docker-in-docker installer should provide a parameter to pass the "extra" services.

Describe alternatives you've considered
None

Additional context

We should also allow users to point to external services (e.g as Redis and Vault). In that way, users will be able to switch to a managed service quickly (Only during installation.)

docker run -it --rm \
  -e CONFIG_PATH=$(pwd)/fonoster/config \
  -e EXTRA_SERVICES="datasource" \
  -e SECRETS_URL="..." \ 
  -e SECRETS_TOKEN="..." \
  --volume /var/run/docker.sock:/var/run/docker.sock \
  --volume $(pwd)/fonoster:/out:rw \
  --entrypoint="/install.sh" \
  fonoster/fonoster:0.3.0

malformed manifest.json

on https://console.fonoster.io/, the manifest.json is malformed. there seems to be missing initializing " before each /favicon/... value

{
 "name": "Fonoster Microsite",
 "icons": [
  {
   "src": /favicon/android-icon-36x36.png",
   "sizes": "36x36",
   "type": "image.png",
   "density": "0.75"
  },
  {
   "src": /favicon/android-icon-48x48.png",
   "sizes": "48x48",
   "type": "image.png",
   "density": "1.0"
  },
  {
   "src": /favicon/android-icon-72x72.png",
   "sizes": "72x72",
   "type": "image.png",
   "density": "1.5"
  },
  {
   "src": /favicon/android-icon-96x96.png",
   "sizes": "96x96",
   "type": "image.png",
   "density": "2.0"
  },
  {
   "src": /favicon/android-icon-144x144.png",
   "sizes": "144x144",
   "type": "image.png",
   "density": "3.0"
  },
  {
   "src": /favicon/android-icon-192x192.png",
   "sizes": "192x192",
   "type": "image.png",
   "density": "4.0"
  }
 ]
}

Multiple Features

Holding:
Put the user on hold with waiting music/recording before a call starts and during the call
When on hold, be able to make another call with someone else but still be able to return back to the on hold caller or put them in a queue for someone else (parking).

Transfers:
Warm/cold transfers to another phone number
There should be a fallback in case of getting stuck where the number we are transferring to does not answer.

Conference:
Adding multiple people to a single call
Password for entering into the conference

Extensions:
Dial an phone number extension

Call statuses:
There should be a way for a user to see who is calling them, if the call is disconnected, busy, on hold, mute, etc.

Load balancer for RTPEngine

Is your feature request related to a problem? Please describe.
RTPEngine is unable to scale horizontally by itself.

Describe the solution you'd like
A layer seven load balancer emulating RTPEngine's NG protocol.

Describe alternatives you've considered
None available

Additional context
Ideally, this will be a zero-dependency module.

Prefix accessKeyId on Users and Projects

Is your feature request related to a problem? Please describe.
The pattern on the accessKeyId for Users and Projects looks exactly the same which sometimes causes confusion.

Describe the solution you'd like
Add a prefix so it is easy to identify the type of account. This enhancement will bring the following changes:

  1. User's accessKeyId will now have the US prefix (i.e US618572e3ec11d10600000001)
  2. Project's accessKeyId will now have PJ prefix (i.e PJ618688e35315720700000001)

Describe alternatives you've considered
None

Additional context
NA

It would be nice to know which project is the default project (on the CLI)

Is your feature request related to a problem? Please describe.
At the moment there is no way to tell which project is set to be the default on the CLI.

Describe the solution you'd like
It would be nice to have an indicator so we know which one is the "default". For example, we could mark the default project with an *.

$ fonoster projects:ls
Ref / Access Key Id           Name        
PJ619154d081467a0700000001    Acme Corps *
PJ879134d081567g0h00000001   Walmart North

Describe alternatives you've considered
NA

Additional context
NA

cannot create new account

I visited https://console.fonoster.io/ and clicked on Sign in with Github.

I got put through the usual auth workflow and authorized the app. but then ... nothing happens. I'm still on the same screen with Sign in with Github. Subsequent presses of the button does nothing.

Looking at the console log, I see this error: Manifest: Line: 5, column: 11, Syntax error.

Investigating further, the manifest.json file has this: "src": /favicon/android-icon-36x36.png", which is missing a " at the start of the value definition. but is a broken manifest file enough to halt the whole process?

The voice server fails silently if another process is using the same port

Describe the bug

The voice server fails silently if another process is using the same port

To Reproduce

Steps to reproduce the behavior:

  1. Start any process on port 3000
  2. Start a voice application on port 3000
  3. Observe: The application seems to start without a problem
  4. Observe: Fonoster fails to connect to webhook

Expected behavior

The voice application should fail with a "port 3000 already in use"

Screenshots

NA

System information (please complete the following):

  • OS: [e.g. Linux]
  • NodeJS, NPM versions [all]
  • CTL version [0.2.21 ]

Additional context

None

Roadmap for PF 0.1

The following items will be the area of focus for PF 0.1.

  • Allow deploying PF in single-host mode (using docker)
  • Enable TLS for the GRPC endpoints and Routr's signaling via Let's Encrypt
  • Make using RabbitMQ optional
  • Remove MongoDB dependency
  • Build from scratch the PVA module to use ARI instead of AGI

Slow DNS blocks the event loop

Describe the bug

If a SIP request times out or fails due to a DNS issue, the events loop will be blocked, causing subsequent requests to stop.

To Reproduce
Steps to reproduce the behavior:

  1. Set the DNS entry on the daemon.json to a dummy IP
  2. Create a Provider/Gateway type UserPass.
  3. See the error [WARN ] Unable to connect to host -> ... and the server freeze

Expected behavior
A slow DNS response should not block the event loop.

Screenshots
If applicable, add screenshots to help explain your problem.

System information (please complete the following):

  • OS: [all]
  • NodeJS, NPM versions [all, all]

Additional context
None

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.