Skip to content

The protocol and media layers, as Rust crates.

Three crates carry the SIP and RTP work in every Aria client. They are published under MIT or Apache-2.0, so you can use them in your own project or read them to see how Aria handles a call.

Available

What they are

One crate for media, one for SIP, one that joins them for the phones.

rtp-engine moves audio: RTP and RTCP, the codecs, SRTP, the jitter buffer and the sound devices.aria-sip-core handles the parts of SIP that every client repeats: parsing messages, computing digest responses and generating RFC 3261 identifiers. aria-mobile-core wraps both for iOS and Android and exposes them to Swift and Kotlin through UniFFI.

None of them is a full SIP stack. The desktop app, the mobile apps and the push gateway each build their own call control on top.

rtp-engine

An RTP media engine in Rust, similar in scope to PJMEDIA.

Codecs
G.711 µ-law and A-law, Opus, G.729 Annex A. Opus needs libopus; G.711 and G.729A are implemented in the crate. Sample rates are converted between codec and device automatically.
RTP and RTCP
Packet construction, parsing and statistics per RFC 3550. Symmetric RTP with learned endpoints for NAT, 16-bit sequence rollover for long calls, DTMF as RFC 2833 telephone events.
SRTP
AES-CM-128 with HMAC-SHA1-80 per RFC 3711, for RTP and RTCP, with the SDP a=crypto attribute handled.
Jitter buffer
Adaptive or fixed, with packet reordering and loss concealment.
Audio devices
Capture and playback through cpal. Tested on macOS (CoreAudio), Linux (ALSA and PulseAudio) and Windows (WASAPI). Optional: switch the device feature off for servers or for mobile, where the platform owns the audio.
Echo cancellation
WebRTC's audio processing module, behind the audio-proc feature. Off by default because it compiles C++ and needs meson and ninja. Not for mobile, which already has the platform's own canceller.
Features
Default: g711, opus, srtp, device. Opt in: audio-proc. Rust 1.85 or later.

Add it to Cargo.toml:

[dependencies]
rtp-engine = "0.1"

Or a smaller build, for a server that never touches a sound card:

[dependencies]
rtp-engine = { version = "0.1", default-features = false, features = ["g711", "srtp"] }

SourceAPI documentationcrates.io

aria-sip-core

The pieces of SIP every client repeats.

Digest authentication
Compute and verify digest responses per RFC 2617 and RFC 7616, including qop, nonce count and cnonce.
Message parsing
Status codes, methods, headers, URIs, display names, From and To tags, Via branches extracted from raw SIP text.
Identifiers
Via branch, tags and Call-ID generated as RFC 3261 requires: branches carry the z9hG4bK magic cookie.
Scope
Protocol utilities only. No transport, no transactions, no dialogs. Those live in the applications that use it.

It is not on crates.io yet; depend on the repository:

[dependencies]
aria-sip-core = { git = "https://github.com/5060-Solutions/aria-sip-core" }

Source

aria-mobile-core

The shared engine behind the iOS and Android apps.

Bindings
Swift and Kotlin APIs generated by UniFFI from one interface definition. The iOS app gets an XCFramework; the Android app gets .so libraries for arm64, armv7 and x86_64.
Gateway client
An HTTP client for the push gateway: device registration, accepting, rejecting and hanging up calls, and starting outgoing calls.
SDP
Offer and answer generation and parsing with codec negotiation across PCMU, PCMA, Opus and G.729.
Media
RTP sessions over UDP, STUN discovery and RFC 2833 DTMF, using rtp-engine without its device feature. Audio capture and playback stay with the platform.
Runtime
An embedded Tokio runtime, bridged to the platform's threads. Events reach the app through a callback interface.
Transcription
An opt-in ai feature adds on-device transcription, and ai-summaries adds summaries. Both are off by default and pull in whisper.cpp and llama.cpp.

The apps do not add it as a Cargo dependency; they run build-ios.sh or build-rust.sh from their own repositories, which cross-compile it and generate the bindings. From another Rust project:

[dependencies]
aria-mobile-core = { git = "https://github.com/5060-Solutions/aria-mobile-core" }

Source

Licence

MIT or Apache-2.0, at your option.

All three crates are dual-licensed, which covers commercial use. Contributions are accepted under the same terms.

The applications are licensed differently: their source is public and they are free for personal and non-commercial use, but business use needs a licence. The terms.

Where they're used

rtp-engine is in every app; aria-sip-core is published but not wired in yet.

CrateDesktopiOSAndroidPush gateway
rtp-engineYesThrough aria-mobile-coreThrough aria-mobile-coreNo
aria-sip-coreNot yetNot yetNot yetNot yet
aria-mobile-coreNoYesYesNo

The desktop app, the mobile core and the gateway currently parse SIP with sip-5060; aria-sip-core is the standalone crate and has not replaced it in them yet.

The desktop app enables rtp-engine's audio-proc feature for echo cancellation; the mobile core leaves it off and uses the platform's own. The push gateway uses aria-sip-core for digest authentication and parsing so that it speaks the same SIP as the clients.

Desktop

macOS, Windows and Linux. Released.

Source

iOS

In testing, no release yet.

About the iOS app

Android

In testing, no release yet.

About the Android app

Push gateway

In testing, no release yet.

About the gateway