Fonoster — Open-Source AI Telecom Platform
Open-source alternative to Twilio for building AI voice applications. Programmable voice with Answer, Say, Gather, Dial verbs. NodeJS SDK, OAuth2, Google Speech API. MIT, 7,800+ stars.
What it is
Fonoster is an open-source telecom platform that provides programmable voice capabilities similar to Twilio. It offers a NodeJS SDK with voice verbs (Answer, Say, Gather, Dial) for building interactive voice applications, IVR systems, and AI-powered phone bots. Fonoster integrates with Google Speech API for speech recognition and text-to-speech.
Fonoster targets developers building voice-enabled applications who want to avoid vendor lock-in with proprietary telecom platforms. It suits teams building customer service bots, appointment reminders, phone verification systems, or any application that needs voice interaction.
How it saves time or tokens
This workflow provides the SDK installation and a working voice application skeleton. Instead of reading through telecom API documentation and configuring SIP trunks manually, you get a running voice server with a few lines of JavaScript. The included example handles incoming calls, plays text-to-speech, and gathers user input.
How to use
- Install the Fonoster SDK:
npm install @fonoster/sdk
- Create a voice application:
const { VoiceServer } = require('@fonoster/voice');
new VoiceServer().listen(async (req, res) => {
await res.answer();
await res.say('Welcome to our service.');
const input = await res.gather({
numDigits: 1,
timeout: 5,
finishOnKey: '#',
source: 'dtmf'
});
if (input === '1') {
await res.say('You pressed one. Connecting you now.');
await res.dial('sip:support@example.com');
} else {
await res.say('Goodbye.');
}
await res.hangup();
});
- Deploy and configure your SIP trunk to route calls to the Fonoster server.
Example
// AI-powered voice bot with speech recognition
const { VoiceServer } = require('@fonoster/voice');
new VoiceServer().listen(async (req, res) => {
await res.answer();
await res.say('How can I help you today?');
const speech = await res.gather({
timeout: 10,
source: 'speech',
language: 'en-US'
});
// Process with your AI backend
const aiResponse = await processWithAI(speech);
await res.say(aiResponse);
await res.hangup();
});
Related on TokRepo
- Voice tools -- AI voice processing and synthesis tools
- API tools -- Build and integrate with telecom APIs
Common pitfalls
- Fonoster requires a SIP trunk provider for making and receiving actual phone calls. The SDK handles the voice logic, but you need a carrier connection for PSTN access.
- Google Speech API credentials must be configured for speech recognition features. Without them, only DTMF (keypad) input works.
- Audio quality depends heavily on network conditions. Use a reliable internet connection and consider a dedicated SIP trunk for production deployments.
Frequently Asked Questions
Fonoster is open-source and self-hosted, so you own the infrastructure and avoid per-minute pricing from Twilio. Fonoster's API is simpler but less feature-rich. Twilio offers more integrations, global phone numbers, and managed infrastructure.
Fonoster supports Answer (pick up the call), Say (text-to-speech), Gather (collect DTMF or speech input), Dial (connect to another number or SIP endpoint), Play (play an audio file), Record (record the call), and Hangup.
Yes. Fonoster integrates with Google Speech API for speech-to-text. You configure your Google Cloud credentials, and the Gather verb with source set to speech transcribes caller input in real time.
Yes. The SDK supports initiating outbound calls to phone numbers or SIP endpoints. You need a SIP trunk provider that supports outbound dialing and appropriate telecom regulatory compliance.
Fonoster runs on Docker and requires a SIP trunk provider for phone connectivity. For development, you can test with SIP softphones locally. For production, you need a server with reliable internet and a commercial SIP trunk.
Citations (3)
- Fonoster GitHub— Fonoster is an open-source alternative to Twilio with MIT license
- Fonoster Documentation— Programmable voice with NodeJS SDK and voice verbs
- Google Cloud Speech-to-Text— Google Speech API integration for speech recognition
Related on TokRepo
Source & Thanks
Created by Pedro Sanders. Licensed under MIT.
Fonoster — ⭐ 7,800+
Thanks to Pedro Sanders for building an open-source telecom platform for AI developers.
Discussion
Related Assets
Conda — Cross-Platform Package and Environment Manager
Install, update, and manage packages and isolated environments for Python, R, C/C++, and hundreds of other languages from a single tool.
Sphinx — Python Documentation Generator
Generate professional documentation from reStructuredText and Markdown with cross-references, API autodoc, and multiple output formats.
Neutralinojs — Lightweight Cross-Platform Desktop Apps
Build desktop applications with HTML, CSS, and JavaScript using a tiny native runtime instead of bundling Chromium.