Expand description
SDP session descriptions (RFC 8866) and offer/answer negotiation (RFC 3264).
Two things shape this crate.
Unknown lines survive. SDP is extended constantly, and an element that drops what it does not understand breaks features it has never heard of. Parsing keeps every line; the typed accessors are a view over them, not a replacement.
Negotiation is a pure function. answer() takes an offer and a set of capabilities and
returns an answer — no sockets, no clock, no shared mutable session object. The rules in
RFC 3264 are full of cases that are awkward to reach through a live call (a stream with no
common codec, a sendonly that must become recvonly, a dynamic payload type that means
different things at each end) and they are all one function call away here.
§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. This includes with_dtls_srtp and the ICE attribute helpers: sipx-call
consumes both for explicit media policy in dial and answer roles (M-27, M-28).
Re-exports§
pub use answer::Capabilities;pub use answer::answer;pub use answer::negotiate_direction;pub use ice::Candidate;pub use ice::CandidateType;pub use ice::ComponentId;pub use ice::Credentials;pub use ice::Foundation;pub use ice::Pacing;pub use ice::Priority;pub use ice::RelatedAddress;pub use ice::RemoteCandidate;pub use ice::Transport;pub use parse::parse;pub use session::Address;pub use session::Attribute;pub use session::Connection;pub use session::Direction;pub use session::MediaDescription;pub use session::Origin;pub use session::RtcpMode;pub use session::SessionDescription;pub use session::Timing;
Modules§
- answer
- Offer/answer (RFC 3264).
- browser_
audio - Pure SDP policy for the named browser-compatible audio profile.
- crypto
- SDES: keying SRTP through SDP (RFC 4568).
- fingerprint
- Certificate fingerprints and the TLS role, in SDP (RFC 8122, RFC 4145).
- ice
- ICE in SDP: the attributes RFC 8839 §5 defines.
- parse
- Reading SDP (RFC 8866 §5).
- rtpmap
a=rtpmapvalues: the format one names, and whether two of them name the same format.- session
- The session description AST.
Enums§
- SdpError
- What can go wrong reading SDP.
Type Aliases§
- Result
- An SDP result.