pub struct DialogInner {Show 13 fields
pub role: TransactionRole,
pub cancel_token: CancellationToken,
pub id: Mutex<DialogId>,
pub state: Mutex<DialogState>,
pub local_seq: AtomicU32,
pub local_contact: Option<Uri>,
pub remote_contact: Mutex<Option<Contact>>,
pub remote_seq: AtomicU32,
pub remote_uri: Mutex<Uri>,
pub from: From,
pub to: Mutex<To>,
pub credential: Option<Credential>,
pub route_set: Mutex<Vec<Route>>,
/* private fields */
}Expand description
Internal Dialog State and Management
DialogInner contains the core state and functionality shared between
client and server dialogs. It manages dialog state transitions, sequence numbers,
routing information, and communication with the transaction layer.
§Key Responsibilities
- Managing dialog state transitions
- Tracking local and remote sequence numbers
- Maintaining routing information (route set, contact URIs)
- Handling authentication credentials
- Coordinating with the transaction layer
§Fields
role- Whether this is a client or server dialogcancel_token- Token for canceling dialog operationsid- Unique dialog identifierstate- Current dialog statelocal_seq- Local CSeq number for outgoing requestsremote_seq- Remote CSeq number for incoming requestslocal_contact- Local contact URIremote_uri- Remote target URIfrom- From header valueto- To header valuecredential- Authentication credentials if neededroute_set- Route set for request routingendpoint_inner- Reference to the SIP endpointstate_sender- Channel for sending state updatestu_sender- Transaction user senderinitial_request- The initial request that created this dialog
Fields§
§role: TransactionRole§cancel_token: CancellationToken§id: Mutex<DialogId>§state: Mutex<DialogState>§local_seq: AtomicU32§local_contact: Option<Uri>§remote_contact: Mutex<Option<Contact>>§remote_seq: AtomicU32§remote_uri: Mutex<Uri>§from: From§to: Mutex<To>§credential: Option<Credential>§route_set: Mutex<Vec<Route>>Implementations§
Source§impl DialogInner
impl DialogInner
pub fn new( role: TransactionRole, id: DialogId, initial_request: Request, endpoint_inner: EndpointInnerRef, state_sender: DialogStateSender, credential: Option<Credential>, local_contact: Option<Uri>, tu_sender: TransactionEventSender, ) -> Result<Self>
pub fn can_cancel(&self) -> bool
pub fn is_confirmed(&self) -> bool
pub fn is_terminated(&self) -> bool
pub fn get_local_seq(&self) -> u32
pub fn increment_local_seq(&self) -> u32
pub fn update_remote_tag(&self, tag: &str) -> Result<()>
Auto Trait Implementations§
impl !Freeze for DialogInner
impl !RefUnwindSafe for DialogInner
impl Send for DialogInner
impl Sync for DialogInner
impl Unpin for DialogInner
impl !UnwindSafe for DialogInner
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