There is no single open-source Twilio. Twilio is a bundle: a voice API, messaging, video, email through SendGrid, verification, and a conversations product, all behind one account and one bill. The open-source world offers excellent tools for each of those jobs, but you assemble them yourself.

This guide maps each part of a typical CPaaS to the self-hosted tools that replace it, with licenses and honest trade-offs, and says plainly what stays paid even when the software is free. It is a guide to what to run, not a claim that running it is always cheaper. We package a few of these tools ourselves (Jitsi Meet, Coturn, and Listmonk), and I call that out where it matters.

The Quick Verdict

You need programmable voice

Start with jambonz or Fonoster. Reach for FreeSWITCH or Asterisk if you want an engine or a phone system to build on.

You need video calls in your product

Jitsi Meet for a finished meeting app, LiveKit for a toolkit or voice AI agents, and Coturn underneath either.

You need SMS

Jasmin gives you the gateway, but you still need carrier connections. Budget for them early.

You want one API for notifications

Novu orchestrates the channels, though it still sends through providers for SMS and email.

Why Teams Look Beyond Twilio

Twilio's product list covers Messaging APIs for SMS, RCS, and WhatsApp, a Voice API, the SendGrid Email API, Elastic SIP Trunking, Video, Verify for authentication, and Conversations. It is a convenient single vendor, and the reasons people leave it are consistent:

  • Usage-based pricing that grows with every message and minute, which hurts most at high volume
  • Calls and messages passing through a vendor's network, which some teams cannot accept for data residency or compliance
  • Product changes outside your control. Twilio Video, for example, announced its end of life in late 2023 and reversed the decision in October 2024, as we noted in our video API pricing comparison
  • A wish to own the stack, for customization or to avoid lock-in

How to Choose

Four questions narrow the field quickly:

  1. Which channels do you actually use? Most teams need two or three of these tools, not all eleven.
  2. Do you need a finished product or an engine? A phone system and a developer API are different shopping lists.
  3. Who will run it? Every tool here moves operations onto your team.
  4. Can you get carrier connectivity? Voice and SMS depend on providers whatever software you pick.

1. jambonz: Voice CPaaS Built to Self-Host

  • Voice and SIP
  • MIT
  • Self-host or hosted

jambonz describes itself on GitHub as an open-source, self-hosted, "bring your own everything" CPaaS. Its core telephony feature server and REST API server are both MIT licensed. Of the voice options here, it is the closest match to how Twilio Programmable Voice works for a developer: your application controls calls, and you plug in whichever speech and AI providers you choose.

  • SIP connectivity with routing and media control, from SIP trunks to call handling
  • Swappable speech-to-text, text-to-speech, and LLM providers, aimed at voice AI workflows
  • Self-hosted in your VPC or on-prem, with the project also selling a hosted cloud and licensing options

Pros

  • MIT-licensed core, so you can read and change the code
  • Built around the idea of choosing your own speech and AI providers
  • A developer-facing model that will feel familiar if you have used a hosted voice API

Cons

  • The project also sells hosted and licensed offerings, so check what is in the open repositories and what is paid before you plan
  • You still need SIP trunks to reach the phone network
  • Smaller community than the older telephony engines

2. Fonoster: Programmable Voice in Node.js

  • Voice and SIP
  • MIT
  • Node.js

Fonoster calls itself "the open-source alternative to Twilio" and is MIT licensed. It is written for JavaScript and TypeScript teams: voice applications are built from call-control verbs such as Answer, Say, Gather, Dial, Record, and Stream, which will look familiar to anyone who has written TwiML.

  • Multitenancy and easy PBX deployment alongside programmable voice apps
  • A Node.js SDK, Amazon S3 storage support, and Let's Encrypt for API endpoints
  • OAuth2 and JWT authentication, role-based access control, and a plugin-based CLI
  • Docker deployment, and Google Speech API support

