A high-performance, software-defined PBX built in Rust — the AI-native communication platform for next-gen contact centers.
RustPBX externalizes all call control via HTTP/WebSocket/Webhook. Route decisions, media control, and event streams are fully programmable in any language.
Voice Agent functionality has moved to Active Call. This repo focuses on SIP Proxy & PBX.
Run RustPBX with minimal config in 2 commands:
Minimal config.toml:
http_addr = "0.0.0.0:8080"
database_url = "sqlite://rustpbx.sqlite3"
[proxy]
addr = "0.0.0.0"
udp_port = 5060
modules = ["auth", "registrar", "call"]
[[proxy.user_backends]]
type = "memory"
users = [{ username = "1001", password = "password" }]
[console]
base_path = "/console"
allow_registration = falsedocker run -d --name rustpbx --net host \
-v $(pwd)/config.toml:/app/config.toml \
ghcr.io/restsend/rustpbx:latest --conf /app/config.toml
# Create admin
docker exec rustpbx /app/rustpbx --conf /app/config.toml \
--super-username admin --super-password changeme| Access | URL |
|---|---|
| Web Console | http://localhost:8080/console/ |
| SIP Proxy | udp://localhost:5060 |
| Register SIP phone as | 1001 / password |
Commerce image (includes Wholesale + all plugins):
docker pull docker.cnb.cool/miuda.ai/rustpbx:latest
| Software-Defined | AI-Native | High Performance |
|---|---|---|
| Every INVITE calls your HTTP webhook. Return JSON routing decisions. No recompilation needed. | AI agents are native participants — listen, speak, barge, transfer via WebSocket. | 800 concurrent calls with RTP proxy: 6ms latency, 0% loss, 280MB memory. |
SIP & Media — Full SIP stack (UDP/TCP/WS/TLS/WebRTC), RTP relay, NAT traversal, TLS/SRTP with auto ACME certs.
Routing & Control — HTTP Router (dynamic routing decisions), RWI WebSocket Interface (real-time call control), Queue/ACD (sequential or parallel agent ringing).
Recording & Analytics — SipFlow unified SIP+RTP capture, post-call transcript via local SenseVoice (offline), CDR webhooks.
Operations — Built-in Web Console, WebRTC Phone, RBAC, Prometheus metrics + OpenTelemetry.
RustPBX exposes all call logic through standard protocols — no C modules, no recompilation.
Every incoming INVITE calls your webhook. Return JSON to decide routing.
[proxy.http_router]
url = "https://your-api.com/route"
timeout_ms = 3000// POST to your webhook: { "call_id": "abc-123", "from": "sip:+861390000@trunk", "to": "sip:400800" }
// Your response: { "action": "forward", "targets": ["sip:ai-agent@internal"], "record": true }Actions: forward · reject · abort · spam
JSON-over-WebSocket for in-call control:
| Category | Commands |
|---|---|
| Call Control | originate, answer, hangup, bridge, transfer, hold |
| Media | play, stop, stream_start, inject_start (PCM) |
| Recording | record.start, pause, resume, stop |
| Queue | enqueue, dequeue, assign_agent, requeue |
| Supervisor | listen, whisper, barge, takeover |
| Conference | create, add, remove, mute, destroy |
See API Integration Guide and RWI Protocol.
| Community | Commerce | |
|---|---|---|
| License | MIT | Commercial |
| SIP Proxy + Media | ✅ | ✅ |
| HTTP Router | ✅ | ✅ |
| Queue / ACD | ✅ | ✅ |
| Recording + SipFlow | ✅ | ✅ |
| Transcript (offline SenseVoice) | ✅ | ✅ |
| Web Console | ✅ | ✅ |
| RWI | ✅ | ✅ |
| VoIP Wholesale (VOS3000 alt) | ❌ | ✅ |
| IVR Visual Editor | ❌ | ✅ |
| Voicemail Pro | ❌ | ✅ |
| Enterprise Auth (LDAP/SAML/MFA) | ❌ | ✅ |
| Endpoint Manager (auto-provisioning) | ❌ | ✅ |
Tested on 2026-04-03 · RustPBX 0.4.0 · Linux x86_64 · 16 cores / 32 GB · G.711 PCMU
| Level | Scenario | Completion | Peak | Loss | Latency | CPU | Mem |
|---|---|---|---|---|---|---|---|
| 500 | signaling only | 100% | 500 | 0% | 4.40ms | 32.4% | 137 MB |
| 500 | + RTP proxy | 100% | 500 | 0% | 3.73ms | 98.4% | 183 MB |
| 500 | + sipflow | 100% | 500 | 0% | 5.96ms | 101% | 198 MB |
| 800 | signaling only | 100% | 800 | 0% | 8.32ms | 47.9% | 192 MB |
| 800 | + RTP proxy | 100% | 800 | 0% | 6.38ms | 155% | 265 MB |
| 800 | + sipflow | 100% | 800 | 0% | 6.08ms | 156% | 280 MB |
Per-channel overhead: ~0.06% CPU / 0.24 MB (signaling); ~0.19% CPU / 0.33 MB (with RTP proxy).
See Benchmark Details for methodology and full results.
| Scenario | Description |
|---|---|
| AI Contact Center | AI agents handle calls 24/7, escalate to humans |
| Cloud Call Center | Multi-tenant SaaS, remote agents, WebRTC + SIP |
| Enterprise UC | Internal comms, conferencing, CRM integration |
| VoIP Wholesale | Multi-carrier routing, flexible billing (Commerce) |
| Compliance Recording | PCI/healthcare recording, AI quality inspection |
App Service (AI Agents, HTTP DialPlan, CRM) → RustPBX Core (B2BUA, IVR, Media, Queue, CDR) → Access (PSTN, WebRTC, SIP, Mobile)
# Linux: apt-get install cmake pkg-config libasound2-dev libssl-dev libopus-dev
# macOS: brew install cmake openssl pkg-config
git clone https://github.com/restsend/rustpbx
cd rustpbx
cargo build --release
cargo run --bin rustpbx -- --conf config.toml.exampleCross-compile via cross:
cargo install cross && cross build --release --target aarch64-unknown-linux-gnu
| Extensions | Call Records | Route Editor |
|---|---|---|
![]() |
![]() |
![]() |
| Transcript | SIP Flow | WebRTC Phone |
|---|---|---|
![]() |
![]() |
![]() |
| Guide | Description |
|---|---|
| Configuration Guide | All config options |
| API Integration Guide | HTTP Router, Webhooks, Call Control |
| RWI Protocol | WebSocket Interface |
SIP 401 behind NAT/Docker — set the realm explicitly:
[proxy]
realms = ["your-public-ip:5060"]Community: MIT · Commercial: hi@miuda.ai
https://miuda.ai — Maintenance & commercial support





