pub enum Dialog {
ServerInvite(ServerInviteDialog),
ClientInvite(ClientInviteDialog),
}Expand description
SIP Dialog
Represents a SIP dialog which can be either a server-side or client-side INVITE dialog. A dialog is a peer-to-peer SIP relationship between two user agents that persists for some time. Dialogs are established by SIP methods like INVITE.
§Variants
ServerInvite- Server-side INVITE dialog (UAS)ClientInvite- Client-side INVITE dialog (UAC)
§Examples
use ftth_rsipstack::dialog::dialog::Dialog;
match dialog {
Dialog::ServerInvite(server_dialog) => {
// Handle server dialog
},
Dialog::ClientInvite(client_dialog) => {
// Handle client dialog
}
}Variants§
ServerInvite(ServerInviteDialog)
ClientInvite(ClientInviteDialog)
Implementations§
Source§impl Dialog
impl Dialog
pub fn id(&self) -> DialogId
pub fn from(&self) -> &From
pub fn to(&self) -> To
pub fn remote_contact(&self) -> Option<Uri>
pub async fn handle(&mut self, tx: &mut Transaction) -> Result<()>
pub fn on_remove(&self)
pub async fn hangup(&self) -> Result<()>
pub fn can_cancel(&self) -> bool
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Dialog
impl !RefUnwindSafe for Dialog
impl Send for Dialog
impl Sync for Dialog
impl Unpin for Dialog
impl !UnwindSafe for Dialog
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