ScriptsApr 9, 2026·2 min read

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.

TL;DR
Fonoster provides programmable voice APIs for building AI voice apps without relying on Twilio or other proprietary platforms.
§01

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.

§02

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.

§03

How to use

  1. Install the Fonoster SDK:
npm install @fonoster/sdk
  1. 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();
});
  1. Deploy and configure your SIP trunk to route calls to the Fonoster server.
§04

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();
});
§05

Related on TokRepo

  • Voice tools -- AI voice processing and synthesis tools
  • API tools -- Build and integrate with telecom APIs
§06

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

How does Fonoster compare to Twilio?+

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.

What voice verbs does Fonoster support?+

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.

Does Fonoster support speech recognition?+

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.

Can I use Fonoster for outbound calls?+

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.

What infrastructure do I need to run Fonoster?+

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)
🙏

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

Sign in to join the discussion.
No comments yet. Be the first to share your thoughts.

Related Assets