Kamailio vs OpenSIPS vs FreeSWITCH: Choosing a SIP Platform (and Why You Usually Need More Than One)

A technical control panel with three embedded screens displaying the Kamailio, OpenSIPS, and FreeSWITCH logos, representing a comparison of open source SIP platform options for voice network architecture

This comparison gets searched as a three-way matchup, but it isn’t really one. Kamailio and OpenSIPS are SIP routing engines: signaling-focused proxies built for very high call-per-second throughput. FreeSWITCH is a back-to-back user agent (B2BUA) with a full media stack covering transcoding, IVR, conferencing, and recording. The platforms are often discussed together because they cover overlapping engineering decisions in the open-source voice ecosystem, but treating them as three peer products distorts the real question.

The real question is not “which one of these three should I deploy.” It is “how should these components combine, and where does each one fit in my architecture?” In a typical production deployment serving thousands of concurrent calls, Kamailio or OpenSIPS sits at the front handling registrations, load balancing, and high-volume SIP routing, while FreeSWITCH handles the calls that need media intelligence. None of the three is a Session Border Controller (SBC), and assuming that any of them can fill that role at the network edge is one of the most common architectural mistakes in open-source voice.

This article covers what each platform is built for, how Kamailio and OpenSIPS actually differ, why the hybrid pattern with FreeSWITCH dominates production deployments, and what the do-it-yourself SBC stack does and does not cover.

Key Terms and Concepts
A quick-reference glossary for terms used throughout this article.
SIP ProxyA signaling-focused SIP element that forwards requests toward their destination without terminating the call session. It can make routing decisions, modify headers, and apply policy, but it does not by itself carry the media stream.
B2BUA (Back-to-Back User Agent)An architecture where a network element fully terminates a SIP call on one side and originates a new, independent call on the other. The B2BUA controls both signaling and media end-to-end, which is what enables transcoding, anchoring SRTP, mixing conferences, and rewriting any part of the call.
KamailioAn open-source SIP routing engine that forked from the SIP Express Router (SER) project in 2008. Widely used as a high-CPS signaling front end, registrar, and load balancer in carrier and CPaaS networks.
OpenSIPSAn open-source SIP routing engine that also forked from SER in 2008. Provides a procedural routing-script language, a more developed native B2BUA module than Kamailio, and rich HTTP and REST integration modules.
FreeSWITCHAn open-source B2BUA media platform that terminates SIP, anchors media, and provides native transcoding, IVR, conferencing, recording, and WebRTC support. Typically paired with a SIP proxy in front for scale.
KEMI (Kamailio Embedded Interface)A Kamailio extension that exposes the platform’s routing model to Lua, Python, JavaScript, and Ruby, allowing teams to write call-routing logic in a general-purpose language while keeping Kamailio’s performance characteristics.
RTPengine / RTPproxyExternal media-relay processes commonly paired with Kamailio (RTPengine) or OpenSIPS (RTPproxy) so the proxy can control the media path for NAT traversal and basic relay without terminating the call itself.
Event Socket Library (ESL)FreeSWITCH’s external control interface. Any program that can open a TCP socket can issue commands to FreeSWITCH and receive live call events, which is what makes the platform a foundation for CPaaS-style applications.
CPS (Calls Per Second)The rate at which new call attempts arrive at a SIP element. Proxy platforms like Kamailio and OpenSIPS optimize for very high CPS because they do not carry the media; media-anchoring platforms scale differently.
STIR/SHAKENA framework for cryptographically signing and verifying the calling number on a SIP call to combat caller-ID spoofing and robocalls. Production deployments rely on an external Secure Telephone Identity Authentication Service (STI-AS) such as TransNexus ClearIP or Neustar.
Network Access Point (NAP)TelcoBridges’ term for a trunk-group configuration on the SBC. Encryption, header manipulation, codec policy, and routing rules are configured per NAP, allowing different carriers and platforms to each receive their own treatment.

The Architectural Split: Proxies vs Media Servers

Kamailio and OpenSIPS are SIP proxies and routing engines. In their default mode, they process SIP signaling, make routing decisions, modify headers, enforce policy, and forward the request along, but they do not touch the media path. The audio (RTP) flows between endpoints directly, or through a separate media-relay process such as RTPengine or RTPproxy that the proxy controls.

