MCPcopy Index your code
hub / github.com/eisenzopf/rvoip

github.com/eisenzopf/rvoip @v0.2.4

Chat with this repo
repository ↗ · DeepWiki ↗ · release v0.2.4 ↗ · + Follow
21,770 symbols 90,814 edges 1,855 files 8,256 documented · 38%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

rvoip — the Rust real-time substrate

rvoip

A unified Rust substrate for real-time voice — SIP today, WebRTC + QUIC + AI agents next.

Rust 1.88+ License: MIT Crates.io Documentation Repository

📚 Docs · 🚀 Quick start · 🎯 Build with rvoip · 📊 Feature support · 🏗️ Architecture · 🗺️ Roadmap · 💡 Why rvoip


[!NOTE] Release status. Maturity is encoded in the version number (no -alpha/-beta suffixes): 0.1.x = alpha, 0.2.x = beta, 1.0 = stable. The SIP product (rvoip-sip + its spine) is a beta candidate at 0.2.2 for bounded SIP client, server, PBX, gateway, and B2BUA scenarios. The rest of the workspace — WebRTC, QUIC, WebTransport, WebSocket, UCTP, vCon, identity, AI harness — is alpha, published at 0.1.0 (API-unstable; expect breaking changes before 1.0). The rvoip 3 vision describes the destination.

⚡ rvoip in one breath

After the SIP era (VoIP 1.0) and the web-meets-voice era of WebRTC + VoiceXML (VoIP 2.0), rvoip is the third generation: SIP, WebRTC, QUIC, and AI-agent participants share a single transport-agnostic conversation model. One Rust library hosts all of them. Cross-substrate bridging — SIP ↔ WebRTC ↔ QUIC — is a first-class primitive, not glue code.

The full design lives under docs/:

Doc What it covers
voip-3-conversation-model.md The vocabulary — Conversation, Session, Connection, Stream, Message, Participant
PRD.md Product scope, audiences, positioning
INTERFACE_DESIGN.md Crate architecture and dependency rules
GAP_PLAN.md Implementation status (v1 shipped May 2026)
CONVERSATION_PROTOCOL.md UCTP wire specification

🎯 Build with rvoip today

What you can ship right now on the beta:

👤 Who you are 🏗️ What you build 🔧 Start with
📞 Softphone / endpoint dev A SIP account that places, receives, and controls calls Endpoint
🧪 Test / script writer Linear test that drives a call from start to finish StreamPeer
🤖 IVR / contact-center dev A reactive server that routes, queues, transfers CallbackPeer
🔀 B2BUA / gateway dev A back-to-back UA bridging two SIP legs (carrier, SBC, gateway) UnifiedCoordinator
🌐 Cross-transport app dev A single gateway accepting browser WebRTC customers and SIP/WebRTC/UCTP employees rvoip::app with the app feature (alpha)
📋 Registrar / PBX dev A SIP REGISTER service with location bindings rvoip-sip-registrar
🎙️ Voice-AI agent dev A SIP-reachable AI agent (alpha — wire your ASR/TTS via the harness) CallbackPeer + rvoip-harness (alpha)

Pick the lowest-ceremony API that gives you what you need. All four sit on the same UnifiedCoordinator underneath; you can drop down a layer without switching stacks.

🚀 Quick start

[dependencies]
rvoip-sip = "0.2.2"
tokio = { version = "1", features = ["full"] }

A complete two-endpoint local call. Bob waits, Alice dials, they hold the line for a second, then hang up.

use std::time::Duration;
use rvoip_sip::{Config, Endpoint, EndpointProfile};

#[tokio::main]
async fn main() -> rvoip_sip::Result<()> {
    // bob waits for an incoming call
    let bob = tokio::spawn(async {
        let mut bob = Endpoint::builder()
            .name("bob")
            .profile(EndpointProfile::Custom(Config::local("bob", 5071)))
            .build()
            .await?;
        let incoming = bob.wait_for_incoming().await?;
        let call = incoming.answer().await?;
        call.wait_for_end(None).await?;
        bob.shutdown().await
    });

    tokio::time::sleep(Duration::from_millis(300)).await;

    // alice dials bob
    let alice = Endpoint::builder()
        .name("alice")
        .profile(EndpointProfile::Custom(Config::local("alice", 5070)))
        .build()
        .await?;

    let call = alice
        .call_and_wait("sip:bob@127.0.0.1:5071", Some(Duration::from_secs(10)))
        .await?;
    tokio::time::sleep(Duration::from_secs(1)).await;
    call.hangup_and_wait(Some(Duration::from_secs(5))).await?;
    alice.shutdown().await?;
    bob.await.unwrap()
}

Try it:

cargo run -p rvoip-sip --example endpoint_local_call

