pub enum DialogState {
Calling(DialogId),
Trying(DialogId),
Early(DialogId, Response),
WaitAck(DialogId, Response),
Confirmed(DialogId, Response),
Updated(DialogId, Request),
Notify(DialogId, Request),
Info(DialogId, Request),
Options(DialogId, Request),
Terminated(DialogId, TerminatedReason),
}Expand description
SIP Dialog State
Represents the various states a SIP dialog can be in during its lifecycle. These states follow the SIP dialog state machine as defined in RFC 3261.
§States
Calling- Initial state when a dialog is created for an outgoing INVITETrying- Dialog has received a 100 Trying responseEarly- Dialog is in early state (1xx response received, except 100)WaitAck- Server dialog waiting for ACK after sending 2xx responseConfirmed- Dialog is established and confirmed (2xx response received/sent and ACK sent/received)Updated- Dialog received an UPDATE requestNotify- Dialog received a NOTIFY requestInfo- Dialog received an INFO requestOptions- Dialog received an OPTIONS requestTerminated- Dialog has been terminated
§Examples
use ftth_rsipstack::dialog::dialog::DialogState;
use ftth_rsipstack::dialog::DialogId;
let state = DialogState::Confirmed(dialog_id, rsip::Response::default());
if state.is_confirmed() {
println!("Dialog is established");
}Variants§
Calling(DialogId)
Trying(DialogId)
Early(DialogId, Response)
WaitAck(DialogId, Response)
Confirmed(DialogId, Response)
Updated(DialogId, Request)
Notify(DialogId, Request)
Info(DialogId, Request)
Options(DialogId, Request)
Terminated(DialogId, TerminatedReason)
Implementations§
Source§impl DialogState
impl DialogState
pub fn can_cancel(&self) -> bool
pub fn is_confirmed(&self) -> bool
pub fn is_terminated(&self) -> bool
Trait Implementations§
Source§impl Clone for DialogState
impl Clone for DialogState
Source§fn clone(&self) -> DialogState
fn clone(&self) -> DialogState
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for DialogState
impl RefUnwindSafe for DialogState
impl Send for DialogState
impl Sync for DialogState
impl Unpin for DialogState
impl UnwindSafe for DialogState
Blanket Implementations§
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
Mutably borrows from an owned value. Read more