FreeSWITCH is a B2BUA. It terminates a SIP call on one side, originates a new call on the other side, and sits in both the signaling path and the media path for the full duration of the call. That position is what allows FreeSWITCH to do things the proxies cannot do natively: transcode codecs, play prompts, record audio, mix conferences, anchor encryption, and run IVR logic against the live media stream.

This architectural difference drives almost everything else about the platforms. A SIP proxy is fast and lightweight because it does not carry the media. A media server is heavier per call because it does. We have covered the deeper proxy-versus-B2BUA mechanics (Via, Route, Record-Route, stateless versus stateful, what a proxy can and cannot rewrite) in our breakdown of SIP proxy architecture. The short version: forwarding is one set of operations, terminating is another, and the things available to each are fundamentally different.

Kamailio in Depth

Kamailio forked from the SIP Express Router (SER) project in 2008 and has been actively developed since. It is widely deployed as a SIP routing core in carrier networks, hosted PBX platforms, and Communications-Platform-as-a-Service (CPaaS) stacks where the design priority is moving very high volumes of SIP signaling with predictable latency.

The platform is configured through kamailio.cfg, a domain-specific scripting language that reads like a constrained C-style program: blocks for request handling, route blocks for routing logic, module loads at the top of the file. For teams that want to write call-routing logic in a general-purpose language instead, Kamailio offers the Kamailio Embedded Interface (KEMI), which exposes the same routing model to Lua, Python, JavaScript, and Ruby. A team with strong Python tooling can write the entire routing layer in Python while keeping Kamailio’s performance characteristics.

Kamailio’s module ecosystem covers the components a service provider needs: a SIP registrar that scales to large user databases, a dispatcher module for load balancing across back-end media servers, a dialog module for tracking active calls, presence and IM modules, accounting modules that write to MySQL, PostgreSQL, or Kafka, and tight integration with RTPengine for media handling. High-availability deployments typically run active-standby pairs with a floating IP managed by Keepalived or Pacemaker.

Common Kamailio roles include serving as the registrar for hundreds of thousands of subscribers, acting as the high-CPS signaling front end for a hosted PBX or CPaaS platform, and providing the routing brain in front of a fleet of media servers. The platform’s reputation for performance is well-earned, though specific call-per-second numbers depend heavily on hardware, configuration, and what each transaction has to do.

OpenSIPS in Depth

OpenSIPS also forked from SER in 2008. The two projects diverged on philosophy as much as on code, and the differences have widened over time. OpenSIPS prioritizes a more integrated, batteries-included approach to SIP routing, with native modules covering territory that Kamailio leaves to external tools.

The OpenSIPS 3.x architecture uses a multi-process model with shared memory for state, similar to Kamailio in structure but with different defaults. Routing logic is written in the platform’s own procedural scripting language, which feels more like a small imperative programming language than Kamailio’s configuration-style format. The script has explicit control flow, variables, and function calls, and most engineers who work with both report that OpenSIPS’s routing scripts are easier to read at length but harder to bridge to external languages.

Two things stand out in the OpenSIPS module set. The platform’s native B2BUA module is more developed than Kamailio’s, meaning OpenSIPS can act as a back-to-back user agent for specific call flows without bolting on a separate component. The HTTP and REST integration modules are also rich, making OpenSIPS a comfortable fit for routing logic that depends on external API calls: fraud lookups, number portability queries, real-time billing checks. The OpenSIPS Control Panel provides a web-based management interface that some teams find useful for visibility and basic operations, though serious deployments still drive configuration through the script.

OpenSIPS roles include high-volume SIP routing, lightweight session control with native B2BUA where the architecture calls for it, signaling for accounting and billing systems, and any deployment where the team prefers a more self-contained platform over one that delegates pieces to external tools.

Kamailio vs OpenSIPS: What Actually Differs

For engineers choosing between the two, here is what matters in practice.

Scripting model is the first divergence. Kamailio’s native configuration language plus KEMI gives the platform a clean bridge to Lua, Python, JavaScript, and Ruby. If your team writes operational tooling in Python and wants the routing layer to live in the same language, Kamailio is the more natural fit. OpenSIPS keeps routing logic in its own language and asks the team to learn it; teams who appreciate a single, consistent procedural format inside the SIP server itself often prefer this.

B2BUA capability is the second. OpenSIPS has a more developed native B2BUA module. If your routing requirements include B2BUA behavior for specific flows (re-INVITE handling, call leg manipulation, structured forking), OpenSIPS handles more of that without external components. Kamailio is more proxy-pure and pairs with separate tools when B2BUA semantics are needed.