New here? Start with the scenario examples in examples/ — a guided, well-documented path from a first P2P call through audio, registration, call control, transfers, SRTP/TLS, an IVR server, and a B2BUA call center, each a standalone project with a ./run_demo.sh.

For per-API-surface reference examples (one lane each for endpoint, stream_peer, callback_peer, unified, plus protocol regression fixtures and PBX interop), see crates/sip/rvoip-sip/examples/.

📊 Feature support

Beta (0.2.2) = RFC-correct, tested · 🚧 Alpha (0.1.0) = published, API-unstable · 🔮 Roadmap = planned, not yet implemented

📞 SIP methods (RFC 3261 + extensions)

Method Status RFC Notes
INVITE / ACK / BYE ✅ Beta 3261 Full state machines, media coordination
CANCEL ✅ Beta 3261 Transaction correlation, glare handled
REGISTER ✅ Beta 3261 Contact management, expiration
OPTIONS ✅ Beta 3261 Capability negotiation
UPDATE ✅ Beta 3311 Mid-session SDP renegotiation
PRACK ✅ Beta 3262 Reliable provisionals
REFER ✅ Beta 3515 Blind transfer
SUBSCRIBE / NOTIFY ✅ Beta 6665 Event packages, subscription state
MESSAGE ✅ Beta 3428 In-dialog and pager-mode
INFO ✅ Beta 6086 DTMF relay, application data
PUBLISH 🔮 Roadmap 3903 Parser support only; app flow post-beta

🎵 Media plane

Feature Status Notes
G.711 PCMU / PCMA ✅ Beta RFC 3551, table-driven
RTP / RTCP ✅ Beta RFC 3550
SRTP (SDES) ✅ Beta RFC 3711 + 4568, tested PBX profiles
DTMF (RFC 2833 / 4733) ✅ Beta In-band telephone-event payloads
Hold / resume ✅ Beta Standard a=sendonly / a=inactive
Blind transfer ✅ Beta REFER-based, B2BUA-bridged
Conference mixing 🚧 Alpha N-way mixing primitives in rvoip-media-core
G.729A / G.729AB ✅ Beta optional Annex A speech path with optional Annex B VAD/DTX/CNG
Opus / G.722 🔮 Post-beta Codec hooks exist; full-media path is post-beta
DTLS-SRTP 🔮 Post-beta Design in place, feature-flagged
Echo cancel / AGC / VAD / NS 🔮 Post-beta Planned; not yet implemented

🌐 Transport

Transport Status Notes
UDP ✅ Beta Primary transport
TCP ✅ Beta Connection management, reliability
TLS ✅ Beta rustls; tested at PBX edge
WebSocket (RFC 7118) 🚧 Partial Plain WS round-trip works; WSS / browser interop post-beta
QUIC (UCTP) 🚧 Alpha rvoip-quic workspace crate
WebTransport 🚧 Alpha rvoip-webtransport workspace crate
WebRTC 🚧 Alpha rvoip-webrtc pinned to upstream alpha

🔐 Security & identity

Feature Status Notes
SIP Digest auth (MD5 / SHA-256 / SHA-512-256) ✅ Beta RFC 3261 + RFC 8760, qop=auth
TLS 1.2 / 1.3 transport ✅ Beta Cert validation, custom roots, SNI
OAuth 2 / Bearer ✅ Beta rvoip-auth-core
STIR/SHAKEN signing 🚧 Alpha rvoip-stir-shaken workspace crate
OIDC / Passkey / DPoP 🚧 Alpha Core primitives and extension crates; rvoip-identity currently ships BearerProvider only
ICE / TURN / STUN 🔮 Post-beta STUN client landed; ICE/TURN are non-claims
ZRTP / MIKEY 🔮 Post-beta Not a beta claim

🚀 Performance claim

Workload Status Number
General full-media SIP ✅ Beta target Up to 2,000 CPS sustained
Higher CPS profiles 🚧 Tuned Available but caveated; see BETA_PERFORMANCE_REPORT.md
10,000 CPS general-user 🔮 Roadmap Tracked in RELEASE_NOTES_NEXT.md

The crates/sip/rvoip-sip/docs/RFC_COMPLIANCE_MATRIX.md and crates/sip/rvoip-sip/docs/SECURITY_POSTURE.md documents are the authoritative source — this table is a summary.

🏗️ Architecture

┌──────────────────────────────────────────────────────────────┐
│  📱 Application                                              │
│  (softphone, PBX, contact center, voice AI agent, ...)       │
└──────────────────────────────────────────────────────────────┘
                              ▲
                              │ rvoip-sip API surface
                              ▼
