A high-performance SIP B2BUA / PBX / MS-Teams-compatible SBC built from the ground up in Rust. That tone you can hear? It's the sound of memory-safety.
- High Performance: Built on tokio async runtime for efficient I/O
- Memory Safe: Written in Rust - no buffer overflows, no use-after-free
- B2BUA: Full Back-to-Back User Agent implementation
- ACLs: IP-based access control with IPv4/IPv6 CIDR support
- Authentication: SIP Digest Authentication (RFC 2617) for endpoints
- Voicemail: Full voicemail system with MWI (Message Waiting Indicator)
- Microsoft Teams: Direct Routing support with mTLS authentication
- SRTP: Secure RTP pass-through without media decryption
- Modular: Separate crates for core engine, edge SBC, cloud API, and CLI
- Web UI: Modern React-based admin console with real-time dashboards
- Configuration: JSON-based config with PostgreSQL database overlay
- TLS/mTLS: Secure SIP (SIPS) using rustls
See FEATURES.md for a comprehensive feature comparison with FreeSWITCH.
RusTalk consists of four modular crates plus a modern Web UI:
- rustalk-core: Core SIP engine and B2BUA implementation
- rustalk-edge: Session Border Controller with Teams gateway
- rustalk-cloud: REST API service for management and monitoring
- rustalk-cli: Command-line administration tool
- rustalk-webui: React-based admin console with real-time monitoring
See ARCHITECTURE.md for detailed architecture documentation.
- Rust 1.75 or later
- PostgreSQL (optional, for database overlay)
Download the latest release for your platform from the Releases page:
# Linux / macOS
tar xzf rustalk-*.tar.gz
cd rustalk-*
./rustalk --help
# Windows
# Extract the .zip file and run rustalk.exe# Clone the repository
git clone https://github.com/halcycon/RusTalk.git
cd RusTalk
# Build the project
cargo build --release
# Install the CLI tool
cargo install --path rustalk-clirustalk generate-config --output config.jsonEdit config.json to customize your settings:
{
"server": {
"bind_address": "0.0.0.0",
"bind_port": 5060,
"workers": 4
},
"sip": {
"domain": "rustalk.local",
"user_agent": "RusTalk/0.1.0",
"max_forwards": 70,
"session_expires": 1800
},
"transport": {
"protocols": ["udp", "tcp", "tls"],
"udp_port": 5060,
"tcp_port": 5060,
"tls_port": 5061,
"tls_cert": "/etc/rustalk/cert.pem",
"tls_key": "/etc/rustalk/key.pem"
},
"teams": {
"enabled": true,
"sbc_fqdn": "sbc.example.com",
"mtls_cert": "/etc/rustalk/teams-cert.pem",
"mtls_key": "/etc/rustalk/teams-key.pem",
"trunk_fqdn": "sip.pstnhub.microsoft.com"
}
}rustalk check-config --config config.jsonrustalk start --config config.jsonEnter an interactive console mode similar to FreeSWITCH's fs_cli:
rustalk console --config config.jsonThe console provides a powerful interactive shell with:
- Command history - Navigate previous commands with arrow keys
- Line editing - Edit commands with standard editing keys
- Tab completion - Auto-complete commands (via rustyline)
- Help system - Type
helpor?for available commands
Show Commands:
show acls - Display access control lists
show profiles - Display SIP profiles
show status - Display server status
show calls - Display active calls
Profile Management:
profile <name> start - Start a SIP profile
profile <name> stop - Stop a SIP profile
profile <name> restart - Restart a SIP profile
profile <name> rescan - Rescan a SIP profile
Module Management:
load <module> - Load a module
unload <module> - Unload a module
reload <module> - Reload a module
General:
help, ? - Display help
exit, quit, q - Exit the console
rustalk start --config config.jsonrustalk check-config --config config.jsonrustalk generate-config --output my-config.jsonrustalk status --server http://localhost:8080rustalk list-calls --server http://localhost:8080RusTalk includes a modern React-based administration console.
- Dashboard: Real-time system overview with call statistics and metrics
- Call Management: Monitor active calls with status indicators
- Configuration: Manage all system settings through an intuitive interface
- Statistics: Visual charts and graphs for performance analysis
-
Build the Web UI:
cd rustalk-webui npm install npm run build -
Start the Cloud API server (it will automatically serve the Web UI):
rustalk start --config config.json
-
Open your browser and navigate to:
http://localhost:8080
For frontend development with hot reload:
cd rustalk-webui
npm run devThe UI will be available at http://localhost:3000 with API requests proxied to the backend.
See rustalk-webui/README.md for more details.
- INVITE: Establish new calls
- ACK: Acknowledge call setup
- BYE: Terminate calls
- CANCEL: Cancel pending requests
- OPTIONS: Capability queries and health checks
- REGISTER: Contact registration (with Digest Authentication)
RusTalk Edge provides specialized support for Microsoft Teams Direct Routing:
- mTLS authentication with Teams
- SIP trunk configuration for Teams
- OPTIONS ping for health monitoring
- SRTP pass-through
- Support for all Teams SIP proxies:
- sip.pstnhub.microsoft.com
- sip2.pstnhub.microsoft.com
- sip3.pstnhub.microsoft.com
- Obtain a certificate for your SBC FQDN
- Configure the certificate in Teams admin center
- Update
config.jsonwith certificate paths:
{
"teams": {
"enabled": true,
"sbc_fqdn": "sbc.yourcompany.com",
"mtls_cert": "/etc/rustalk/teams-cert.pem",
"mtls_key": "/etc/rustalk/teams-key.pem",
"trunk_fqdn": "sip.pstnhub.microsoft.com"
}
}cargo buildcargo test --workspacecargo test -p rustalk-core
cargo test -p rustalk-edgecargo doc --workspace --no-deps --openRusTalk/
├── rustalk-core/ # Core SIP engine
│ ├── src/
│ │ ├── sip/ # SIP protocol implementation
│ │ ├── b2bua/ # B2BUA engine
│ │ ├── transport/ # UDP/TCP/TLS transport
│ │ ├── config/ # Configuration management
│ │ └── media/ # Media/SDP handling
│ └── Cargo.toml
├── rustalk-edge/ # SBC Teams gateway
│ ├── src/
│ │ ├── teams/ # Teams integration
│ │ ├── gateway/ # Gateway logic
│ │ └── health/ # Health monitoring
│ └── Cargo.toml
├── rustalk-cloud/ # REST API service
│ ├── src/
│ │ ├── api/ # API server
│ │ ├── handlers/ # Request handlers
│ │ └── models/ # Data models
│ └── Cargo.toml
├── rustalk-cli/ # CLI admin tool
│ ├── src/
│ │ └── main.rs
│ └── Cargo.toml
├── rustalk-webui/ # Web admin console
│ ├── src/
│ │ ├── api/ # API client
│ │ ├── components/ # React components
│ │ ├── pages/ # Page components
│ │ └── types/ # TypeScript types
│ ├── dist/ # Build output
│ └── package.json
├── config.json # Sample configuration
├── ARCHITECTURE.md # Architecture documentation
├── Cargo.toml # Workspace configuration
└── README.md
- Concurrent Calls: 10,000+ simultaneous calls per instance
- Latency: Sub-millisecond SIP processing
- Memory: ~10MB base + ~1KB per active call
- CPU: Minimal (async I/O, no busy polling)
- Memory Safety: Rust prevents buffer overflows and use-after-free bugs
- TLS: Modern cipher suites only (rustls)
- mTLS: Certificate-based authentication for Teams
- Input Validation: Strict SIP message parsing
- No Unsafe Code: (except in well-audited dependencies)
RusTalk supports PostgreSQL for configuration overlay and persistence:
{
"database": {
"url": "postgresql://rustalk:password@localhost/rustalk",
"max_connections": 10,
"min_connections": 2
}
}Configuration values in the database override those in config.json, allowing centralized management.
RusTalk uses automated GitHub Actions workflows for building and releasing binaries for multiple platforms. Pre-built binaries are available on the Releases page.
- Linux x86_64 (
.tar.gz) - macOS x86_64 (
.tar.gz) - macOS ARM64 / Apple Silicon (
.tar.gz) - Windows x86_64 (
.zip)
See RELEASE.md for detailed instructions on creating and publishing releases.
Contributions are welcome! Please feel free to submit issues and pull requests.
MIT License - See LICENSE file for details.
Built with:
Backend:
- tokio - Async runtime
- rustls - TLS implementation
- axum - Web framework
- sqlx - Async SQL
- nom - Parser combinators
- clap - CLI framework
Frontend:
- React - UI library
- Material-UI - Component library
- Recharts - Charts library
- Vite - Build tool
- TypeScript - Type-safe JavaScript
This is an initial implementation providing core SIP/SBC functionality. Future enhancements include:
- WebRTC gateway
- SIP over WebSocket
- Advanced routing rules
- Web UI with real-time dashboards
- WebSocket support for live updates
- Prometheus metrics
- OpenTelemetry tracing