Pros

  • Closest in style to Twilio for a JavaScript team
  • Verbs map neatly onto Twilio-style call flows
  • Multitenancy helps if you run it for several customers

Cons

  • I could not see tagged releases on its GitHub page, so check maturity and recent activity before you bet production on it
  • Voice only, so SMS, video, and email need other tools
  • You still need SIP trunks for the phone network

3. FreeSWITCH: The Telephony Engine

  • Voice and SIP
  • MPL 1.1
  • Engine, not a product

FreeSWITCH describes itself as a Software Defined Telecom Stack that runs on anything from a Raspberry Pi to a multi-core server. The main codebase is under the Mozilla Public License 1.1. It speaks SIP and WebRTC, and it is the engine under several of the platforms people build when they want a Twilio-like API.

  • SIP and WebRTC, plus Voice-over-IP services including SMS
  • Runs on small or large hardware
  • A deep module system for building exactly the call behavior you want

Pros

  • Very flexible and widely used in telecom
  • You control every detail of call handling
  • Open source with no per-minute software fee

Cons

  • An engine, not a CPaaS: you build the application layer and the APIs yourself
  • A real learning curve for teams without telecom experience
  • You still need SIP trunks and monitoring

4. Asterisk: The Classic PBX Toolkit

  • Voice and PBX
  • GPL-2.0
  • PSTN hardware support

Asterisk is described in its README as an open-source PBX and telephony toolkit. It is GPL-2.0 licensed, has copyright dates from 2001, and supports traditional phone-line hardware as well as SIP. If you need a company phone system as well as an API, it is the obvious candidate.

  • A full PBX: extensions, queues, voicemail, and call routing
  • SIP-based VoIP and support for traditional telephony hardware
  • A very large body of community knowledge

Pros

  • Mature, with decades of production use
  • Strong if you want a phone system and programmable calls from one place
  • Huge community

Cons

  • More of a toolkit than a developer API, so expect more work to get a Twilio-like experience
  • GPL licensing matters if you plan to ship it inside a product
  • You still need SIP trunks

5. Jasmin: A Self-Hosted SMS Gateway

  • SMS
  • Apache 2.0
  • Python

Jasmin is an open-source SMS gateway released under the Apache License 2.0. Its core is written in Python and built on Twisted. It is the piece that replaces the routing and queueing side of a messaging API, not the carrier connection itself.

  • SMPP client and server, plus an HTTP client and server
  • Message routing with round-robin, failover, HLR lookup, and least-cost options
  • AMQP-based store-and-forward queuing, and Redis for delivery receipts and billing
  • Docker, Kubernetes manifests, and Debian and Red Hat packages

Pros

  • Enterprise-style routing and queueing, free of per-message software fees
  • Flexible deployment options
  • Apache 2.0 licensed

Cons

  • You need SMPP connections to carriers or aggregators, which cost money and require agreements
  • I could not see tagged releases on its GitHub page, so check how actively it is maintained
  • SMS only

6. Jitsi Meet: Video Meetings You Host

  • Video
  • Apache 2.0
  • Meetrix packages it

On the video side of Twilio, Jitsi Meet is a finished, Apache 2.0 meeting app you run yourself, with an iframe API for embedding it in your own product. We package it for AWS and Google Cloud, so weigh our view accordingly; the trade-offs against toolkits are in LiveKit vs Jitsi.

  • Join from a link, with no account or install
  • Breakout rooms, recording through Jibri, and live streaming
  • An iframe and JavaScript API for embedding
  • A SIP gateway through Jigasi, covered in our Jitsi SIP gateway guide

Pros

  • A finished product, so you are not designing a call UI from scratch
  • No per-minute fees, and your recordings stay on your servers
  • Large community and many guides

Cons

  • A meeting app more than an SDK, so deep custom UIs take more work
  • You operate the servers, TURN, and scaling
  • Not a voice or SMS tool

