#[non_exhaustive]pub struct SessionState {Show 18 fields
pub channel_name: Option<String>,
pub channel_state: Option<ChannelState>,
pub call_state: Option<CallState>,
pub initial_context: Option<String>,
pub initial_destination: Option<String>,
pub dialplan_context: Option<String>,
pub dialplan_from: Option<String>,
pub dialplan_to: Option<String>,
pub call_direction: Option<CallDirection>,
pub caller_id_number: Option<String>,
pub caller_id_name: Option<String>,
pub destination_number: Option<String>,
pub hangup_cause: Option<HangupCause>,
pub answered_at: Option<String>,
pub other_leg_uuid: Option<String>,
pub conference: Option<ConferenceMembership>,
pub media: SessionMedia,
pub variables: HashMap<String, String>,
/* private fields */
}Expand description
Mutable per-UUID state accumulator, updated as entries are processed.
Fields are None until the corresponding data is first seen in the stream.
Variables accumulate from CHANNEL_DATA dumps, set()/export() executions,
SET/EXPORT log lines, and inline variable_* lines.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.channel_name: Option<String>None until a Channel-Name field is encountered.
channel_state: Option<ChannelState>None until a State Change line or a Channel-State field is seen.
call_state: Option<CallState>None until a Callstate Change line is seen. A distinct vocabulary from
channel_state; neither displaces the other.
initial_context: Option<String>First dialplan context seen; set once and never overwritten.
initial_destination: Option<String>Destination of the first Processing line = the dialed number at ingress;
set once and never overwritten (unlike last-wins dialplan_to).
dialplan_context: Option<String>Current dialplan context; updated on each transfer/continue.
dialplan_from: Option<String>Caller side of the last Processing line — a number, or a display name
and number. None until one is seen.
dialplan_to: Option<String>Dialed destination of the last Processing line. None until one is seen.
call_direction: Option<CallDirection>Call direction from Call-Direction CHANNEL_DATA field; None until seen.
caller_id_number: Option<String>Caller ID number from Caller-Caller-ID-Number CHANNEL_DATA field; None until seen.
caller_id_name: Option<String>Caller ID name from Caller-Caller-ID-Name CHANNEL_DATA field; None until seen.
destination_number: Option<String>Destination number from Caller-Destination-Number CHANNEL_DATA field; None until seen.
hangup_cause: Option<HangupCause>Hangup cause extracted from ChannelLifecycle Hangup detail; None until hangup seen.
answered_at: Option<String>Timestamp when “has been answered” lifecycle event was seen; None until answered.
other_leg_uuid: Option<String>Other leg’s UUID; None until bridged. Set from Originate Resulted in Success on A-leg,
and from New Channel on B-leg (back-pointing to A-leg via originate context).
conference: Option<ConferenceMembership>Conference this session is currently a member of; None once it leaves.
media: SessionMediaCodecs negotiated on this leg, by media type and direction.
variables: HashMap<String, String>All variables learned so far, with the variable_ prefix stripped from names.
Implementations§
Source§impl SessionState
impl SessionState
Trait Implementations§
Source§impl Clone for SessionState
impl Clone for SessionState
Source§fn clone(&self) -> SessionState
fn clone(&self) -> SessionState
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more