┌──────────────────────────────────────────────────────────────┐
│  📞 rvoip-sip       (✅ beta)  SIP-shaped session layer       │
│  ┌─────────────┬───────────────┬─────────────┬─────────────┐ │
│  │ sip-core    │ sip-transport │ sip-dialog  │ sip-proxy   │ │
│  │             │               │             │ sip-registrar│ │
│  └─────────────┴───────────────┴─────────────┴─────────────┘ │
└──────────────────────────────────────────────────────────────┘
                              ▲
                              │ ConnectionAdapter trait
                              ▼
┌──────────────────────────────────────────────────────────────┐
│  🧬 rvoip-core      (✅ beta)  transport-agnostic spine       │
│  rvoip-core-traits  (✅ beta)  cycle-breaker trait surface    │
│  rvoip-media-core   (✅ beta)  codec / mixing / MediaStream   │
│  rvoip-rtp-core     (✅ beta)  RTP / SRTP                     │
│  rvoip-codec-core   (✅ beta)  G.711 + optional G.729A/AB      │
│  rvoip-auth-core    (✅ beta)  OAuth2 / Bearer / SIP Digest   │
└──────────────────────────────────────────────────────────────┘
                              ▲
                              │ UCTP (🚧 alpha)
                              ▼
┌──────────────────────────────────────────────────────────────┐
│  🚧 Substrate adapters  (alpha — not in beta closure)         │
│  ┌─────────┬──────────┬───────────────┬───────────────┐      │
│  │ rvoip-  │ rvoip-   │ rvoip-        │ rvoip-        │      │
│  │  webrtc │  quic    │  webtransport │  websocket    │      │
│  └─────────┴──────────┴───────────────┴───────────────┘      │
│  rvoip-uctp · rvoip-vcon · rvoip-harness · rvoip-identity    │
└──────────────────────────────────────────────────────────────┘

The dependency direction is enforced. rvoip-core never imports an adapter crate. Adapters depend on rvoip-core and register themselves via ConnectionAdapter. This is what lets a single Orchestrator bridge a SIP call to a WebRTC client (and, later, to a QUIC peer or an AI participant) without the substrates knowing about each other.

📦 Crate matrix

✅ Beta — published to crates.io as 0.2.2

Crate Purpose
rvoip Facade — opt into transports/extensions via features (default sip)
rvoip-sip SIP umbrella — Endpoint / StreamPeer / CallbackPeer / UnifiedCoordinator
rvoip-sip-core RFC 3261 message parsing, SDP, URIs
rvoip-sip-transport UDP / TCP / TLS / WebSocket transport
rvoip-sip-dialog Dialog state machine + transaction layer
rvoip-sip-proxy Stateful SIP proxy primitives (RFC 3261 §16)
rvoip-sip-registrar REGISTER processing + location service
rvoip-core Transport-agnostic spine: Conversation / Session / ConnectionAdapter
rvoip-core-traits Cycle-breaker trait + type surface
rvoip-infra-common Event bus, executors, shared infra
rvoip-media-core Codec negotiation, mixing, MediaStream trait
rvoip-rtp-core RTP / SRTP framing and transport
rvoip-codec-core G.711 plus optional G.729A/G.729AB codec implementation
rvoip-auth-core OAuth2 + Bearer + token primitives

🚧 Alpha — published to crates.io at 0.1.0

These publish at 0.1.0 (API-unstable) so the rvoip facade can expose them behind feature flags (webrtc, uctp, voip-3, sip-stir-shaken, client). Expect breaking changes before each graduates to beta.

Crate Why it's alpha
rvoip-client Client SDK — UCTP QUIC connect/c

Extension points exported contracts — how you extend this code

Core symbols most depended-on inside this repo

Shape

Method 9,683
Function 9,183
Class 2,057
Enum 638
Interface 209

Languages

Rust100%
Python1%
TypeScript1%

Modules by API surface

crates/sip/rvoip-sip/src/api/unified.rs212 symbols
crates/sip/rvoip-sip/src/auth/mod.rs192 symbols
crates/sip/rvoip-sip/examples/pbx/common.rs188 symbols
crates/sip/sip-dialog/src/manager/core.rs169 symbols
crates/sip/rvoip-sip/src/api/endpoint.rs163 symbols
crates/sip/rvoip-sip/src/api/callback_peer.rs151 symbols
crates/sip/sip-dialog/src/diagnostics.rs144 symbols
crates/sip/rvoip-sip/src/adapters/media_adapter.rs140 symbols
crates/sip/sip-dialog/src/transaction/manager/mod.rs117 symbols
crates/sip/rvoip-sip/src/adapters/session_event_handler.rs116 symbols
crates/sip/sip-dialog/src/api/unified.rs95 symbols
crates/sip/rvoip-sip/src/adapters/dialog_adapter.rs95 symbols

Datastores touched

postgresDatabase · 1 repos

For agents

$ claude mcp add rvoip \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page