External integration covers the third axis. Both platforms can query external systems over HTTP for routing decisions. OpenSIPS’s REST modules are mature out of the box; Kamailio’s equivalent capabilities are equally capable but more commonly accessed through KEMI scripts that wrap your language’s HTTP client.

Module philosophy shapes the fourth. Kamailio leans modular and delegates aggressively to external components (RTPengine for media, separate databases for state, KEMI for non-trivial logic). OpenSIPS pulls more functionality into its native module set. Neither philosophy is wrong, but they pull teams toward different operational patterns.

Community and release cadence are roughly comparable. Both projects have active communities, regular releases, and steady commercial backing through training and consulting services. Mailing lists, conference talks, and documentation are healthy for both.

In our experience, the choice between Kamailio and OpenSIPS rarely comes down to a feature one has and the other does not. It comes down to which team’s mental model your team aligns with, what your operational tooling already looks like, and what you want the routing layer to take responsibility for versus delegate.

FreeSWITCH in This Context

FreeSWITCH belongs in this comparison not as a third option for the same job, but as the platform you reach for when the proxies cannot do the job. FreeSWITCH terminates SIP, anchors media, transcodes codecs, runs dialplans, plays prompts, mixes conferences, records calls, and exposes the Event Socket Library (ESL) for full external control of live sessions. None of that is what a SIP proxy is designed to do.

The architectural and operational characteristics of FreeSWITCH (its threading model, scale envelope, WebRTC support, licensing under the Mozilla Public License) are well-documented in the open-source telephony literature. Rather than repeat that material here, the relevant point for this article is what FreeSWITCH is for in the context of Kamailio and OpenSIPS: the back-end media engine that handles the small fraction of calls in any given platform that need real media intelligence.

The Hybrid Pattern: Proxy in Front, Media Server Behind

This is the architecture that most large open-source voice platforms converge on, and it is the most important practical takeaway from comparing these three platforms.

The pattern looks like this. A pair of Kamailio or OpenSIPS instances runs active-standby with a floating IP at the SIP entry point. They handle registrations, authenticate subscribers, enforce per-account policy, apply load balancing, and route most calls. For calls that need media services (IVR, conferencing, recording, transcoding), Kamailio forwards the call to a pool of FreeSWITCH media servers and load-balances across them. The proxy layer carries the signaling weight at very high CPS; the media layer scales horizontally by adding FreeSWITCH instances.

The pattern shows up consistently in production. One Latin American business-process-outsourcing operator we spoke with recently runs IBM Cloud infrastructure with Kamailio in active-standby pairs, fronting 31 dedicated FreeSWITCH media servers that together handle around 60,000 concurrent calls at roughly 1,000 calls per second for a single large customer. Their full platform peak is approximately 300,000 calls per minute. The split between Kamailio for signaling and FreeSWITCH for media is what lets the architecture scale: neither platform is asked to do work the other is better suited for, and each can be horizontally scaled on its own axis.

Smaller operators run the same pattern at smaller numbers. The reason the architecture survives across scales is that the division of labor is correct: signaling and media have different performance profiles, different failure modes, and different scaling behavior, and trying to handle both inside one process creates contention.

Reference architecture: ProSBC at the carrier edge, Kamailio as SIP routing front end, and a pool of FreeSWITCH media servers behind for IVR, conferencing, recording, and transcoding

Reference architecture for a high-density open-source voice platform: ProSBC at the carrier-facing edge handles security, normalization, and STIR/SHAKEN; Kamailio sits behind it as the SIP routing front end and registrar; FreeSWITCH instances behind Kamailio handle media-anchored functions. Click to enlarge.

Choosing Between Them by Use Case

For teams making the platform decision, the choice usually maps cleanly to the role each component plays.

  • Registrar, SIP load balancer, or high-CPS routing front end: Kamailio or OpenSIPS. Either works. Pick based on which scripting model and operational philosophy fits your team.
  • IVR, conferencing, recording, transcoding, or any media-anchored function: FreeSWITCH. Pair it with a proxy in front for scale.
  • Carrier-grade signaling normalization with rich scripting in Python or Lua: Kamailio with KEMI.
  • SIP routing with built-in B2BUA features and a procedural routing-script language: OpenSIPS.
  • CPaaS-style platform with programmable call control and high concurrency: Kamailio or OpenSIPS at the edge, FreeSWITCH for media, your application logic talking to both through Event Socket and HTTP.
  • Pure call-control platform with no media-side workload at all: a proxy alone is enough. This is rare in production but exists for some specific routing-only deployments.

