RustPBX Overview
RustPBX is a cloud-native PBX written in Rust for voice AI, contact center, and enterprise telephony workloads. It emphasizes stability, low latency, and observability.
This overview highlights the capabilities you should understand before rolling out the system.
The Voice Agent functionality has been moved to a separate project: [Active Call](/static/docs/active-call/intro).
RustPBX now focuses on the SIP Proxy and PBX features.
Platform Positioning
- Unified voice plane: SIP signaling, media proxying, call records, billing, and access control live in one runtime.
- Config-driven architecture: behavior is authored through TOML files and database entities, which works well with DevOps/GitOps pipelines.
Core Module Map
| Directory / Module | Responsibilities |
|---|---|
src/call/ | Call control, IVR logic, policies, and per-call state machines |
src/proxy/ | SIP proxying, ACL enforcement, active call registry, routing engine, trunk management |
src/rwi/ | Real-time WebSocket Interface — WebSocket pub/sub gateway for call control, queue events, and voice agent commands |
src/media/ | RTP/SRTP media proxy, SDP negotiation, audio mixing/transcoding, WebRTC media bridging |
src/models/ | Database entities for extensions, trunks, routing, billing, queues, presence, RBAC |
src/console/ | Web console APIs, middleware, session authentication, i18n |
src/handler/ | AMI (health, dialogs, transactions, reload) and HTTP middleware |
src/auth/ | Authentication backends: JWT, HTTP token, phone number |
src/callrecord/ | CDR writing, recording/SipFlow upload, storage backends |
src/sipflow/ | SIP/RTP flow capture with FlowDB LSM-tree engine and remote cluster mode |
src/storage/ | Object storage abstraction (S3, Azure Blob, GCP) |
src/tts/ | Text-to-speech integration (CLI and HTTP drivers) |
src/bin/ | Binary entry points: rustpbx (main PBX) and sipflow (standalone capture server) |
config/ | Runtime configuration for trunks, routes, queues, IVR, ACLs, recorders, CDR, voice models |
addons/ | Plugin architecture for community and commercial features |
Typical Workflow
- Prepare the environment: deploy via container or bare metal and complete the steps in “Basic Setup.”
- Build connectivity: add SIP trunks, routing policies, and billing templates (“Routing, Trunk & Billing”).
- Distribute traffic: configure extensions, queues, and policies so calls reach the right destination (“Extension Management”).
- Monitor & diagnose: rely on Diagnostics, logs, and health probes to validate changes (“Diagnostics” & “Operations Manual”).
- Operate continuously: edit
config.tomlfor advanced features and use “Troubleshooting” when incidents occur.
Documentation Map
- Basic Setup: deployment, installation, the first trunk, and initial configuration.
- Extension Management: agent accounts, device settings, lifecycle hooks, and security.
- Routing, Trunk & Billing: end-to-end line management, billing practices, emergency routing, and DID number pools.
- Diagnostics: reload workflow, route evaluation, health checks, SipFlow queries, and logging aids.
- Operations Manual: daily routines, rollout processes, backups, compliance, and Prometheus metrics.
- Cluster Deployment: multi-node clustering, inter-node event sync, SipFlow cluster, and load balancing.
- Technical Specs: compatibility notes, performance guidance, SDES-SRTP, and storage backends.
- Troubleshooting: categorized issues with recommended recovery steps.
Read sequentially or jump directly to the chapter that matches your current task.