Expand description
Calls: dialogs, INVITE with SDP offer/answer, and the media that results.
This is the layer where the signalling and the media stacks meet. The join is narrower than it looks: SDP negotiation decides an address, a port and a codec, and everything else about media follows from those three.
The ordering constraint worth knowing is that an SDP offer has to name the port audio will arrive on, and only a bound socket knows that port. So the media socket is bound before the INVITE is sent, not after the answer comes back.
§Stability
sipx is pre-1.0, so neither word below means frozen. 1.0.0 is what freezes an API, and its
predicates are in docs/roadmap.md. Until then:
- Supported — meant to be depended on. Breaking changes get a
CHANGELOG.mdentry saying what to do instead. New enum variants and new struct fields may still appear in a minor release, so a downstreammatchshould carry a_arm. - Experimental — may change shape or be removed without a migration note. Depend on it only if you are prepared to follow it.
Supported: the call lifecycle — dial, answer, early dialogs, hold and resume, both transfer
flavours, DTMF, playback, recording, session timers — plus the bounded generic load scheduler
in load. Initial request/response extension fields are validated sipx-sip headers supplied
by the owning application; stack-owned field policy remains the application’s responsibility.
Experimental: choosing what a call offers — CodecPreference, Codecs, IcePolicy,
Keying, MediaPolicy, MediaProfile, MediaAddress,
OutboundIdentityPolicy, InboundIdentityPolicy,
the bounded inbound event Notifier, outbound EventSubscriptions and bidirectional
publication Publications runtimes,
the two-dialog ownership and relay surface in coupling,
DialOptions::with_codecs, DialOptions::with_initial_direction,
DialOptions::with_media_policy,
DialOptions::with_identity, Dispatcher::with_identity, and the answering entry
points that take a selection, policy, or independent media addresses (answer_at,
answer_with, answer_with_policy, answer_with_policy_at,
answer_ringing_with, answer_ringing_with_policy, answer_replacing_with,
Invitation::answer_with, Invitation::answer_with_policy, ring_early_with,
ring_early_with_policy, ring_offer_early, ring_offer_early_with_policy and
dial_early_without_offer). These choices are pre-1.0 and their shape may still move.
Confirmed-dialog persistence is Experimental too: Call::dialog_snapshot,
Call::restore_dialog, DialogSnapshot and DialogRestoreContext expose a versioned
boundary whose schema remains deliberately narrower than a serialized Call.
The set is the G.711 pair unless a call says otherwise. An application may provide an exact
non-empty order with Codecs::ordered, including mono L16; selecting Opus is a typed error
unless this crate is built with its opus feature, which links libopus.
MediaProfile::BrowserAudio is the fail-closed composition of WSS, ICE, DTLS-SRTP,
multiplexed RTCP, and that required audio vocabulary. It is one bounded audio endpoint profile,
not a browser API or a general WebRTC compatibility claim.
Absent rather than experimental, so that nobody looks for it: a signalling-only coupling that
leaves media endpoint-owned (C-7), and multi-party call bridging or conferencing. A
Coupling can own two calls and attach a bounded media bridge, but Call does not expose its
MediaSession for arbitrary application-side mixing.
Error is #[non_exhaustive]: additive diagnostics stay additive for downstream callers, so
a match over it carries a _ arm.
Re-exports§
pub use call::Call;pub use call::DialOptions;pub use call::Dialing;pub use call::MediaAddress;pub use call::answer;pub use call::answer_at;pub use call::answer_early;pub use call::answer_replacing;pub use call::answer_replacing_with;pub use call::answer_ringing;pub use call::answer_ringing_with;pub use call::answer_ringing_with_policy;pub use call::answer_ringing_with_policy_at;pub use call::answer_with;pub use call::answer_with_policy;pub use call::answer_with_policy_and_headers;pub use call::answer_with_policy_and_headers_at;pub use call::answer_with_policy_at;pub use call::dial;pub use call::dial_early;pub use call::dial_early_until;pub use call::dial_early_without_offer;pub use call::dial_once;pub use call::dial_until;pub use call::serve;pub use counters::SignallingCounts;pub use coupling::CancelAction;pub use coupling::ConfirmedCoupling;pub use coupling::Coupling;pub use coupling::CouplingEnd;pub use coupling::CouplingState;pub use coupling::EarlyCoupling;pub use coupling::FailureAction;pub use coupling::Leg;pub use coupling::OfferAction;pub use coupling::OfferAxis;pub use dialog::Dialog;pub use dialog::DialogId;pub use dialog::Role;pub use dispatch::Calls;pub use dispatch::DispatchCounts;pub use dispatch::Dispatched;pub use dispatch::Dispatcher;pub use dispatch::DrainProgress;pub use dispatch::DrainReport;pub use dispatch::Invitation;pub use error::Error;pub use error::Result;pub use event::CallEvent;pub use event::CallEvents;pub use event::EndCause;pub use extension::ApplicationRequest;pub use extension::MAX_APPLICATION_BODY;pub use identity::InboundIdentityPolicy;pub use identity::OutboundIdentityPolicy;pub use notifier::Notifier;pub use notifier::NotifierCounts;pub use notifier::NotifierHandle;pub use publication::AllowPublications;pub use publication::Publication;pub use publication::PublicationAuthorization;pub use publication::PublicationComposition;pub use publication::PublicationConfig;pub use publication::PublicationCounts;pub use publication::PublicationError;pub use publication::Publications;pub use publication::PublicationsHandle;pub use publication::ReplacePublicationState;pub use rel::Ringing;pub use rel::ring;pub use rel::ring_early;pub use rel::ring_early_with;pub use rel::ring_early_with_policy;pub use rel::ring_early_with_policy_at;pub use rel::ring_offer_early;pub use rel::ring_offer_early_with_policy;pub use rel::ring_offer_early_with_policy_at;pub use subscriber::EventNotification;pub use subscriber::EventSubscription;pub use subscriber::EventSubscriptionCounts;pub use subscriber::EventSubscriptionError;pub use subscriber::EventSubscriptions;pub use subscriber::EventSubscriptionsHandle;pub use transfer::Referral;pub use transfer::Replaces;pub use transfer::Transfer;pub use transfer::TransferState;
Modules§
- call
- Establishing a call: INVITE with an SDP offer, media bound to the answer, and BYE.
- counters
- The signalling path’s losses, read as one thing.
- coupling
- Two dialogs driven as one call.
- dialog
- Dialogs (RFC 3261 §12).
- dispatch
- One endpoint’s requests, routed to any number of concurrent calls (story
C-4). - error
- Call errors.
- event
- A call’s event stream (story
C-3, theapp-sdkepic’s keystone). - extension
- Application-owned requests inside an established dialog.
- identity
- Caller-owned authenticated-identity policies for live calls.
- load
- Placing many calls at once, and reporting honestly about what happened.
- notifier
- The socket driver for the RFC 6665 notifier state machine.
- publication
- Live endpoint driver for RFC 3903 event-state publication.
- rel
- Reliable provisional responses in a live call (RFC 3262).
- subscriber
- Runtime driver for the sans-I/O RFC 6665 event client.
- transfer
- Transfer: REFER (RFC 3515) and the implicit subscription it creates.
Structs§
- Codecs
- Which codecs a call offers and accepts, in preference order (
M-30,P-9). - Credentials
- What a user knows.
- Dialog
Restore Context - Fresh runtime resources and policy required to attach a decoded dialog.
- Dialog
Snapshot - Immutable version-two facts needed to continue a confirmed dialog.
- Media
Policy - The media choices shared by dialing and answering a call.
- Signalling
Call - One confirmed INVITE dialog without SDP or media ownership.
Enums§
- Codec
Preference - One codec an application may put in its ordered preference list.
- Codec
Selection Error - Why an ordered codec selection cannot be honoured.
- Dialog
NotQuiescent - Why a live call cannot be captured without losing active protocol work.
- Dialog
Persistence Error - A typed refusal from snapshot capture, decoding, or runtime attachment.
- Dialog
Session Action - The explicit timer input a host must drive before restoration can continue.
- IcePolicy
- Whether an initial call exchange uses ICE (
docs/specs/ice.md§13.4). - Keying
- How the initial audio stream is keyed.
- Media
Profile - A named composition of call/media requirements.
- Negotiated
Keying - The keying mechanism an established call actually uses.
- Signalling
Event - One observable transition of an SDP-free confirmed dialog.
Constants§
- MAX_
FIELD_ BYTES - The maximum party, target, or route size.
- MAX_
ID_ BYTES - The maximum Call-ID or tag size.
- MAX_
ROUTES - The maximum number of routes retained by one dialog.
- MAX_
SNAPSHOT_ BYTES - The maximum accepted encoded snapshot size.
- MAX_
VARIABLE_ BYTES - The maximum sum of all variable-length fields.