7. LiveKit: A WebRTC Toolkit and Agents Framework

  • Video and voice AI
  • Open source
  • Self-host or Cloud

LiveKit describes itself as a platform for voice, video, and physical AI agents. The media server and the Agents framework are open source, so you can run them yourself, with LiveKit Cloud as a managed option. It sits nearest to Twilio Video in the CPaaS picture, and it is the strongest choice here for AI voice agents. For the build, see our self-hosted voice AI stack and self-hosting LiveKit on AWS.

  • Client SDKs for JavaScript, Swift, Android, and Flutter, with React components
  • Server SDKs for Go, Node.js, Python, and Ruby
  • An Agents framework for Python and Node.js
  • Telephony recipes for agent-powered calling systems

Pros

  • Self-hostable media layer with first-party agent tooling
  • Good SDK coverage
  • A managed cloud if you would rather not run it

Cons

  • A toolkit: you assemble the UI and the product around it
  • Self-hosting means running TURN, scaling, and monitoring
  • Not an SMS or email tool

8. Coturn: The TURN Server Behind WebRTC

  • TURN and STUN
  • Open source
  • Meetrix packages it

Twilio sells a hosted network traversal service so WebRTC calls connect from behind strict firewalls, and our Coturn on Google Cloud article compares it directly. Coturn is the open-source server for that job, a TURN and STUN server you run yourself. We package it for AWS and Google Cloud, and it is a quiet requirement under almost every WebRTC product on this list.

  • TURN and STUN for NAT traversal in WebRTC and VoIP
  • Time-limited credentials from a shared secret
  • Runs in your own cloud account

Pros

  • No per-gigabyte relay fees from a vendor
  • A small, well-understood piece of infrastructure
  • Works with Jitsi, LiveKit, and most WebRTC stacks

Cons

  • Relay traffic uses your bandwidth, so budget for it
  • You manage certificates, ports, and monitoring
  • Infrastructure only, not a product on its own

9. Novu: Notification Orchestration

  • Notifications
  • MIT core
  • Enterprise folder is commercial

Novu describes itself as open-source communication infrastructure for agents and products. One API sends notifications over in-app, push, email, SMS, and chat, with workflows and digests. The core is MIT licensed, and the README says the enterprise folder is under a commercial license.

  • Channels: Inbox or in-app, push, email, SMS, and chat
  • A large list of provider integrations (the README lists 20 for email and 37 for SMS)
  • Workflows, digests, and an embeddable inbox component

Pros

  • Replaces the orchestration layer you would otherwise write
  • Lets you switch SMS or email providers without rewriting your app
  • Open-source core

Cons

  • It routes through providers, so it does not replace the SMS carrier or the email sender
  • Some modules are under a commercial license
  • Self-hosting needs reading the docs carefully

10. Listmonk: Email Campaigns and Lists

  • Email
  • Newsletters
  • Meetrix packages it

For the email side, Listmonk is a self-hosted newsletter and mailing-list manager that runs on PostgreSQL. It sends through your own SMTP provider, such as Amazon SES or Mailgun. We package it for AWS and Google Cloud, so again weigh our view accordingly; the setup is in our Listmonk developer guide.

  • Lists, campaigns, and templates on PostgreSQL
  • Bring your own SMTP: Gmail, SES, Mailgun, Postmark, or your own mail server
  • No per-subscriber fees

Pros

  • Replaces per-subscriber pricing for newsletters
  • Simple to run and to back up
  • Good fit for campaigns and announcements

Cons

  • You still need an SMTP provider and good sending reputation
  • Aimed at campaigns, not a full transactional email platform
  • Email only

11. Matrix Synapse: Messaging You Own

  • Chat
  • AGPL-3.0
  • Dual-licensed by Element

