rvoip 0.3.1

Universal real-time gateway library — SIP, WebRTC, UCTP (QUIC / WebTransport / WebSocket) plus AI voice harness and vCon container, behind one facade.
Documentation

rvoip — Universal real-time gateway library

Crates.io Documentation License

Unified workspace release: every publishable crate ships at 0.3.0. The sip surface retains its release-gated beta scope; app, webrtc, uctp, the voip-3 extensions, and client remain experimental until their individual compatibility claims graduate. Breaking changes remain possible before 1.0.

rvoip is the facade crate for the rvoip workspace. It always compiles the voip-3 substrate (rvoip-core's Orchestrator + the shared Conversation/Session/ Connection/Stream/Message/Participant model) and lets you opt into transports and extensions behind cargo features — defaulting to the SIP product. One process, one Orchestrator, many protocols, bridged through a single conversation model.

Quick start

[dependencies]
rvoip = "0.3.0"   # default feature: sip
use rvoip::{Orchestrator, Config};

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    // `Orchestrator::new` returns an `Arc<Orchestrator>`.
    let orchestrator = Orchestrator::new(Config::default());

    // Register interop adapters (e.g. a SIP adapter built from a configured
    // `rvoip::sip::UnifiedCoordinator`) with `orchestrator.register(adapter)?`.

    let mut events = orchestrator.subscribe_events();
    while let Ok(event) = events.recv().await {
        // handle each orchestrator event (inbound call, bridge, recording, …)
        drop(event);
    }
    Ok(())
}

The unifying nouns are re-exported at the crate root from rvoip-core-traits as rvoip::core_traits. For a SIP softphone with microphone/speaker audio, see the rvoip-sip examples — sip_client (a terminal softphone with CPAL device I/O) and pbx.

For a compact cross-transport gateway, enable app and declare roles, transports, assignment, and callbacks through rvoip::app:

rvoip = { version = "0.3.0", features = ["app"] }
use rvoip::app::*;

# async fn run() -> rvoip::app::AppResult<()> {
let app = RvoipApp::builder()
    .webrtc(WebRtcConfig::ws("127.0.0.1:8081")
        .allow(Role::Customer, [Capability::Text, Capability::Voice]))
    .sip(SipConfig::bind("127.0.0.1:5060")
        .domain("callcenter.local")
        .allow(Role::Employee, [Capability::Voice])
        .registrar_users([("alice", "password123")]))
    .employees(EmployeePolicy::named(["alice"]))
    .customers(CustomerPolicy::webrtc_only())
    .assignment(AssignmentPolicy::fixed("alice"))
    .on_message(|ctx, msg| async move {
        ctx.reply("Alice", format!("Alice received: {}", msg.text)).await
    })
    .build()
    .await?;
app.run().await
# }

Cargo features

Feature Default Tier Pulls in
sip beta SIP interop adapter (rvoip::sip)
g729 beta optional G.729A/G.729AB media support for SIP; requires sip
webrtc alpha WebRTC interop adapter (rvoip::webrtc)
uctp alpha UCTP substrate adapters — QUIC / WebTransport / WebSocket (rvoip::uctp)
sip-stir-shaken alpha RFC 8224 caller-ID attestation; requires sip (rvoip::stir_shaken)
voip-3 alpha The full experience: every transport + the vCon / identity / AI-harness extensions
client alpha Cross-transport client SDK (rvoip::client)
app alpha High-level gateway builder (rvoip::app) for WebRTC/SIP/UCTP app policy
full voip-3 + sip-stir-shaken + client + app

The transport-agnostic conversation-model extensions — vCon emission, identity backends, and the AI harness — are reachable only through the voip-3 feature.

# e.g. the full multi-transport rvoip-3 experience
rvoip = { version = "0.3.0", features = ["voip-3"] }

Module layout

Path Feature Source crate
rvoip::{Orchestrator, Config} always rvoip-core
rvoip::core_traits always rvoip-core-traits
rvoip::sip sip rvoip-sip
rvoip::stir_shaken sip-stir-shaken rvoip-stir-shaken
rvoip::webrtc webrtc rvoip-webrtc
rvoip::uctp (::protocol/::quic/::webtransport/::websocket) uctp rvoip-uctp + substrates
rvoip::vcon / ::identity / ::harness voip-3 rvoip-vcon · rvoip-identity · rvoip-harness
rvoip::client client rvoip-client
rvoip::app app facade-owned app/gateway layer

Crate map

Release-gated SIP surface in the unified 0.3.0 release: rvoip (facade), rvoip-core, rvoip-core-traits, rvoip-infra-common, the media engine (rvoip-media-core · rvoip-rtp-core · rvoip-codec-core), the SIP stack (rvoip-sip + sip-core · sip-transport · sip-dialog · sip-proxy · sip-registrar), and rvoip-auth-core.

Experimental opt-in surfaces in the same 0.3.0 release: rvoip-webrtc; the UCTP family (rvoip-uctp · rvoip-quic · rvoip-webtransport · rvoip-websocket); rvoip::app · rvoip-vcon · rvoip-harness · rvoip-stir-shaken; rvoip-identity · rvoip-users-core; rvoip-client.

Documentation

License

Licensed under the MIT License.