Skip to main content

MessageKind

Enum MessageKind 

Source
#[non_exhaustive]
pub enum MessageKind {
Show 16 variants Execute { depth: u32, channel: String, application: String, arguments: String, }, Dialplan { channel: String, detail: String, }, ChannelData, ChannelField { name: String, value: String, }, Variable { name: String, value: String, }, SdpMarker { direction: SdpDirection, }, StateChange { detail: String, }, CodecNegotiation, Media { detail: String, }, ChannelLifecycle { detail: String, }, SipInvite { direction: SipInviteDirection, profile: String, call_id: Option<String>, }, EventSocket { detail: String, }, Dtmf { source: DtmfSource, digit: char, duration_ms: Option<u32>, }, General, FileChange, DateChange,
}
Expand description

Semantic classification of a log message’s content.

Display includes variant-specific detail (e.g. execute(set), var(sip_call_id)) while label() returns just the category string.

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

Execute

Dialplan application execution trace (EXECUTE [depth=N] channel app(args)).

Fields

§depth: u32
§channel: String
§application: String
§arguments: String
§

Dialplan

Dialplan processing output — regex matching, actions, context routing.

Fields

§channel: String
§detail: String
§

ChannelData

Start of a CHANNEL_DATA variable dump block.

§

ChannelField

A Channel-* or similar hyphenated field from a CHANNEL_DATA dump.

Fields

§name: String
§value: String
§

Variable

A variable_* field — from dumps, SET, EXPORT, set(), or CoreSession::setVariable.

Fields

§name: String
§value: String
§

SdpMarker

Start of an SDP body block (Local SDP:, Remote SDP:).

Fields

§direction: SdpDirection
§

StateChange

Channel state transition (State Change, Callstate Change, SOFIA state).

Fields

§detail: String
§

CodecNegotiation

Audio Codec Compare lines during codec negotiation.

§

Media

RTP, RTCP, recording, and other media-related messages.

Fields

§detail: String
§

ChannelLifecycle

Channel lifecycle events — new/close/hangup, bridge, ring, REFER, CANCEL, BYE.

Fields

§detail: String
§

SipInvite

Sofia logged a SIP INVITE on this channel — the line is one of:

  • sofia/<profile>/<endpoint> receiving invite from <ip>:<port> ... call-id: <id>
  • sofia/<profile>/<endpoint> sending invite [version: ...] [call-id: <id>]

Always emitted by sofia for every inbound and outbound call regardless of dialplan — the canonical primitive for sip_call_id ↔ channel_uuid correlation. The line’s leading UUID is on crate::LogEntry::uuid.

Fields

§profile: String

The sofia profile name (segment between sofia/ and the next /).

§call_id: Option<String>

SIP Call-ID from the log line. None when sofia logs (null) (typical for outbound at pre-routing time — a later log entry on the same UUID will carry the actual id) or when the line carries no call-id: field (the version-only DEBUG follow-up for sending).

§

EventSocket

Event socket commands from mod_event_socket.

Fields

§detail: String
§

Dtmf

DTMF digit received on the channel. Format: [RTP] RECV DTMF <digit>:<duration_ms> or INFO DTMF(<digit>)

Fields

§source: DtmfSource

Where the DTMF was logged (RTP layer, channel layer, or SIP INFO).

§digit: char

The DTMF digit (0-9, *, #, A-D, or F for flash).

§duration_ms: Option<u32>

Duration in milliseconds. None for SIP INFO DTMF (no duration logged).

§

General

Anything not matching a more specific pattern.

§

FileChange

Synthetic marker emitted at log file boundaries (never from classify_message).

§

DateChange

Synthetic marker emitted at date boundaries (never from classify_message).

Implementations§

Source§

impl MessageKind

Source

pub const ALL_LABELS: &[&str]

Exhaustive list of all category label strings, in declaration order.

Source

pub fn label(&self) -> &'static str

Returns the bare category string without variant-specific data.

Trait Implementations§

Source§

impl Clone for MessageKind

Source§

fn clone(&self) -> MessageKind

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for MessageKind

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for MessageKind

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for MessageKind

Source§

impl PartialEq for MessageKind

Source§

fn eq(&self, other: &MessageKind) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl StructuralPartialEq for MessageKind

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.