unsubbed.co

Kamailio

Self-hosted communication & messaging tool that provides modular SIP server.

Twenty-five years of development, thousands of deployments, and a configuration language only a telecom engineer could love.

TL;DR

  • What it is: Open-source (GPLv2) SIP signaling server — the routing and signaling layer for VoIP calls, WebRTC, instant messaging, and presence, able to handle thousands of call setups per second [website][README].
  • Who it’s for: Telecom engineers, VoIP platform operators, and carriers who need a battle-hardened SIP proxy. Not for non-technical founders — this is infrastructure software, not a SaaS replacement with a UI [website].
  • Cost savings: If you’re running a managed SIP trunking or UCaaS platform (Twilio, Vonage, Bandwidth), Kamailio can replace the signaling layer entirely. At scale, that’s tens of thousands of dollars per month. At small scale, the complexity cost exceeds the savings [README][website].
  • Key strength: Unmatched scalability and flexibility. It handles load balancing, least-cost routing, registrar, SBC, WebRTC gateway, IMS, and SIP firewall in one configurable engine [website].
  • Key weakness: Configuration is done in a domain-specific scripting language that has no parallel in modern software. The learning curve is steep enough that most deployments are done by specialists, not founders [README].

What is Kamailio

Kamailio is an open-source SIP (Session Initiation Protocol) server. SIP is the protocol that handles call setup, routing, and teardown for VoIP calls — the same way HTTP handles web requests [README]. When you make a call through Twilio, a carrier, or a corporate PBX, there is a SIP signaling layer underneath. Kamailio is what that layer can look like when you own it instead of renting it.

The project has 25 years of continuous development behind it. It started in 2001 as SIP Express Router (SER) at Fraunhofer Fokus research institute in Berlin. In 2005 it forked into OpenSER, was renamed Kamailio in 2008 due to trademark issues, then merged back with the original SER codebase by the end of 2012 [website]. That history matters because it explains why the codebase has such a massive feature surface — it has absorbed two decades of production requirements from carriers, enterprises, and research institutions.

Kamailio is written in pure C, optimized for high throughput on Unix/Linux systems. The website claims it can handle “thousands of call setups per second” — and this is not marketing hyperbole. It is deployed by actual carriers routing real call volume [website].

It is not a PBX. It does not handle media (audio/video streams). It handles SIP signaling only — call routing, authentication, registration, presence. You pair it with a media server (Asterisk, FreeSWITCH, RTPEngine) if you need to process the actual audio [website].

As of this review it has 2,766 GitHub stars — a number that significantly underrepresents its actual adoption, because the majority of its users are infrastructure teams at telcos, not individual developers who star GitHub repos.


Why People Choose It

Kamailio is not competing with SaaS tools the way Activepieces competes with Zapier. The comparison set is: Asterisk, FreeSWITCH, OpenSIPS, and commercial SBCs (Session Border Controllers) from vendors like Oracle (Acme Packet), Ribbon, and Cisco.

Versus Asterisk. Asterisk is a full-featured PBX that also does SIP signaling. The problem at scale is that Asterisk handles media and signaling in the same process, which limits throughput. Kamailio does only signaling, which means it can route far more concurrent calls on the same hardware. A common architecture is Kamailio as the SIP proxy routing to a cluster of Asterisk or FreeSWITCH media servers [website][README].

Versus OpenSIPS. OpenSIPS is the closest direct competitor — another open-source SIP proxy that forked from the same SER codebase in 2008. The two projects have converged in many ways. Kamailio tends to be preferred for carrier-grade deployments where stability and module breadth matter; OpenSIPS has historically had a more active commercial support ecosystem. The practical difference for most deployments is smaller than the debate in mailing lists would suggest.

Versus commercial SBCs. Oracle Acme Packet hardware SBCs cost tens of thousands of dollars for the appliance plus annual licensing. Kamailio running on commodity hardware replaces that for the pure SIP signaling function. At carrier scale, this is a meaningful cost difference. At startup scale, you probably don’t need the feature set of either [website].

Why operators choose Kamailio specifically: it supports an unusually wide backend stack — MySQL, PostgreSQL, Oracle, Redis, Cassandra, MongoDB, Memcached, LDAP, Radius — which means it integrates into whatever subscriber database you already have [website]. It supports IPv4/IPv6, TLS, WebSocket for WebRTC, SCTP, and asynchronous I/O [website]. The module ecosystem is extensive: over 200 modules covering everything from ENUM lookup to least-cost routing to IMS/VoLTE extensions [website][README].


