ALL INTELLIGENCE
Hacker News AIT2·Open Source

Rvoip 0.5 Ships a Complete VoIP Stack Written in Rust

Original title: Rvoip 0.5 the complete VoIP stack in Rust
62AI Score

Rvoip 0.5 unifies SIP, RTP, WebRTC, QUIC/WebTransport and voice-AI agents under a single call model, shipping everything as in-workspace Rust crates with no external SIP proxy, media server or RTP engine required. It carries release-gated interoperability evidence against Asterisk, FreeSWITCH and Jambonz, making it practical to build communications and voice-AI applications in pure Rust.

Full Report

Contents3 sections

rvoip A Rust library for building communications applications. SIP, RTP, WebRTC, QUIC/WebTransport/WebSocket conversations, Media over QUIC, and voice-AI agents share one call model, and the whole stack is in the box: no external SIP server, media server, or RTP engine to install and wire together. Five-minute start · For carriers · Which crate? · Pick a path · How it fits together · What ships · Interop evidence · Changes · Upgrading from 0.3


What rvoip is

rvoip is a library, not a server you deploy next to your application. Signalling, media, codecs, NAT traversal, security, and the conversation model are all Rust crates in this workspace, so a call goes from your code to the wire without a separately installed SIP proxy, media server, or RTP engine. The examples below run on a laptop with nothing installed but Rust; the same crates carry the release-gated interoperability evidence against Asterisk, FreeSWITCH, Jambonz, Kamailio, and OpenSIPS. Carriers evaluating standards coverage, performance, and reliability should start with For carriers.

Historical performance: published 0.5.0

One AWS c8i.4xlarge (16 vCPU, 8 cores, Intel Xeon 6, 32 GiB) running a single rvoip process, measured with the RFC 7501/7502 benchmark:

WorkloadMax CPSCPS per vCPUConcurrent calls (10 s calls)p50 setup at 90% loadp99 setup at 90% load
SIP over TLS, signaling only8,348~520n/a1 ms6 ms
SIP over UDP, signaling only8,256~515n/a1 ms6 ms
TLS + SRTP (SDES), G.711, 10 s calls1,124~70~11,2001 ms4 ms
UDP + RTP, G.711, 10 s calls1,204~75~12,000n/mn/m

At 2x capacity, rvoip keeps admitting calls at its max CPS, refuses the excess with fast 503 responses, and recovers cleanly once the load drops.

  • Max CPS (calls per second; RFC 7502's Session Establishment Rate) is the highest rate with zero failed calls over a trial of at least 180 s and 50,000 call attempts.
  • rvoip was measured as a terminating endpoint: it answers each call and echoes its media. A relaying B2BUA or SBC handles two call legs per session.
  • G.711 media is passed through; nothing is transcoded.
  • Concurrent calls is the CPS times the 10 s call length, not a measured maximum; long-call capacity, where most SBC datasheets quote their concurrency, has not been measured yet.
  • The server is a cloud VM, not an appliance.
  • p50 and p99 setup are the RFC 6076 session request delay measured at 90% of max CPS, recorded in whole milliseconds (so 1 ms means 1 ms or less); n/m = not measured.
  • The UDP + RTP max CPS was confirmed twice rather than three times.
  • The release check also passed at 5% above the TLS and UDP signaling max CPS, so those two figures may be slightly understated.
  • Not yet measured: B2BUA/relay mode (two legs per call), registrations, transcoding, WebRTC (DTLS-SRTP), and failover.

Full method and per-trial data: RFC 7501/7502 benchmark report.

Five-minute start

1. Add one dependency.

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

Upgrading an existing application from 0.3? The 0.4 migration guide has before/after code for every breaking change.

2. Make a call. Bob answers, Alice dials, Alice hangs up. Everything runs on loopback, so this works on a laptop with no PBX, no account, and no network setup.

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

#[tokio::main]
async fn main() -> rvoip_sip::Result<()> {
    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;

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

    let call = alice
        .call_and_wait("sip:[email protected]:5071", Some(Duration::from_secs(10)))
        .await?;
    call.hangup_and_wait(Some(Duration::from_secs(5))).await?;
    alice.shutdown().await?;
    bob.await.unwrap()
}

3. Or run the same program from the checkout.

BASH
git clone https://github.com/eisenzopf/rvoip.git && cd rvoip
cargo run -p rvoip-sip --example endpoint_local_call

From here, examples/ walks forward one step at a time: real microphone audio, registering to a PBX, hold/DTMF, transfers, SRTP and TLS, an IVR, a B2BUA, then browser and voice-AI gateways.

(注:更多技术实现细节与完整 API 文档请查阅原项目 README)