Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
R

rustpbx

> AI 编程
Open source

A PBX written by rust

735 stars0 likes2 views
WebsiteGitHub

About

A PBX written by rust

RustPBX

A high-performance, software-defined PBX built in Rust.

All call control is externalized via HTTP/WebSocket/Webhook — routing, media control, and events are programmable in any language. No C modules, no recompilation.

GitHub | Website


Quick Start

Option 1: Docker (recommended)

bash
mkdir -p rustpbx && cd rustpbx
curl -O https://raw.githubusercontent.com/restsend/rustpbx/main/config.toml.example

docker run -d --name rustpbx --net host \
  -v $(pwd)/config.toml.example:/app/config.toml \
  ghcr.io/restsend/rustpbx:latest --conf /app/config.toml

# Create the admin account (first time only)
docker exec rustpbx /app/rustpbx --conf /app/config.toml \
  --super-username admin --super-password changeme

Option 2: Build from source

bash
git clone --recurse-submodules https://github.com/restsend/rustpbx
cd rustpbx
cargo run --release -- --conf config.toml.example

Cross-compile for Windows 64-bit (from Linux/macOS):

bash
rustup target add x86_64-pc-windows-gnu
cargo build --release --target x86_64-pc-windows-gnu
# output: target/x86_64-pc-windows-gnu/release/rustpbx.exe

That's it — the example config boots a full PBX out of the box:

Access Value
Web Console http://localhost:8080/console/
SIP Proxy udp://localhost:15060
Test extensions bob / alice, password 123456

No config at all? cargo run --release also works — built-in defaults: HTTP 0.0.0.0:8080, SQLite, SIP UDP 5060.

Minimal config

Want your own config.toml? This is all you need:

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"

Features

SIP & Media Full SIP stack (UDP/TCP/WS/TLS/WebRTC), RTP relay & transcoding, NAT traversal, TLS/SRTP with auto ACME certs
Routing & Control HTTP Router (webhook routing decisions), RWI WebSocket (real-time call control), Queue/ACD
AI-Native AI agents as native call participants — listen, speak, barge, transfer via WebSocket
Recording & Analytics SipFlow unified SIP+RTP capture, offline transcription (SenseVoice), CDR webhooks
Operations Built-in Web Console & WebRTC phone, RBAC, Prometheus metrics, OpenTelemetry

Performance: 5000 concurrent calls with RTP relay on ~3.8 cores, 0% packet loss — linear scaling. See benchmark details.


Programmable Interfaces

HTTP Router

Every incoming INVITE calls your webhook. Return JSON to decide routing:

json
// POST to your webhook: { "call_id": "abc-123", "from": "sip:+861390000@trunk", "to": "sip:400800" }
// Your response:       { "action": "forward", "targets": ["sip:1001@internal"], "record": true }

Actions: forward · reject · abort · spam

RWI (Real-time WebSocket Interface)

JSON-over-WebSocket for in-call control: originate, answer, hangup, bridge, transfer, play, record.start, queue/ACD commands, supervisor listen/whisper/barge, conference commands, and more.


Documentation

Guide Description
Configuration Guide All config options
API Integration Guide HTTP Router, Webhooks, Call Control
RWI Protocol WebSocket Interface
Outbound Dial SSE API Predictive outbound dialing
Live Transcript SSE API Real-time transcription

Troubleshooting

SIP 401 behind NAT/Docker — set the realm explicitly:

toml
[proxy]
realms = ["your-public-ip:5060"]

Contributors

@shenjinti · @yeoleobun · @dengxiayehu · @zen2do · @autopeasant · @rgon · @themooer1 · @v0l · @tgeorge06 · @umran · @davidcforbes · @deweydb · @zhouhailin

License

Community: MIT · Commercial: [email protected] · https://miuda.ai

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

Rustfreeswitchpbxsipsip-proxy

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
CategoryAI 编程
PricingOpen source

> Related tools

G
GitHub Copilot
GitHub 官方 AI 编程助手,覆盖补全、Chat 与 Agent 模式。
C
Cursor
AI 原生代码编辑器,对话改代码、多文件 Agent 与规则体系是其核心。
S
skills
Skills for Real Engineers. Straight from my .agents directory.