None of Them Are an SBC: The DIY-SBC Reality

Kamailio paired with RTPengine, or OpenSIPS paired with RTPproxy, is often described as a do-it-yourself SBC. For a narrow definition of SBC (signaling routing, basic NAT traversal, media relay), that description holds. The stack works, and for some deployments it is the right architecture.

For deployments that need to do what a production Session Border Controller is actually expected to do, the gap between the DIY stack and a purpose-built SBC widens quickly. The functions that have to be engineered, integrated, maintained, and supported on your own include the following.

STIR/SHAKEN signing, attestation, and verification with primary and secondary STI-AS failover, attestation-level decisioning per call, and the reason-cause mapping needed when the signing service returns a non-success response. The SIP-redirect-server integration pattern used by TransNexus ClearIP and Neustar (which is how every real-world STIR/SHAKEN deployment runs today) requires routing logic that handles 302 (route advance with Identity header), 404 and 503 (continue call), and 603 (stop call) consistently.

Programmable real-time fraud scoring against external services. Per-call risk evaluation, dynamic blacklisting, integration with TransNexus, YouMail, and SecureLogix scoring APIs, and the routing logic to make in-call decisions before the call sets up.

Carrier-grade DoS and DDoS mitigation. SIP-aware rate limiting per source, per trunk, and per method; protocol validation that drops malformed messages before they touch your routing logic; registration scanning detection that distinguishes legitimate re-registration patterns from attacks; percentage-based greylisting for graduated response during investigation.

Multi-vendor SIP normalization driven by a header-manipulation engine that can be reconfigured per trunk group without script edits. Vendor combinations change as carriers update their platforms, and the maintenance burden of keeping a hand-rolled header-rewriting layer current across dozens of peers compounds quickly.

Topology hiding that is consistent across signaling and media. Per-leg CDRs with quality metrics, SNMP traps, a RESTful management API, live Wireshark trace, and the operational tooling that production support actually uses.

Vendor support, service-level agreements, certificate-lifecycle ownership, and roadmap accountability. None of which exists when the team running the platform is also the team being paged at 3 a.m.

The pattern we see most often is operators who built a DIY-SBC layer years ago and eventually replaced it because the maintenance burden exceeded the cost savings. The decision usually crystallizes when STIR/SHAKEN, a new carrier integration, or a security audit creates a workload the existing stack cannot absorb without a multi-quarter engineering project.

Where ProSBC Fits

ProSBC is a B2BUA Session Border Controller from TelcoBridges. It does not compete with Kamailio or OpenSIPS for the routing-engine role, and it does not compete with FreeSWITCH for IVR or media-server duties. It sits at the network edge in front of whichever of those platforms your architecture uses, handling the security, normalization, and compliance functions that the open-source stack leaves to you.

In production, that placement looks like one of three patterns. In front of FreeSWITCH for carrier interconnect, where ProSBC terminates external SIP, runs STIR/SHAKEN signing and verification, normalizes the SIP headers each carrier insists on, and hands clean SIP to the media platform. Beside Kamailio when the team wants Kamailio for internal routing but does not want to build the SBC layer in script. Replacing the “Kamailio doing too many jobs” pattern when a single instance has accumulated security, fraud, and compliance responsibilities it was never designed to own.

ProSBC’s verified capabilities cover the gaps the DIY stack leaves open. Architecturally it is a B2BUA, with full SIP termination and re-origination on both legs and topology hiding consistent across signaling and media. Scale figures from the current brochure list up to 60,000 simultaneous sessions per server, up to 350,000 endpoint registrations, and up to 1,024 Network Access Points (trunk groups) per server. Security functions cover SIP over TLS, SRTP, DoS and DDoS protection, dynamic blacklisting with percentage-based greylisting, and SIP registration scanning protection. STIR/SHAKEN is implemented through SIP-based integration with TransNexus ClearIP and Neustar, with primary and secondary failover and the reason-cause routing logic that production deployments need. The programmable Ruby routing engine exposes more than 100 call parameters and supports HTTP-based external lookups for fraud scoring, number portability, CNAM, and any other system that speaks REST.

ProSBC runs on VMware, KVM and Proxmox, AWS and Microsoft Azure, and bare metal, which means it deploys alongside an existing Kamailio or FreeSWITCH stack without new infrastructure. Subscription pricing starts from $1.25 per session per server per year per the current brochure, and a 30-day free trial with online activation lets a team test ProSBC in front of their existing platform in their own environment. The ProSBC Lab license (permanently free, three sessions, no time limit) extends that access for ongoing lab and integration work.

