Expand description
FreeSWITCH protocol types: channel state, events, headers, commands, and variables.
This crate provides the domain types for FreeSWITCH’s Event Socket Library (ESL) protocol without any async runtime dependency. Use it standalone for CDR parsing, config generation, command building, or channel variable validation.
For async ESL transport (connecting to FreeSWITCH, sending commands, receiving events),
see the freeswitch-esl-tokio crate which
re-exports everything from this crate.
§SIP header types
General-purpose SIP header parsing is provided by the
sip-header crate, re-exported here for convenience.
Types like SipHeaderAddr, SipCallInfo, HistoryInfo, and SipGeolocation
are available from the crate root.
Re-exports§
pub use channel::AnswerState;pub use channel::CallDirection;pub use channel::CallState;pub use channel::ChannelState;pub use channel::ChannelTimetable;pub use channel::HangupCause;pub use channel::ParseAnswerStateError;pub use channel::ParseCallDirectionError;pub use channel::ParseCallStateError;pub use channel::ParseChannelStateError;pub use channel::ParseHangupCauseError;pub use channel::ParseTimetableError;pub use channel::TimetablePrefix;pub use commands::Application;pub use commands::BridgeDialString;pub use commands::DialString;pub use commands::DialplanType;pub use commands::Endpoint;pub use commands::GroupCallOrder;pub use commands::Originate;pub use commands::OriginateError;pub use commands::OriginateTarget;pub use commands::ParseDialplanTypeError;pub use commands::ParseGroupCallOrderError;pub use commands::UuidAnswer;pub use commands::UuidBridge;pub use commands::UuidDeflect;pub use commands::UuidGetVar;pub use commands::UuidHold;pub use commands::UuidKill;pub use commands::UuidSendDtmf;pub use commands::UuidSetVar;pub use commands::UuidTransfer;pub use commands::Variables;pub use commands::VariablesType;pub use event::EslEvent;pub use event::EslEventPriority;pub use event::EslEventType;pub use event::EventFormat;pub use event::EventSubscription;pub use event::EventSubscriptionError;pub use event::ParseEventFormatError;pub use event::ParseEventTypeError;pub use event::ParsePriorityError;pub use headers::normalize_header_key;pub use headers::EventHeader;pub use headers::ParseEventHeaderError;pub use lookup::HeaderLookup;pub use variables::ChannelVariable;pub use variables::CoreMediaVariable;pub use variables::EslArray;pub use variables::MultipartBody;pub use variables::MultipartItem;pub use variables::ParseChannelVariableError;pub use variables::ParseCoreMediaVariableError;pub use variables::RtpStatUnit;pub use variables::SipHeaderPrefix;pub use variables::SipPassthroughHeader;pub use variables::VariableName;pub use sip_header;pub use sip_header::sip_uri;
Modules§
- channel
- Channel-related data types extracted from ESL event headers.
- commands
- Command string builders for
api()andbgapi(). - event
- ESL event types and structures
- headers
- Typed event header names for FreeSWITCH ESL events.
- lookup
- Shared trait for typed header lookups from any key-value store.
- prelude
- Convenience re-exports for common types and traits.
- variables
- Channel variable types: format parsers (
ARRAY::, SIP multipart) and typed variable name enums.
Macros§
- define_
header_ enum - Generates a non-exhaustive enum mapping Rust variants to canonical protocol strings.
Structs§
- History
Info - Parsed History-Info header value (RFC 7044).
- History
Info Entry - A single entry from a History-Info header (RFC 7044).
- History
Info Reason - Parsed RFC 3326 Reason header value extracted from a History-Info URI.
- Parse
SipHeader Addr Error - Error returned when parsing a SIP header address value fails.
- Parse
SipHeader Error - Error returned when parsing an unrecognized SIP header name.
- SipCall
Info - Parsed SIP Call-Info header value. Contains zero or more entries.
- SipCall
Info Entry - One entry from a SIP Call-Info header:
<uri>;key=value;key=value. - SipGeolocation
- Parsed SIP Geolocation header value (RFC 6442).
- SipHeader
Addr - Parsed SIP
name-addr(RFC 3261 §25.1) with header-level parameters.
Enums§
- History
Info Error - Errors from parsing a History-Info header value (RFC 7044).
- SipCall
Info Error - Errors from parsing a SIP Call-Info header value.
- SipGeolocation
Ref - A reference extracted from a SIP Geolocation header (RFC 6442).
- SipHeader
- Standard SIP header names with canonical wire casing.
Constants§
- DEFAULT_
ESL_ PASSWORD - Default FreeSWITCH ESL password (
ClueCon). - DEFAULT_
ESL_ PORT - Default FreeSWITCH ESL port for inbound connections.
Traits§
- SipHeader
Lookup - Trait for looking up standard SIP headers from any key-value store.
Functions§
- extract_
header - Extract a header value from a raw SIP message.