Aria Core Libraries
Three Rust crates form the shared foundation powering every Aria platform β desktop, iOS, Android, and the push gateway. Built from scratch for performance, safety, and full control.
Architecture Overview
Three Rust crates form the foundation of Aria. aria-sip-core handles the SIP protocol β parsing, construction, and digest authentication. rtp-engine handles real-time media β RTP packets, codecs, jitter buffering, and audio I/O. aria-mobile-core wraps both for mobile platforms, exposing a unified interface to iOS and Android via UniFFI.
aria-sip-core
SIP protocol library β parsing, construction, digest auth. Used by the desktop app, push gateway, and mobile core.
rtp-engine
Real-time media engine β RTP packets, codec encoding/decoding, jitter buffer, audio I/O. Powers all call audio.
aria-mobile-core
Mobile wrapper β combines SIP + RTP, exposes a single AriaMobileEngine to Swift and Kotlin via UniFFI.
aria-sip-core
A complete SIP protocol library built from scratch in Rust. Handles parsing, construction, and digest authentication with zero external SIP dependencies β giving full control over every byte on the wire.
Features
- SIP message parsing β requests and responses
- Header extraction (From, To, Via, Contact, CSeq, Call-ID, WWW-Authenticate, Authorization)
- URI parsing and construction
- SIP digest authentication (MD5, nonce handling, qop support)
- Message builders for REGISTER, INVITE, ACK, BYE, CANCEL, OPTIONS
- SDP offer/answer generation with codec negotiation
- Via branch and tag generation
- Zero external SIP dependencies β built from scratch
rtp-engine
A real-time media engine handling RTP packet construction, codec encoding and decoding, adaptive jitter buffering, and cross-platform audio I/O. Drives all call audio across every Aria platform.
Features
- RTP packet construction and parsing (RFC 3550)
- Codec support: PCMU/G.711u, PCMA/G.711a, Opus wideband, G.729
- Adaptive jitter buffer
- DTMF via RFC 2833 telephone events
- Audio device I/O via cpal (cross-platform)
- Call recording to WAV (desktop)
- Media session management
- RTP statistics and counters
Feature flags: The "device" feature enables audio I/O for desktop. Without it, the core RTP and codec logic works standalone β mobile apps use platform-native audio instead.
aria-mobile-core
The shared mobile engine that wraps aria-sip-core and rtp-engine, exposing a single AriaMobileEngine interface to iOS (Swift) and Android (Kotlin) via UniFFI.
UniFFI Bindings
Uses UniFFI Definition Language (UDL) v0.28 to generate Swift bindings + XCFramework for iOS, and Kotlin bindings + JNI for Android β from a single Rust source.
Exposed API
- AriaMobileEngine: configure, make_call, answer_call, reject_call, hangup
- AriaMobileEngine: set_mute, set_hold, send_dtmf, get_active_call
- AriaMobileEngine: set_codec_preferences
- SipCredentials β account configuration
- AudioCodec enum: Pcmu, Pcma, Opus, G729
- CallState enum: Idle, Ringing, Connected, Ended
- CallInfo β active call metadata
- MobileError β structured error handling
Gateway Client
Includes a built-in HTTP client (reqwest) for the push gateway REST API β device registration, call signaling, and token authentication.
View on GitHubHow They Fit Together
Each Aria product composes the core libraries differently depending on its platform and role.
Explore the Source
All three core libraries are open source under the MIT license. Dive into the code, open issues, or contribute.