1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
//! rsiprtp - SIP/RTP stack for Rust
//!
//! An audio-focused SIP user-agent (UA) stack designed for:
//! - Voicemail applications
//! - AI agent call bridges with mixing
//!
//! `rsiprtp` targets traditional VoIP / SIP-trunking use cases. It is **not**
//! a WebRTC stack: there is no DTLS-SRTP handshake (SDES per RFC 4568),
//! no video, and no SIP-over-WebSocket transport. See the README for the
//! full scope.
//!
//! Carrier-interop signalling features are supported: PRACK / 100rel
//! reliable provisional responses (RFC 3262, no offer/answer body in
//! PRACK; reliable provisional acks only), the UPDATE method
//! (RFC 3311), and session timers (RFC 4028) — both the refresher path
//! (UPDATE / re-INVITE refresh) and the non-refresher path (BYE on peer
//! silence) drive from the `CallManager::tick` / `next_deadline` hooks.
//!
//! Auto-detection of `Allow:` lacking UPDATE on the 200 OK is not
//! implemented; the app calls
//! [`session::CallManager::note_update_unsupported`] on observing a
//! 405 / 501 to UPDATE, or after parsing the 200 OK's Allow header
//! itself.
//!
//! # Quick Start
//!
//! ```rust,ignore
//! use rsiprtp::prelude::*;
//!
//! #[tokio::main]
//! async fn main() -> Result<(), Error> {
//! // Create a call manager
//! let config = ManagerConfig::default();
//! let mut manager = CallManager::new(config);
//!
//! // Create an outbound call
//! let call_id = manager.create_call("sip:bob@example.com".to_string());
//!
//! // ... handle call events ...
//!
//! Ok(())
//! }
//! ```
//!
//! # Architecture
//!
//! The stack is organized into modules:
//!
//! - [`core`]: Common types, errors, configuration
//! - [`sip`]: SIP message parsing and building (in-tree parser)
//! - [`transaction`]: RFC 3261 transaction state machines (Sans-IO)
//! - [`dialog`]: Dialog management for INVITE sessions
//! - [`transport`]: UDP/TCP/TLS network transport
//! - [`sdp`]: SDP parsing and offer/answer negotiation
//! - [`rtp`]: RTP packet handling
//! - [`srtp`]: SRTP encryption with SDES key exchange (RFC 4568)
//! - [`ice`]: ICE/STUN/TURN for NAT traversal (host + server-reflexive
//! candidates; TURN relay candidates, trickle, ICE restart, IPv6
//! dual-stack interop, symmetric-NAT prflx, and RFC 7675 consent
//! freshness are not yet supported). Drive it via
//! [`session::IceSession`] alongside [`session::CallManager`].
//! - [`media`]: Audio codecs and jitter buffer
//! - [`session`]: High-level call management
/// Prelude for convenient imports.