Synapse is an open-source Matrix homeserver, written and maintained by Element. It is available under AGPL-3.0, and Element also sells a commercial license. Matrix is an open standard for chat, so it covers the same ground as a conversations API. We cover the setup in how to self-host Matrix Synapse.

  • An open standard for federated chat
  • Python and Twisted with Rust components
  • Official deployment through the Element Server Suite, or installing Synapse standalone

Pros

  • Open standard with a large ecosystem
  • Federation between servers
  • Mature, actively maintained project

Cons

  • AGPL-3.0 has obligations if you modify and offer it as a service
  • Element provides support only with an ESS subscription
  • A chat platform, not a messaging API for SMS

Twilio to Open Source, Side by Side

Twilio productOpen-source optionWhat you still need
Programmable Voice, Elastic SIP Trunkingjambonz, Fonoster, FreeSWITCH, AsteriskSIP trunks for the phone network
Messaging APIs (SMS)Jasmin SMS GatewaySMPP connections to carriers or aggregators
Twilio VideoJitsi Meet, LiveKitTURN server and bandwidth
Network Traversal (TURN)CoturnBandwidth for relayed media
SendGrid Email APIListmonk for campaigns, with your own SMTPAn SMTP provider and sender reputation
Notifications across channelsNovuThe underlying providers for SMS and email
Conversations (chat)Matrix SynapseHosting, backups, and moderation

Licenses and features come from each project's repository or website as I read them. They change, so check the current repo before you build on any of them.

What Still Costs Money

0software license fees for most of these tools

Free software does not make a free platform. Voice needs SIP trunks, SMS needs carrier or aggregator connections, email needs a sender with a good reputation, and relayed WebRTC media needs bandwidth.

Add servers, monitoring, and the hours of the people on call, and the honest comparison is total cost against what Twilio would bill for your volumes. For help sizing the infrastructure side, see our guide to self-hosting software on AWS.

Where I'd Start

Pick one channel

Replace the channel that costs you most, usually voice or video, before you try to replace everything.

Prove the carrier path

Before you build, confirm you can get SIP trunks or SMPP connections on acceptable terms.

Plan for operations

Decide who monitors, patches, and carries the pager. The software is the easy part.

Keep Twilio for the rest

Mixing is fine. Self-host what you can run well and keep a vendor for the channels that are not worth the effort.

Licenses, releases, and vendor offerings in this article reflect each project's repository or website at the time of writing and may have changed. Check the current terms before you build, and run a small proof of concept with your own volumes.

Frequently Asked Questions

What is an open-source CPaaS?

A CPaaS is a platform that lets developers add voice, messaging, video, or email to an app through APIs. An open-source one gives you the software to run yourself, usually in pieces: one tool per channel, not a single product.

Is there a single open-source replacement for Twilio?

Not for everything. jambonz and Fonoster come closest on voice, and Novu orchestrates notifications, but SMS, video, and email each need their own tool. Plan on assembling a stack, not installing one product.

Can I self-host and still reach the phone network?

Yes, but you need carrier connectivity. Voice tools need SIP trunks, and an SMS gateway like Jasmin needs SMPP connections to carriers or aggregators. The software is free, but the connectivity is not.

Which open-source tool is closest to Twilio Programmable Voice?

jambonz and Fonoster are the closest in developer model. Both let your application control calls, and both are MIT licensed. FreeSWITCH and Asterisk are engines and toolkits that you build on.

What replaces Twilio Video?

Jitsi Meet if you want a finished meeting app you embed, and LiveKit if you want a toolkit or voice AI agents. Both are open source. You will also want a TURN server such as Coturn.

Is self-hosting cheaper than Twilio?

Often at scale, but not always. You trade per-message and per-minute fees for servers, bandwidth, carrier costs, and the time of whoever runs it. Model your own volumes before you commit.

Run Your Own Communications Stack

Meetrix packages Jitsi Meet, Coturn, and Listmonk as pre-configured servers for your own AWS or Google Cloud account, so calls, relays, and email lists stay on infrastructure you control.

Browse the Meetrix Store