Features

Based on the official website and README:

Core SIP functions:

  • SIP proxy, registrar, redirect server, and location service [website]
  • Load balancing across SIP endpoints and media servers [website]
  • Least-cost routing and DID routing [website]
  • Routing failover — automatic rerouting when a destination is unreachable [website]
  • SIP firewall and rate limiting [website]
  • Session Border Controller (SBC) mode [website]

Protocols and transport:

  • UDP, TCP, TLS, SCTP (asynchronous for TCP and SCTP) [website]
  • WebSocket support for WebRTC — allows browser-based SIP clients [website]
  • IPv4 and IPv6 dual-stack [website]
  • SRTP for encrypted media (in coordination with RTPEngine or similar) [website]

Messaging and presence:

  • SIMPLE instant messaging and presence [website]
  • Embedded XCAP server [website]
  • MSRP relay for message sessions [website]

Authentication and accounting:

  • SIP digest authentication [website]
  • RADIUS and LDAP integration for subscriber data [website]
  • Accounting records to MySQL, PostgreSQL, RADIUS, and others [website]

Management and monitoring:

  • JSON-RPC and XMLRPC control interface [website]
  • SNMP monitoring [website]
  • Management API for runtime configuration changes without restart [website]

IMS/VoLTE:

  • IMS (IP Multimedia Subsystem) extensions for LTE/VoLTE deployments [website]
  • ENUM support for PSTN number lookup [website]

Scripting:

  • Configuration is written in the Kamailio scripting language (kamailio.cfg) — a C-like DSL that controls how each SIP message is processed [README]
  • Lua, Python, and Perl modules for extending logic in those languages [website]
  • KEMI (Kamailio Embedded Interface) for writing routing logic in Lua, Python, JavaScript, or Ruby [website]

The feature list is genuinely exhaustive. The problem is not missing features — it is the operational complexity of configuring them correctly.


Pricing: SaaS vs Self-Hosted Math

Kamailio is free software under GPLv2. The software itself costs nothing [README]. Commercial support is available from a number of consulting firms listed in the business directory on the project website, but the project itself does not sell licenses or subscriptions.

What you’re actually paying for when you run Kamailio:

  • Server costs: Kamailio is efficient. A single server with 8 cores and 16GB RAM can handle tens of thousands of concurrent registrations and thousands of calls per second under normal SIP load. A dedicated server on Hetzner runs €40–80/mo. On AWS, an equivalent instance is $100–200/mo.
  • Expertise costs: This is the real line item. A Kamailio engineer with production experience bills at $100–200/hr. Initial setup and configuration of a production-grade Kamailio deployment (with failover, TLS, WebRTC, and database backend) takes 40–100 hours of expert time. That is $4,000–$20,000 in one-time setup, plus ongoing operational cost.
  • HA and redundancy: For a production deployment you want at least two Kamailio instances behind a load balancer, with shared state (Redis or database). Add another $80–160/mo for a second server.

Compared to managed SIP:

  • Twilio SIP trunking: $0.0085/minute for US calls. At 100,000 minutes/month: $850/mo.
  • Bandwidth.com: similar range.
  • Vonage: slightly higher.
  • Self-hosted Kamailio + SIP trunk wholesale: wholesale VoIP rates run $0.002–0.005/minute for US termination. At 100,000 minutes: $200–500/mo. Infrastructure overhead: $150–300/mo. Break-even vs Twilio: obvious at this volume.

The honest math: the economics of self-hosting Kamailio only work at meaningful call volume (50,000+ minutes/month) or when you are building a platform where SIP routing is a product feature rather than a utility. For a small business making a few hundred calls a month, Twilio or a $30/mo hosted PBX wins on total cost when you factor in engineering time.


Deployment Reality Check

The README describes the installation path as source compilation or Linux package repos (deb/rpm packages maintained by the project) [README]. There is no Docker Compose quickstart in the same sense as modern web applications — Kamailio predates that tooling, and the primary deployment model remains native Linux services.

