rsipclient β Rust SIP Client & IVR Engine
> [!IMPORTANT]
> π€ AI-DEVELOPED PROJECT NOTICE & DISCLAIMER OF LIABILITY:
> This software is an experimental research and development project created using Artificial Intelligence (AI) tools (Antigravity, Gemini, and DeepSeek).
>
> * π MIT License: Released open-source under the MIT License.
> * β οΈ Disclaimer of Liability: THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED. THE AUTHORS, MAINTAINERS, AND CONTRIBUTORS ACCEPT NO RESPONSIBILITY OR LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, SECURITY BREACHES, SYSTEM FAILURES, OR LOSSES RESULTING FROM THE USE OR MISUSE OF THIS SOFTWARE. USE AT YOUR OWN RISK.
A multi-account SIP client with a built-in modern Web Dashboard, REST API, IVR Engine, and Plugin Subsystem, written in pure async Rust.
Place calls, play audio, detect DTMF, transfer callers, record voicemail, and configure settings using CLI commands, a JSON TCP interface, or the beautiful interactive Web Dashboard / REST API. No heavy frameworks, no JVM, just a single lightweight binary that speaks SIP + RTP.
> [!NOTE]
> π Built-in Web Dashboard & REST API: Configure your accounts, place calls, trigger DTMF, transfer calls, stream real-time logs, and even use your browser microphone/speakers as a Web Softphone (via WebSockets) directly through the modern web dashboard interface.
>
> * π₯οΈ Classic Windows GUI (Win32) β Double click rsipclient.exe directly on Windows to open a native desktop softphone window with classic dialpad, account selector, call controls, and real-time logs!
> * π Dark & Light Mode Switcher β Live UI theme switcher supporting both Dark slate and Light cool-gray visual modes.
> * π¨ Custom Brand Palette β Handcrafted color palette featuring #008fd0, #008ecf, #f0f3f4, #444444, and #373e4a.
> * πͺ΅ Syslog Integration (RFC 5424) β Support for forwarding logs to Syslog daemons over UDP, TCP, or Unix domain sockets (/dev/log).
> * π Web Dashboard Syslog Control β Live Syslog configuration card in Global Settings with dynamic PUT /api/config reloading.
> * π 100% Self-Contained Offline Support β Zero external fonts or JS/CSS network dependencies for isolated intranet environments.
> * π Raspberry Pi & Headless Linux Guide β Detailed deployment guide for running in console mode with ALSA sound card support and systemd auto-start.
> * βοΈ Plain TCP SIP Transport β Validated plain TCP transport support alongside UDP and TLS.
Ideal for:
- π» Web Control & Dashboard β full UI and REST API to manage accounts, calls, and real-time logs
- βοΈ Automated call routing β IVR menus with DTMF-driven transfers
- π€ Voice bots β script call flows via TCP commands
- π§ͺ SIP testing β generate and inspect SIP signalling from CLI
- π Softphone backend β embed SIP capabilities into your own app
Features
- Multi-account β manage multiple SIP registrations simultaneously
- SIP signalling β REGISTER, INVITE, BYE, CANCEL, ACK, REFER
- MD5 digest authentication (RFC 2617) β
qop="auth", Proxy-Authorization for 407 challenges, and a single retry on an expired (stale) nonce
- RTP streaming β G.711 ΞΌ-law, A-law, Opus codecs
- Visual IVR Builder β configure welcome audio, timeouts, and DTMF menu actions graphically
- Web Audio Manager β upload, play, and delete audio clips; record mono 8kHz WAV from browser microphone
- SIP Packet Tracer β sequence diagram of SIP signaling flow with message inspectors
- Call History Logs β detailed records of active/past calls with captured DTMF tones
- Live System Charts β real-time SVG sparklines for CPU and memory usage
- SIP transports β UDP, TCP (validated), and TLS (SIPS) with certificate and hostname verification on by default, plus a custom CA option
- RFC 2833 DTMF β in-band telephone-event detection
- RFC 3325 β P-Asserted-Identity, P-Preferred-Identity headers
- RFC 4028 β Session-Expires / session timers
- JSON TCP IPC β control the service from any language
- Zero-copy RTP β efficient G.711 en/decoding
- Single binary β ~2 MB release build (no Opus), ~3 MB with Opus
- Call transfer via REFER (blind transfer)
- Call hold / resume via re-INVITE
- Recording β capture caller audio to WAV file
- Identity headers β P-Asserted-Identity, P-Preferred-Identity (RFC 3325)
- Session timers β RFC 4028 support
- Custom User-Agent, display name, proxy routing
- TCP control interface β send JSON commands to manage calls
Quick Start
Install
Single-line installation from GitHub (automatically installs Rust if missing):
-
Linux & macOS (Bash/Sh):
curl -fsSL https://raw.githubusercontent.com/mahirgul/rsipclient/master/install.sh | sh
-
Windows (PowerShell):
irm https://raw.githubusercontent.com/mahirgul/rsipclient/master/install.ps1 | iex
-
Windows (CMD / Command Prompt):
curl -fsSL https://raw.githubusercontent.com/mahirgul/rsipclient/master/install.bat -o install.bat && install.bat && del install.bat
Manual installation from source:
git clone https://github.com/mahirgul/rsipclient.git
cd rsipclient
cargo build --release
# With Opus support (requires libopus-dev on Linux)
cargo build --release --features opus
Create config.toml:
[[accounts]]
name = "alice"
username = "alice"
password = "secret123"
domain = "sip.example.com"
server = "192.168.1.1:5060"
sip_port = 5060
rtp_port_start = 8000
rtp_port_end = 8010
auth_method = "md5"
codec = "pcmu"
display_name = "Alice Smith"
Run
# List all configured accounts
rsipclient -c config.toml list
# Start the service (TCP control on 127.0.0.1:5090)
rsipclient -c config.toml service
Control via TCP
The service listens on 127.0.0.1:5090. Send one JSON command per line:
{"cmd":"register","account":"alice"}
{"cmd":"call","account":"alice","target":"sip:bob@sip.example.com"}
{"cmd":"play","account":"alice","target":"audio.wav"}
{"cmd":"hangup","account":"alice"}
{"cmd":"status"}
{"cmd":"shutdown"}
Web Dashboard & REST API
The service includes a built-in modern web dashboard and a fully-featured REST API. To use it, configure the Web settings in config.toml:
[web]
port = 8080
username = "admin"
password = "supersecretpassword"
session_token = "secure-random-token-here"
Start the service:
rsipclient -c config.toml service
Then visit the Web Dashboard at http://localhost:8080 to manage registrations, make calls, monitor status, and view real-time log streaming.
Dashboard UX & Notification Enhancements
- Inline Toast Notifications: All alerts, success confirmations, and error statuses appear as non-blocking, modern in-page toast notifications (using glassmorphism styling, clean SVG iconography, and automatic layout collapsing when dismissed).
- Pause-on-Hover: Hovering over a toast freezes the auto-close timer and progress bar animation, resuming automatically when the mouse leaves.
- Direct Call Workflows: Traditional browser-blocking
confirm() dialogs for call actions (hang up, blind transfer) and configuration actions (deleting accounts) have been removed for a fast, direct one-click operation.
REST API Reference
All requests must include the Authorization: Bearer header (except /api/login).
1. Authentication
- POST
/api/login
- Body:
{"username": "admin", "password": "supersecretpassword"}
- Response:
{"success": true, "token": ""}
2. Status & Monitoring
- GET
/api/status
- Response: Returns uptime, memory usage, CPU usage, and the status of all accounts (registered, in call, codec, etc.)
- GET
/api/logs
- Response: Returns the last 100 in-memory application log lines.
3. Account Management
- GET
/api/accounts β Retrieve all accounts
- POST
/api/accounts β Add a new account dynamically (persists to config.toml)
- Body:
{"name": "bob", "username": "bob", "domain": "sip.example.com", ...}
- PUT
/api/accounts/:name β Edit an account configuration dynamically
- DELETE
/api/accounts/:name β Remove an account
4. Call Control
- POST
/api/accounts/:name/register β Register account manually
- POST
/api/accounts/:name/unregister β Unregister account manually
- POST
/api/accounts/:name/call β Dial a SIP target
- Body:
{"target": "sip:100@sip.example.com"}
- POST
/api/accounts/:name/hangup β Hang up active call
- POST
/api/accounts/:name/hold β Place the call on hold
- POST
/api/accounts/:name/resume β Resume the call
- POST
/api/accounts/:name/transfer β Blind transfer the call
- Body:
{"target": "sip:200@sip.example.com"}
- POST
/api/accounts/:name/dtmf β Send RFC 2833 DTMF digits
- Body:
{"digits": "1234#"}
5. Web Softphone WebSocket
- GET
/api/accounts/:name/audio-ws?token=
- Establishes a WebSocket connection. Bi-directional audio is streamed (16-bit linear PCM) between the browser microphone/speakers and the SIP call's RTP stream, turning the dashboard into a fully functional web phone.
IVR / Auto-Attendant
Auto-answer incoming calls and run a DTMF-driven menu:
[[accounts]]
name = "reception"
# ...
auto_answer = true
ivr_welcome = "welcome.wav"
ivr_timeout = 10
[accounts.ivr_menu]
"1" = "transfer:sip:1001@sip.example.com"
"2" = "transfer:sip:1002@sip.example.com"
"3" = "playback:info.wav"
"4" = "record:voicemail.wav:30"
"5" = "hold"
"*" = "hangup"
ivr_default = "transfer:sip:operator@sip.example.com"
| Action | Format | Description |
|---|
| Transfer | transfer:sip:target@host | Blind transfer via REFER |
| Playback | playback:path/file.wav | Play audio, return to menu |
| Record | record:output.wav:30 | Record N seconds, return to menu |
| Hold | hold | Hold, press any DTMF to resume |
| Hangup | hangup | End the call |
Configuration & Headless Guides
- Configuration Reference: See docs/configuration.md for the full list of configuration options, Syslog settings, and audio devices.
- Raspberry Pi & Linux Headless Guide: See docs/raspberry-pi-headless.md for ALSA sound card setup, systemd service auto-start, and console-mode deployment instructions.
Per-account settings
| Field | Type | Default | Description |
|---|
name | string | β | Account identifier |
username | string | β | SIP username |
password | string | β | SIP password |
domain | string | β | SIP domain |
server | host:port | β | SIP server address |
sip_port | u16 | 0 (auto) | Local SIP port |
rtp_port_start | u16 | β | RTP port range start |
rtp_port_end | u16 | β | RTP port range end |
auth_method | md5/none | md5 | Authentication method |
codec | pcmu/pcma/opus | pcmu | Audio codec |
transport | udp/tcp/tls | udp | SIP transport protocol |
tls_verify_cert | bool | true | Verify the server certificate chain |
tls_verify_hostname | bool | true | Verify the certificate hostname |
tls_ca_cert | path | β | PEM file with extra CA certificate(s) |
display_name | string | β | From header display name |
asserted_id | URI | β | P-Asserted-Identity |
preferred_id | URI | β | P-Preferred-Identity |
proxy | host:port | β | Outbound proxy |
register_expiry | u32 | 3600 | REGISTER expiry (seconds) |
user_agent | string | β | Custom User-Agent header |
dtmf_mode | rfc2833/inband/info | β | DTMF signalling mode |
early_media | bool | true | 183 Session Progress |
session_timers | bool | false | RFC 4028 Session-Expires |
auto_answer | bool | false | Auto-answer incoming INVITEs |
ivr_welcome | path | β | IVR welcome WAV file |
ivr_timeout | u64 | 10 | DTMF timeout (seconds) |
ivr_menu | map | β | DTMF β action mappings |
ivr_default | string | β | Default action on timeout |
audio_input_device | string | default | Hardware microphone device |
audio_output_device | string | default | Hardware speaker/headset device |
username, domain and server become the SIP request URI and the From/To/Contact
URIs verbatim, so they may not contain control characters, whitespace, <, > or ".
A config carrying one is rejected on load and when saved through the dashboard.
Architecture
ββββββββββββββββββββ
TCP (5090) ββββββββΆβ Service β
JSON IPC β ββββββββββββββ β
β β SipClient 1 ββββΆ UDP (SIP + RTP)
β β SipClient 2 ββββΆ UDP (SIP + RTP)
β β IVR Watcher ββββΆ RTP Receiver
β ββββββββββββββ β
ββββββββββββββββββββ
src/
βββ main.rs Entry point
βββ cli.rs CLI parsing (clap)
βββ config.rs Config file + validation
βββ service.rs Multi-account service + TCP IPC
βββ ivr.rs IVR engine (answer, menu, DTMF)
βββ ipc.rs JSON request/response types
βββ ipc_client.rs TCP client for CLI commands
βββ rtp/
β βββ mod.rs RTP sender + resampler
β βββ codec.rs G.711 / Opus codecs
β βββ wav.rs WAV file parser
β βββ receiver.rs RTP receiver + DTMF detector
βββ sip/
β βββ auth.rs MD5 digest auth
β βββ client.rs SipClient struct
β βββ messages.rs SIP request builders
β βββ operations.rs Register, invite, bye, cancel
β βββ transfer.rs REFER + hold/resume
β βββ sdp.rs SDP builder
β βββ settings.rs Per-account SIP settings
β βββ transport.rs UDP transport
β βββ utils.rs Header parsers, ID gen
βββ service/
βββ handlers.rs Command dispatcher
βββ web_server.rs Web server routing & startup
βββ web_handlers.rs Web API handlers
License & Disclaimer
- π MIT License: Open-source software licensed under the MIT License.
- π€ AI Development Notice: This project is developed with Artificial Intelligence (AI) assistance (Antigravity, Gemini, DeepSeek).
- β οΈ Disclaimer of Liability: THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED. THE AUTHORS, DEVELOPERS, AND CONTRIBUTORS ACCEPT NO RESPONSIBILITY OR LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, SECURITY BREACHES, SYSTEM FAILURES, OR DATA LOSS RESULTING FROM THE USE OR MISUSE OF THIS SOFTWARE.
Contributing
See CONTRIBUTING.md. PRs welcome!