pub enum SessionError {
Show 27 variants
SessionNotFound(String),
InvalidTransition(String),
DialogError(String),
MediaError(String),
MediaIntegration {
reason: String,
},
SDPNegotiationFailed(String),
ConfigurationError(String),
ConfigError(String),
InvalidInput(String),
Timeout(String),
NetworkError(String),
ProtocolError(String),
UnreliableProvisionalsNotSupported,
MissingCredentialsForInviteAuth,
MissingCredentialsForRequestAuth {
method: Method,
},
InviteAuthRetryExhausted,
RequestAuthRetryExhausted {
method: Method,
},
InternalError(String),
IoError(Error),
NotImplemented(String),
TransferFailed(String),
AuthError(String),
RegistrationFailed(String),
Other(String),
HeaderPolicy {
method: Method,
header: HeaderName,
reason: ViolationReason,
},
MissingRequiredHeader {
method: Method,
names: Vec<HeaderName>,
},
Conflict {
method: Method,
},
}Expand description
Errors returned by the rvoip-sip session layer.
Variants§
SessionNotFound(String)
No session with the given identifier exists in the registry.
InvalidTransition(String)
A requested state-machine transition is not legal from the current state.
DialogError(String)
An error originating in the dialog layer (rvoip-sip-dialog).
MediaError(String)
An error originating in the media layer (rvoip-media-core).
MediaIntegration
SIP signalling succeeded but wiring media to the negotiated session failed.
SDPNegotiationFailed(String)
SDP offer/answer negotiation failed (no common codec, malformed SDP, etc.).
ConfigurationError(String)
Invalid or inconsistent configuration supplied to a builder or coordinator.
ConfigError(String)
Configuration error (legacy alias of SessionError::ConfigurationError).
InvalidInput(String)
An application-supplied argument was malformed or out of range.
Timeout(String)
An operation did not complete within its allotted time.
NetworkError(String)
A transport-level network error occurred.
ProtocolError(String)
A SIP protocol violation was detected.
UnreliableProvisionalsNotSupported
RFC 3262 — the remote peer did not advertise Supported: 100rel on the
INVITE, so we cannot send a reliable 183 Session Progress. Raised by
send_early_media. Today we fail fast; a future send_progress(sdp)
API could fall back to an unreliable 183.
MissingCredentialsForInviteAuth
RFC 3261 §22.2 — the server challenged our INVITE with 401/407 but the
session has no credentials on file. Set credentials via
StreamPeerBuilder::with_credentials (per-peer default) or
control.invite(...).with_credentials(...) (per-call).
MissingCredentialsForRequestAuth
RFC 3261 §22.2 — the server challenged an outbound request with 401/407 but the request flow has no credentials on file.
InviteAuthRetryExhausted
RFC 3261 §22.2 — INVITE auth has already been retried once and the server challenged again. Prevents loops against a broken server or wrong credentials.
RequestAuthRetryExhausted
RFC 3261 §22.2 — outbound request auth has already been retried once and the server challenged again.
InternalError(String)
An unexpected internal invariant was violated.
IoError(Error)
An underlying std::io error (transport sockets, file I/O).
NotImplemented(String)
The requested capability is recognized but not yet implemented.
TransferFailed(String)
A call transfer (REFER flow) failed.
AuthError(String)
Authentication failed or could not be completed.
RegistrationFailed(String)
A REGISTER flow failed after any supported retry path.
Other(String)
A flattened/stringly error from a lower layer that has no dedicated variant.
HeaderPolicy
SIP_API_DESIGN_2 §8 — a builder setter or with_header call
staged a header that violates the per-method policy. The most
common case is staging a stack-managed name (Call-ID, CSeq,
Via, Max-Forwards) or a method-shaped name that has a
dedicated setter (e.g. Authorization -> with_credentials / with_auth).
Fields
header: HeaderNameThe offending header name.
reason: ViolationReasonWhy the header was rejected.
MissingRequiredHeader
SIP_API_DESIGN_2 §8 — HeaderPolicy::validate_outbound
reported one or more required application-supplied headers
were missing for the chosen method.
Fields
names: Vec<HeaderName>The required header names that were not supplied.
Conflict
SIP_API_DESIGN_2 §7.3 invariant #5 — a second .send() was
attempted on the same session for a method whose
pending_<method>_options stash slot is still occupied by an
in-flight prior .send(). Wait for the first future to
complete (or drop cleanly) before starting another of the
same method.
Implementations§
Source§impl SessionError
impl SessionError
Sourcepub fn is_session_gone(&self) -> bool
pub fn is_session_gone(&self) -> bool
True if this error means “the session is already gone from the
registry” — covers both the typed SessionNotFound variant and the
stringly-wrapped Other("Session not found: …") form that falls out
of the From<Box<dyn Error>> flatteners above.
Useful for fire-and-forget teardown paths (e.g. SessionHandle::hangup)
that race against a natural call-ended cleanup: if the race is lost,
the goal is already achieved and the error should be silent.
Trait Implementations§
Source§impl Debug for SessionError
impl Debug for SessionError
Source§impl Display for SessionError
impl Display for SessionError
Source§impl Error for SessionError
impl Error for SessionError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Source§impl From<AuthError> for SessionError
impl From<AuthError> for SessionError
Source§impl From<Error> for SessionError
impl From<Error> for SessionError
Source§impl From<HeaderPolicyViolation> for SessionError
impl From<HeaderPolicyViolation> for SessionError
Source§fn from(v: HeaderPolicyViolation) -> Self
fn from(v: HeaderPolicyViolation) -> Self
Source§impl From<SessionError> for B2buaError
impl From<SessionError> for B2buaError
Source§fn from(source: SessionError) -> Self
fn from(source: SessionError) -> Self
Source§impl From<SessionError> for TransferError
impl From<SessionError> for TransferError
Source§fn from(err: SessionError) -> Self
fn from(err: SessionError) -> Self
Auto Trait Implementations§
impl !RefUnwindSafe for SessionError
impl !UnwindSafe for SessionError
impl Freeze for SessionError
impl Send for SessionError
impl Sync for SessionError
impl Unpin for SessionError
impl UnsafeUnpin for SessionError
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more