One note for teams considering ProSBC as a like-for-like swap with Kamailio’s registrar function: ProSBC is not a standalone SIP registrar. It scales registration forwarding and handles registration-related security, but for large registration databases or PBX-side user management, customers pair it with Asterisk, FreePBX, or whatever PBX their architecture already uses. This is a deliberate boundary between the SBC layer and the PBX layer, not a gap to work around.

Frequently Asked Questions

Is Kamailio better than OpenSIPS?

Neither is universally better. They solve the same general problem with different philosophies. Kamailio’s KEMI interface makes it the natural fit for teams that want to write routing logic in Lua, Python, or JavaScript. OpenSIPS has a more developed native B2BUA module and a procedural routing-script language that some teams find more readable. The choice usually comes down to operational alignment, not feature parity.

Can Kamailio or OpenSIPS replace FreeSWITCH?

Not for media-anchored functions. Kamailio and OpenSIPS are signaling-focused SIP proxies; they do not natively transcode, run IVR against live media, mix conferences, or record. For pure routing and registration workloads they do not need FreeSWITCH; for anything that requires media intelligence they pair with it.

Do I need an SBC if I already have Kamailio plus RTPengine?

For many production deployments, yes. Kamailio plus RTPengine handles signaling routing and media relay, but it does not natively cover STIR/SHAKEN with primary and secondary STI-AS failover, programmable real-time fraud scoring against external services, carrier-grade DoS and DDoS mitigation with dynamic blacklisting, or the operational tooling and vendor accountability that a purpose-built SBC provides. Whether that gap matters depends on what regulations you are subject to, what carriers you peer with, and how much of the SBC layer your team wants to engineer and maintain.

Can FreeSWITCH handle SIP trunking on its own?

Technically yes, but it is rarely the right architecture for production volume. FreeSWITCH as the only SIP layer means every call, even calls that need no media services, goes through a full B2BUA. The proxy-plus-media pattern exists because separating those concerns scales better and isolates failure modes.

What is the typical production architecture using all three?

Kamailio or OpenSIPS in active-standby pairs at the SIP entry point handling registrations, load balancing, and high-CPS routing; FreeSWITCH instances behind them for any call that needs media services; an SBC at the network edge for carrier interconnect, security, STIR/SHAKEN, and SIP normalization. Each component is doing what it was designed to do, and each can be scaled independently.

Conclusion

Kamailio, OpenSIPS, and FreeSWITCH solve different problems in the open-source voice stack. Kamailio and OpenSIPS are SIP routing engines for high-CPS signaling, registration, and load balancing. FreeSWITCH is a B2BUA media platform for IVR, conferencing, transcoding, and recording. The right architecture for most production platforms is not one of the three, it is a combination: a proxy in front for signaling, media servers behind for media, and an SBC at the edge for everything that touches the outside world.

If you are sizing a new platform, start with the role each component plays in your architecture rather than the platform comparison. Once you know which jobs you are giving to a proxy and which to a media server, the choice of Kamailio versus OpenSIPS becomes a question of team fit, and the choice of where to draw the line between your open-source layer and the SBC layer becomes a build-versus-buy decision that is much easier to make from an architectural starting point than from a feature-list one.

Test ProSBC With Your Kamailio, OpenSIPS, or FreeSWITCH Stack

ProSBC is a carrier-grade, software-based Session Border Controller designed to sit in front of the open-source voice stack you already run. It operates as a full B2BUA with independent TLS/SRTP configuration per trunk group, with SIP header manipulation, topology hiding, and DoS/DDoS protection included in every deployment.

The platform supports up to 60,000 simultaneous sessions and 1,024 trunk groups (NAPs) per server, with programmable Ruby-based routing for HTTP integration with fraud scoring, STIR/SHAKEN signing services, and number-portability lookups. ProSBC runs natively on AWS and Microsoft Azure, on VMware, KVM, and Proxmox, and on bare metal, so it deploys alongside an existing Kamailio or FreeSWITCH stack without new infrastructure.

Subscription pricing starts from $1.25 per session per server per year per the current brochure. The ProSBC Lab license is permanently free with three sessions and no time limit, useful for testing the platform against your existing Kamailio or OpenSIPS configuration before committing.

Prefer to evaluate on your own first? Start your 30-day free trial.