What a production deployment actually requires:

  • A Linux server (Debian/Ubuntu or RHEL/CentOS are best-supported)
  • Kamailio installed from the project’s package repo (straightforward) [README]
  • A database for subscriber data (MySQL or PostgreSQL) — not optional for any real deployment
  • Redis or another shared memory store if you’re running multiple instances
  • Configuration of kamailio.cfg — the part that will consume most of your time
  • A reverse DNS setup and TLS certificates for SIPS/SRTS
  • Firewall rules for SIP (UDP/5060, TCP/5061) and RTP media ranges (if handling media)
  • Optional: RTPEngine or rtpproxy for NAT traversal and media relay

What can go sideways:

The configuration language is not intuitive. kamailio.cfg uses routing blocks (request_route, reply_route, branch_route, failure_route) that process SIP messages in sequence. A mistake in routing logic sends calls to the wrong destination or drops them silently. Debugging SIP is done via sip trace tools (sngrep, Wireshark) — there is no GUI error log that says “your routing rule on line 47 dropped this call.”

NAT traversal is the single most common source of pain. SIP was designed for networks with public IPs; most deployments involve clients behind NAT, which breaks the protocol’s assumption that the IP in the SIP headers matches the actual source. Kamailio has extensive NAT handling modules, but configuring them correctly requires understanding SIP at the protocol level.

TLS configuration requires attention. Kamailio uses OpenSSL, and configuring certificate validation, SIPS port, and transport selection correctly is non-trivial.

