pub enum ClientMessage {
Show 62 variants
KeepAlive,
Register(RegistrationMessage),
IpPort {
rtp_port: u16,
},
KeypadButton {
button: Digit,
line_instance: u32,
call_reference: u32,
wire_layout: Option<KeypadButtonWireLayout>,
},
EnblocCall {
called_party: String,
line_instance: u32,
},
Stimulus {
stimulus: Stimulus,
instance: u32,
call_reference: u32,
status: u32,
},
OffHook {
line_instance: u32,
call_reference: u32,
},
OnHook {
line_instance: u32,
call_reference: u32,
},
OffHookWithCallingParty {
calling_party_number: String,
voice_mailbox: String,
line_instance: u32,
},
LineStatRequest {
line_instance: u32,
},
ConfigStatRequest,
TimeDateRequest,
ButtonTemplateRequest,
VersionRequest,
CapabilitiesResponse(Vec<MediaCapability>),
MediaPortList(MediaPortList),
CapabilitiesUpdate(CapabilityUpdate),
OpenMultimediaReceiveChannelAck(OpenMultimediaReceiveChannelAck),
ServerRequest,
Alarm {
severity: AlarmSeverity,
text: String,
parameters: Option<[u32; 2]>,
},
MulticastMediaReceptionAck {
status: MediaStatus,
passthrough_party_id: PassthroughPartyId,
call_reference: CallReference,
},
OpenReceiveChannelAck {
status: MediaStatus,
address: IpAddr,
port: u16,
passthrough_party_id: u32,
call_reference: u32,
},
SoftKeySetRequest,
SoftKeyTemplateRequest,
SoftKeyEvent {
event: u32,
line_instance: u32,
call_reference: u32,
},
Unregister {
reason: u32,
},
RegisterToken(RegisterTokenMessage),
SpcpRegisterToken(SpcpRegisterTokenMessage),
HookFlash {
line_instance: u32,
call_reference: u32,
},
ForwardStatusRequest {
line_instance: u32,
},
SpeedDialStatusRequest {
speed_dial_instance: u32,
},
ConnectionStatisticsResponse(ConnectionStatistics),
HeadsetStatus {
enabled: bool,
},
MediaResourceNotification(MediaResourceNotification),
MediaPathEvent {
path: MediaPathId,
event: MediaPathEvent,
},
MediaPathCapability {
path: MediaPathId,
capability: MediaPathCapability,
},
MediaTransmissionFailure {
conference_id: u32,
passthrough_party_id: u32,
address: IpAddr,
port: u16,
call_reference: u32,
status: MediaStatus,
},
RegisterAvailableLines {
lines: u32,
},
ServiceUrlStatusRequest {
index: u32,
},
FeatureStatusRequest {
index: u32,
capabilities: u32,
},
StartMediaTransmissionAck(MediaTransmissionAck),
StartMultimediaTransmissionAck(StartMultimediaTransmissionAck),
ExtensionDeviceCapabilities(ExtensionDeviceCapabilities),
DeviceToUserData(UserDataMessage),
DeviceToUserDataResponse(UserDataMessage),
DeviceToUserDataV1(UserDataV1Message),
DeviceToUserDataResponseV1(UserDataV1Message),
PortResponse(PortEndpoint),
SubscriptionStatusRequest(SubscriptionRequest),
SubscribeDtmfPayloadResponse(DtmfPayloadIdentity),
UnsubscribeDtmfPayloadResponse(DtmfPayloadIdentity),
LocationInfo {
xml: String,
},
XmlAlarm(XmlAlarmMessage),
CallCountRequest(CallCountRequestPayload),
CreateConferenceResponse(CreateConferenceResponse),
DeleteConferenceResponse {
conference_id: ConferenceId,
result: DeleteConferenceResult,
},
ModifyConferenceResponse(ModifyConferenceResponse),
AuditConferenceResponse(AuditConferenceResponse),
AddParticipantResponse(AddParticipantResponse),
AuditParticipantResponse(AuditParticipantResponse),
KnownOpaque(KnownOpaqueMessage),
Unknown(RawMessage),
}Expand description
Typed messages accepted from a station connection.
Variants correspond to station-to-control identifiers in
catalog::MessageId. KnownOpaque retains a known
catalog entry without a typed payload, while Unknown
retains an unrecognized identifier. Decode with Self::decode during
registration and Self::decode_with_version after version negotiation.
Variants§
KeepAlive
Reports that the station connection remains active. Refreshes the server-side keepalive deadline.
Register(RegistrationMessage)
Introduces a station and its requested SCCP protocol characteristics. Starts registration and device authentication on the server.
IpPort
Reports the UDP port on which the station expects media. Supplies the station RTP port to server-side media setup.
KeypadButton
Reports a digit pressed on the station keypad. Associates the input with its line and call when the wire layout permits.
EnblocCall
Submits a complete called-party number in one message. Requests call setup without sending digits individually.
Stimulus
Reports a physical or logical station button stimulus. Identifies the affected instance, call, and stimulus status.
OffHook
Reports that the station handset or audio path went off hook. Starts or resumes call handling for the identified line and call.
OnHook
Reports that the station handset or audio path went on hook. Ends or releases call handling for the identified line and call.
OffHookWithCallingParty
Reports an off-hook transition with originating-party details. Carries the calling number, mailbox, and selected line instance.
LineStatRequest
Requests the configured status of one station line. Uses the line instance to select the directory number response.
ConfigStatRequest
Requests the station’s current device configuration. Prompts the server to return its configuration status.
TimeDateRequest
Requests the server’s current date and time. Prompts synchronization of the station clock.
ButtonTemplateRequest
Requests the station’s provisioned button layout. Prompts one or more button-template chunks from the server.
VersionRequest
Requests the firmware or load version assigned to the station. Prompts the server’s version response during provisioning.
CapabilitiesResponse(Vec<MediaCapability>)
Reports the station’s supported media capabilities. Answers a server capability request with codec and media details.
MediaPortList(MediaPortList)
Reports the RTP ports the station has allocated for media streams. Carries up to sixteen port numbers for use by call control.
CapabilitiesUpdate(CapabilityUpdate)
Reports a changed set of station media capabilities. Lets the server refresh capabilities after initial negotiation.
OpenMultimediaReceiveChannelAck(OpenMultimediaReceiveChannelAck)
Acknowledges opening a multimedia receive channel. Reports the resulting endpoint and status for the requested stream.
ServerRequest
Requests the station’s configured signaling-server list. Prompts the server response used for failover discovery.
Alarm
Reports a station alarm or diagnostic condition. Carries severity, text, and optional vendor parameter words.
Fields
severity: AlarmSeverityMulticastMediaReceptionAck
Acknowledges starting multicast media reception. Reports status for the passthrough party and call.
OpenReceiveChannelAck
Acknowledges opening an audio receive channel. Reports status and the station’s selected media endpoint.
SoftKeySetRequest
Requests the soft-key sets available to the station. Prompts the server to send the active soft-key profile.
SoftKeyTemplateRequest
Requests the station’s soft-key action template. Prompts the server to enumerate supported soft-key actions.
SoftKeyEvent
Reports activation of a station soft key. Associates the action with its line and call context.
Unregister
Requests removal of the station registration. Carries the station-provided reason for ending the session.
RegisterToken(RegisterTokenMessage)
Requests a registration token before full station registration. Supplies the station identity used for token admission control.
SpcpRegisterToken(SpcpRegisterTokenMessage)
Requests an SPCP registration token before full station registration. Supplies the station identity, address, device type, and stream capacity.
HookFlash
Reports a hook-flash action on an analog-style call. Associates the flash with its line and call context.
ForwardStatusRequest
Requests call-forwarding state for one line. Prompts the server to return configured forwarding destinations.
SpeedDialStatusRequest
Requests the contents of one speed-dial entry. Uses the speed-dial instance to select the response.
ConnectionStatisticsResponse(ConnectionStatistics)
Returns media connection statistics collected by the station. Carries packet, jitter, latency, and quality data for a call.
HeadsetStatus
Reports whether the station headset is enabled. Updates the server’s view of the station audio accessory state.
MediaResourceNotification(MediaResourceNotification)
Reports a station media-resource state change. Carries the resource type, direction, and availability details.
MediaPathEvent
Reports an event on a particular station media path. Identifies both the media path and the observed event.
MediaPathCapability
Reports a capability of a particular station media path. Identifies the path and its supported media behavior.
MediaTransmissionFailure
Reports failure of an active media transmission. Identifies the stream endpoint, call, and failure status.
Fields
status: MediaStatusRegisterAvailableLines
Reports how many line appearances the station can register. Lets the server constrain provisioning to the station’s capacity.
ServiceUrlStatusRequest
Requests the configured service URL at an index. Prompts the server to return its URL, label, and extension text.
FeatureStatusRequest
Requests the state of a provisioned feature button. Carries the feature index and station capability bits.
StartMediaTransmissionAck(MediaTransmissionAck)
Acknowledges a request to start audio transmission. Reports the station’s result for the requested media stream.
StartMultimediaTransmissionAck(StartMultimediaTransmissionAck)
Acknowledges a request to start multimedia transmission. Reports the station’s result for the requested video or data stream.
ExtensionDeviceCapabilities(ExtensionDeviceCapabilities)
Reports capabilities supplied by an attached extension device. Lets the server account for expansion-module and accessory features.
DeviceToUserData(UserDataMessage)
Carries legacy application data from the station to the server. Uses the fixed-format device-to-user data layout.
DeviceToUserDataResponse(UserDataMessage)
Returns a legacy station response to server application data. Uses the fixed-format device-to-user response layout.
DeviceToUserDataV1(UserDataV1Message)
Carries version-one application data from the station. Supports the extended variable-length user-data layout.
DeviceToUserDataResponseV1(UserDataV1Message)
Returns a version-one station response to application data. Supports the extended variable-length response layout.
PortResponse(PortEndpoint)
Returns endpoint information requested for a station port. Identifies the address and port selected by the station.
SubscriptionStatusRequest(SubscriptionRequest)
Requests status for a station feature subscription. Carries the transaction and feature identifiers being queried.
SubscribeDtmfPayloadResponse(DtmfPayloadIdentity)
Acknowledges subscription to an RTP DTMF payload. Identifies the negotiated payload associated with the subscription.
UnsubscribeDtmfPayloadResponse(DtmfPayloadIdentity)
Acknowledges removal of an RTP DTMF payload subscription. Identifies the payload whose subscription was removed.
LocationInfo
Reports the station’s location information as XML. Provides location metadata for routing and emergency services.
XmlAlarm(XmlAlarmMessage)
Reports a structured station alarm encoded as XML. Carries the alarm payload and its associated station metadata.
CallCountRequest(CallCountRequestPayload)
Requests the server’s current call-count information.
CreateConferenceResponse(CreateConferenceResponse)
Returns the result of creating a conference. Correlates the station outcome with the requested conference.
DeleteConferenceResponse
Returns the result of deleting a conference. Identifies the conference and its deletion result.
ModifyConferenceResponse(ModifyConferenceResponse)
Returns the result of modifying a conference. Carries the station outcome for the requested conference changes.
AuditConferenceResponse(AuditConferenceResponse)
Returns station state for a conference audit. Reports the conference details requested by the server.
AddParticipantResponse(AddParticipantResponse)
Returns the result of adding a conference participant. Identifies the conference participant and operation outcome.
AuditParticipantResponse(AuditParticipantResponse)
Returns station state for a participant audit. Reports the participant details requested by the server.
KnownOpaque(KnownOpaqueMessage)
Preserves a recognized station-to-server message without typed decoding. Retains its catalog identifier and payload bytes for lossless handling.
Unknown(RawMessage)
Preserves an unrecognized station-to-server message. Retains the unknown identifier and raw payload for diagnostics or forwarding.
Implementations§
Source§impl ClientMessage
impl ClientMessage
Sourcepub fn decode_with_version(
frame: Frame,
protocol: ProtocolVersion,
) -> Result<Self, CodecError>
pub fn decode_with_version( frame: Frame, protocol: ProtocolVersion, ) -> Result<Self, CodecError>
Decodes a station-originated frame with an explicit negotiated version.
Use this after registration when the session version is authoritative, especially for layouts whose header version is zero or ambiguous.
Sourcepub fn decode(frame: Frame) -> Result<Self, CodecError>
pub fn decode(frame: Frame) -> Result<Self, CodecError>
Decodes a station-originated frame using its header version.
This is suitable for initial messages that carry a meaningful header
version. Established sessions should prefer Self::decode_with_version.
Sourcepub fn encode(&self, protocol: ProtocolVersion) -> Result<Vec<u8>, CodecError>
pub fn encode(&self, protocol: ProtocolVersion) -> Result<Vec<u8>, CodecError>
Canonically encode a phone-to-server message.
Trait Implementations§
Source§impl Clone for ClientMessage
impl Clone for ClientMessage
Source§fn clone(&self) -> ClientMessage
fn clone(&self) -> ClientMessage
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more