The wiki (https://www.kamailio.org/wikidocs/) has good tutorials for common scenarios, but they assume significant SIP background knowledge [README]. The mailing list (sr-users) is active and the community generally responsive, but it is a technical community that expects you to have read the documentation first.

Realistic time estimate for an experienced VoIP engineer: 2–5 days to a working production deployment with TLS, WebRTC, and database backend. For someone learning SIP and Kamailio simultaneously: weeks to months.


Pros and Cons

Pros

  • 25 years of production hardening. Kamailio runs at carriers. It has handled real traffic at scale that would have exposed any fundamental bugs long ago [website].
  • Genuinely carrier-grade throughput. Thousands of call setups per second on commodity hardware. Nothing in the open-source world comes close for pure SIP signaling performance [website].
  • Enormous feature surface. 200+ modules covering every SIP use case: LCR, load balancing, SBC, WebRTC, IMS/VoLTE, ENUM, presence, MSRP, NAT traversal, accounting [website][README].
  • Flexible backend integration. MySQL, PostgreSQL, Oracle, Redis, Cassandra, MongoDB, LDAP, Radius — plug into whatever your subscriber data infrastructure already is [website].
  • KEMI scripting. Recent versions allow routing logic in Lua, Python, JavaScript, or Ruby — a meaningful improvement over the traditional config file for developers who don’t want to learn a proprietary DSL [website].
  • Active development and community. v6.1.0 was released February 2026 with new modules and TLS improvements. The project is not in maintenance mode [website].
  • GPLv2 license. No commercial licensing complications for use in your own platform [README].
  • Well-documented protocol behavior. The wiki covers RFC-correct behavior for edge cases that would take weeks to figure out from scratch [README].

Cons

  • No UI. There is no web dashboard, no graphical call routing editor, no self-service portal. Everything is config files and CLI [website][README].
  • Steep learning curve. SIP expertise is a prerequisite. The configuration language adds another learning curve on top. This is not a weekend project [README].
  • Debugging is painful. SIP tracing requires packet capture tools. There is no built-in “why did this call fail” diagnostic UI [website].
  • Not a complete solution. Kamailio does signaling only. For a complete VoIP platform you need: a media server (Asterisk, FreeSWITCH, or RTPEngine), a billing system, a provisioning system, and a web UI. Kamailio is one piece of a larger stack [website].
  • Documentation assumes SIP knowledge. The tutorials are good but are written for engineers who already understand SIP concepts. Newcomers need to learn the protocol and the tool simultaneously [README].
  • NAT traversal complexity. A recurring pain point in the community. Correct configuration requires protocol-level understanding that goes beyond typical web infrastructure work.
  • 2,766 GitHub stars significantly underrepresent actual adoption but also reflect that the target user (telecom engineers) is a smaller and less GitHub-active population than web developers. The star count is not a useful signal here.
  • No managed SaaS option. There is no “Kamailio Cloud” to reduce operational burden. You own the infrastructure entirely, or you hire consultants who do [website].

Who Should Use This / Who Shouldn’t

Use Kamailio if:

  • You are building a VoIP platform, hosted PBX, or UCaaS product and need to own the SIP routing layer for cost or control reasons.
  • You’re running call volume where Twilio or Bandwidth costs are material ($1,000+/mo) and you have the engineering bandwidth to manage infrastructure.
  • You need carrier-grade SIP features: ENUM, LCR, SBC, IMS/VoLTE, WebRTC gateway — features that don’t exist in simpler PBX solutions.
  • You’re a telecom engineer who already knows SIP and needs a proven, flexible open-source engine.
  • You need to integrate SIP signaling into an existing infrastructure with specific backend requirements (Oracle DB, LDAP, Cassandra).

Don’t use Kamailio if:

  • You’re a non-technical founder looking to self-host a phone system. Use a hosted PBX (3CX, Nextcloud Talk, Jitsi, or a simple VoIP.ms account) instead.
  • You need a working phone system in days, not weeks.
  • Your team has no SIP expertise and no budget to hire it.
  • You have fewer than 10,000 minutes/month of call traffic — the economics don’t justify the operational complexity.
  • You’re looking for a UI-driven tool you can hand to a non-engineer to configure.

Consider a simpler alternative if:

  • You need a self-hosted PBX with a web UI — look at FreePBX (Asterisk-based, has a web interface) or 3CX.
  • You need WebRTC-based voice/video in a web app — look at Jitsi Meet or LiveKit.
  • You need SIP trunking for an existing PBX — just buy trunks from VoIP.ms, Twilio, or Bandwidth and don’t run your own SIP server.

Alternatives Worth Considering

  • Asterisk — Full PBX with media handling. Lower ceiling on throughput than Kamailio but covers voice/video processing in one package. Common pattern: Kamailio as front-end proxy + Asterisk as media server.
  • FreeSWITCH — Similar to Asterisk. Often preferred for IVR and conference use cases. Also frequently paired with Kamailio in a proxy+media architecture.
  • OpenSIPS — The closest direct competitor. Forked from the same SER codebase as Kamailio. Similar feature set, similar complexity. Active commercial ecosystem. Choice between the two is often driven by which one your team’s SIP engineers know.
  • FreePBX — Asterisk with a web UI. Dramatically easier to configure for standard PBX use cases. Gives up Kamailio’s throughput and flexibility but is actually usable by non-engineers.
  • 3CX — Commercial PBX with a free tier. Proprietary but significantly easier to operate. The free tier supports up to 10 simultaneous calls.
  • Jitsi Meet — Open-source video conferencing. If the use case is meeting rooms rather than telephony, Jitsi is a better fit.
  • LiveKit — Modern WebRTC infrastructure. If the use case is voice/video in a web or mobile app, LiveKit offers a more developer-friendly API than anything in the traditional SIP ecosystem.
  • Twilio / Vonage / Bandwidth — The managed SIP trunking and programmable voice incumbents. Higher per-minute cost but zero operational burden. The correct comparison for most startups considering Kamailio.

Bottom Line

Kamailio is the right answer to a specific question: “How do I build a carrier-grade SIP routing layer that I fully control?” If that is your question, there is no better open-source answer — 25 years of continuous development, GPLv2 license, and a feature set that covers every SIP scenario from small enterprise to national carrier. But that is a question asked by VoIP platform engineers, not by non-technical founders. If your question is “how do I get a phone system without paying Twilio forever” — that is a different question, and Kamailio is the wrong answer. The operational complexity (SIP expertise required, no UI, multi-component architecture) means the real cost of self-hosting Kamailio at small scale exceeds what you’d spend on managed SIP. The economics flip at serious call volume or when SIP routing is a product feature you’re selling, not a utility you’re consuming.


Sources

Note: The third-party review articles provided for this tool were mismatched (they contained content about WhatsApp Web, unrelated to Kamailio). The article above is sourced from Kamailio’s official materials only.

  1. Kamailio Official Website — “The Kamailio SIP Server Project”. https://www.kamailio.org/w/
  2. Kamailio Features Page — Feature overview. https://www.kamailio.org/w/features/
  3. Kamailio GitHub Repository and README — Source code, license, overview. https://github.com/kamailio/kamailio
  4. Kamailio Documentation Index — Modules, wiki, installation guides. https://www.kamailio.org/w/documentation/
  5. Kamailio Wiki — Installation tutorials, variables, functions reference. https://www.kamailio.org/wikidocs/
  6. Kamailio v6.1.0 Release Notes — February 18, 2026. https://www.kamailio.org/w/kamailio-v6-1-0-release-notes/