Skip to main content

ServerMessage

Enum ServerMessage 

Source
pub enum ServerMessage {
Show 89 variants RegisterAck { keepalive_seconds: u32, secondary_keepalive_seconds: u32, protocol: ProtocolVersion, features: PhoneFeatures, date_template: DateTemplate, }, RegisterReject { reason: String, }, KeepAliveAck, UnregisterAck, CapabilitiesRequest, ConfigStatus(ConfigurationStatus), LineStatus { instance: u32, number: String, display_name: String, }, ButtonTemplate { offset: u32, total: u32, buttons: Vec<ButtonTemplateEntry>, }, Version { firmware: String, }, ServerResponse { servers: Vec<SignalingServerEndpoint>, }, TimeDate { year: u32, month: u32, weekday: u32, day: u32, hour: u32, minute: u32, second: u32, milliseconds: u32, unix_seconds: u32, }, SoftKeyTemplate { actions: Vec<SoftKey>, }, SoftKeySet { profile: SoftKeyProfile, }, SelectSoftKeys { line_instance: u32, call_reference: u32, set: KeyMode, valid_mask: u32, }, CallState { state: CallState, line_instance: u32, call_reference: u32, }, CallInfo { info: CallInfo, line_instance: u32, call_reference: u32, }, DisplayPrompt { timeout_seconds: u32, text: String, line_instance: u32, call_reference: u32, }, ClearPrompt { line_instance: u32, call_reference: u32, }, DisplayNotify { timeout_seconds: u32, text: String, }, ClearNotify, DisplayPriorityNotify { timeout_seconds: u32, priority: NotificationPriority, text: String, }, ClearPriorityNotify { priority: NotificationPriority, }, NotifyDtmfTone(DtmfToneControl), SendDtmfTone(DtmfToneControl), StartAnnouncement { announcements: Vec<AnnouncementEntry>, end_of_ack: u32, conference_id: u32, matrix_conference_party_ids: Vec<u32>, hearing_conference_party_mask: u32, play_mode: u32, }, StopAnnouncement { conference_id: u32, }, AnnouncementFinish { conference_id: u32, play_status: u32, }, ClearConference { conference_id: ConferenceId, service_number: u32, }, CreateConferenceRequest(CreateConferenceRequest), DeleteConferenceRequest { conference_id: ConferenceId, }, ModifyConferenceRequest(ModifyConferenceRequest), AuditConferenceRequest, AddParticipantRequest(AddParticipantRequest), DropParticipantRequest { conference_id: ConferenceId, call_reference: CallReference, }, AuditParticipantRequest { conference_id: ConferenceId, }, ChangeParticipantRequest(ChangeParticipantRequest), StopMultimediaTransmission(MultimediaStreamControl), FlowControlCommand(VideoFlowControl), CloseMultimediaReceiveChannel(MultimediaStreamControl), VideoDisplayCommand { conference_id: ConferenceId, call_reference: CallReference, layout_id: u32, }, FlowControlNotify(VideoFlowControl), ActivateCallPlane { line_instance: u32, }, DeactivateCallPlane, BackspaceResponse { line_instance: u32, call_reference: u32, }, RegisterTokenAck, RegisterTokenReject { backoff_seconds: u32, }, SetRinger { mode: RingerMode, duration: RingDuration, line_instance: u32, call_reference: u32, }, SetLamp { stimulus: ButtonType, instance: u32, mode: LampMode, }, StartTone { tone: Tone, direction: ToneDirection, line_instance: u32, call_reference: u32, }, StopTone { line_instance: u32, call_reference: u32, }, StartMulticastMediaReception(MulticastMediaReception), StartMulticastMediaTransmission(MulticastMediaTransmission), StopMulticastMediaReception { conference_id: ConferenceId, passthrough_party_id: PassthroughPartyId, call_reference: CallReference, }, StopMulticastMediaTransmission { conference_id: ConferenceId, passthrough_party_id: PassthroughPartyId, call_reference: CallReference, }, OpenReceiveChannel { call_reference: u32, passthrough_party_id: u32, packet_ms: u32, codec: Codec, echo_cancellation: EchoCancellation, telephone_event_payload: u8, source_address: IpAddr, source_port: u16, encryption: Option<MediaEncryption>, wire: Option<OpenReceiveChannelWire>, }, CloseReceiveChannel(AudioStreamControl), ConnectionStatisticsRequest { directory_number: String, call_reference: u32, processing: StatisticsProcessing, }, StartMediaTransmission { call_reference: u32, passthrough_party_id: u32, endpoint: MediaEndpoint, silence_suppression: SilenceSuppression, traffic_class: MediaTrafficClass, encryption: Option<MediaEncryption>, wire: Option<StartMediaTransmissionWire>, }, StopMediaTransmission(AudioStreamControl), SubscribeDtmfPayloadRequest(DtmfPayloadRequest), SubscribeDtmfPayloadError(DtmfPayloadIdentity), UnsubscribeDtmfPayloadRequest(DtmfPayloadRequest), UnsubscribeDtmfPayloadError(DtmfPayloadIdentity), SetSpeakerMode(SpeakerMode), SetMicrophoneMode(MicrophoneMode), Reset(ResetType), DisplayText { text: String, }, ClearDisplay, ForwardStatus { line_instance: u32, forward_all: Option<String>, forward_busy: Option<String>, forward_no_answer: Option<String>, }, SpeedDialStatus { instance: u32, number: String, display_name: String, }, DialedNumber { number: String, line_instance: u32, call_reference: u32, }, StartMediaFailureDetection(MediaFailureDetection), UserToDeviceData(UserDataMessage), UserToDeviceDataV1(UserDataV1Message), FeatureStatus { instance: u32, button_type: ButtonType, label: String, state: u32, }, ServiceUrlStatus { index: u32, url: String, label: String, extension_text: String, }, CallSelectStatus { status: u32, call_reference: u32, line_instance: u32, }, PortRequest(PortRequest), PortClose(PortClose), OpenMultimediaChannel(OpenMultimediaChannel), StartMultimediaTransmission(StartMultimediaTransmission), MiscellaneousCommand(MiscellaneousCommand), SubscriptionStatus { transaction_id: u32, feature_id: u32, timer_seconds: u32, cause: SubscriptionCause, }, Notification { transaction_id: u32, feature_id: u32, status: BusyLampFieldState, text: String, }, CallHistoryDisposition { disposition: CallHistoryDisposition, line_instance: u32, call_reference: u32, }, CallCountResponse, RecordingStatus { call_reference: u32, active: bool, }, KnownOpaque(KnownOpaqueMessage), Unknown(RawMessage),
}
Expand description

Typed messages emitted toward a station connection.

Use Self::encode_for_session after registration so both protocol version and negotiated feature bits participate in layout selection. The simpler Self::encode applies version-only selection. User-visible strings can be encoded through the explicit legacy-code-page entry points when required.

Variants§

§

RegisterAck

Fields

§keepalive_seconds: u32
§secondary_keepalive_seconds: u32
§features: PhoneFeatures
§date_template: DateTemplate
§

RegisterReject

Fields

§reason: String
§

KeepAliveAck

§

UnregisterAck

§

CapabilitiesRequest

§

ConfigStatus(ConfigurationStatus)

§

LineStatus

Fields

§instance: u32
§number: String
§display_name: String
§

ButtonTemplate

One canonical chunk of a station’s logical button template.

SCCP reserves 42 definition slots in every frame. offset and total let larger physical layouts, including expansion modules, span frames.

Fields

§offset: u32
§total: u32
§

Version

Fields

§firmware: String
§

ServerResponse

§

TimeDate

Fields

§year: u32
§month: u32
§weekday: u32
§day: u32
§hour: u32
§minute: u32
§second: u32
§milliseconds: u32
§unix_seconds: u32
§

SoftKeyTemplate

Fields

§actions: Vec<SoftKey>
§

SoftKeySet

Fields

§

SelectSoftKeys

Fields

§line_instance: u32
§call_reference: u32
§valid_mask: u32

Bit mask over positions in the selected soft-key set.

§

CallState

Fields

§line_instance: u32
§call_reference: u32
§

CallInfo

Fields

§line_instance: u32
§call_reference: u32
§

DisplayPrompt

Fields

§timeout_seconds: u32
§text: String
§line_instance: u32
§call_reference: u32
§

ClearPrompt

Fields

§line_instance: u32
§call_reference: u32
§

DisplayNotify

Fields

§timeout_seconds: u32
§text: String
§

ClearNotify

§

DisplayPriorityNotify

Fields

§timeout_seconds: u32
§text: String
§

ClearPriorityNotify

Fields

§

NotifyDtmfTone(DtmfToneControl)

§

SendDtmfTone(DtmfToneControl)

§

StartAnnouncement

Fields

§announcements: Vec<AnnouncementEntry>
§end_of_ack: u32
§conference_id: u32
§matrix_conference_party_ids: Vec<u32>
§hearing_conference_party_mask: u32
§play_mode: u32
§

StopAnnouncement

Fields

§conference_id: u32
§

AnnouncementFinish

Fields

§conference_id: u32
§play_status: u32
§

ClearConference

Fields

§conference_id: ConferenceId
§service_number: u32
§

CreateConferenceRequest(CreateConferenceRequest)

§

DeleteConferenceRequest

Fields

§conference_id: ConferenceId
§

ModifyConferenceRequest(ModifyConferenceRequest)

§

AuditConferenceRequest

§

AddParticipantRequest(AddParticipantRequest)

§

DropParticipantRequest

Fields

§conference_id: ConferenceId
§call_reference: CallReference
§

AuditParticipantRequest

Fields

§conference_id: ConferenceId
§

ChangeParticipantRequest(ChangeParticipantRequest)

§

StopMultimediaTransmission(MultimediaStreamControl)

§

FlowControlCommand(VideoFlowControl)

§

CloseMultimediaReceiveChannel(MultimediaStreamControl)

§

VideoDisplayCommand

Fields

§conference_id: ConferenceId
§call_reference: CallReference
§layout_id: u32
§

FlowControlNotify(VideoFlowControl)

§

ActivateCallPlane

Fields

§line_instance: u32
§

DeactivateCallPlane

§

BackspaceResponse

Fields

§line_instance: u32
§call_reference: u32
§

RegisterTokenAck

§

RegisterTokenReject

Fields

§backoff_seconds: u32
§

SetRinger

Fields

§duration: RingDuration
§line_instance: u32
§call_reference: u32
§

SetLamp

Fields

§stimulus: ButtonType
§instance: u32
§

StartTone

Fields

§tone: Tone
§direction: ToneDirection
§line_instance: u32
§call_reference: u32
§

StopTone

Fields

§line_instance: u32
§call_reference: u32
§

StartMulticastMediaReception(MulticastMediaReception)

§

StartMulticastMediaTransmission(MulticastMediaTransmission)

§

StopMulticastMediaReception

Fields

§conference_id: ConferenceId
§passthrough_party_id: PassthroughPartyId
§call_reference: CallReference
§

StopMulticastMediaTransmission

Fields

§conference_id: ConferenceId
§passthrough_party_id: PassthroughPartyId
§call_reference: CallReference
§

OpenReceiveChannel

Fields

§call_reference: u32
§passthrough_party_id: u32
§packet_ms: u32
§codec: Codec
§echo_cancellation: EchoCancellation
§telephone_event_payload: u8

Dynamic RTP payload type used for telephone-event DTMF, or zero for signaling DTMF.

§source_address: IpAddr
§source_port: u16
§wire: Option<OpenReceiveChannelWire>

Exact auxiliary wire fields, or encoder defaults when absent on a runtime-created message.

§

CloseReceiveChannel(AudioStreamControl)

§

ConnectionStatisticsRequest

Fields

§directory_number: String
§call_reference: u32
§

StartMediaTransmission

Fields

§call_reference: u32
§passthrough_party_id: u32
§endpoint: MediaEndpoint
§silence_suppression: SilenceSuppression
§traffic_class: MediaTrafficClass

Full traffic-class octet; configuration DSCP is shifted left by two.

§wire: Option<StartMediaTransmissionWire>

Exact auxiliary wire fields, or encoder defaults when absent on a runtime-created message.

§

StopMediaTransmission(AudioStreamControl)

§

SubscribeDtmfPayloadRequest(DtmfPayloadRequest)

§

SubscribeDtmfPayloadError(DtmfPayloadIdentity)

§

UnsubscribeDtmfPayloadRequest(DtmfPayloadRequest)

§

UnsubscribeDtmfPayloadError(DtmfPayloadIdentity)

§

SetSpeakerMode(SpeakerMode)

§

SetMicrophoneMode(MicrophoneMode)

§

Reset(ResetType)

§

DisplayText

Fields

§text: String
§

ClearDisplay

§

ForwardStatus

Fields

§line_instance: u32
§forward_all: Option<String>
§forward_busy: Option<String>
§forward_no_answer: Option<String>
§

SpeedDialStatus

Fields

§instance: u32
§number: String
§display_name: String
§

DialedNumber

Fields

§number: String
§line_instance: u32
§call_reference: u32
§

StartMediaFailureDetection(MediaFailureDetection)

§

UserToDeviceData(UserDataMessage)

§

UserToDeviceDataV1(UserDataV1Message)

§

FeatureStatus

Fields

§instance: u32
§button_type: ButtonType
§label: String
§state: u32

Feature-specific state word interpreted according to button_type.

§

ServiceUrlStatus

Fields

§index: u32
§label: String
§extension_text: String

Additional dynamic-layout text; empty in layouts that do not carry it.

§

CallSelectStatus

Fields

§status: u32

Selection-state word retained as an extensible numeric value.

§call_reference: u32
§line_instance: u32
§

PortRequest(PortRequest)

§

PortClose(PortClose)

§

OpenMultimediaChannel(OpenMultimediaChannel)

§

StartMultimediaTransmission(StartMultimediaTransmission)

§

MiscellaneousCommand(MiscellaneousCommand)

§

SubscriptionStatus

Fields

§transaction_id: u32
§feature_id: u32
§timer_seconds: u32
§

Notification

Fields

§transaction_id: u32
§feature_id: u32
§text: String
§

CallHistoryDisposition

Fields

§line_instance: u32
§call_reference: u32
§

CallCountResponse

§

RecordingStatus

Fields

§call_reference: u32
§active: bool
§

KnownOpaque(KnownOpaqueMessage)

§

Unknown(RawMessage)

Implementations§

Source§

impl ServerMessage

Source

pub fn decode( frame: Frame, protocol: ProtocolVersion, ) -> Result<Self, CodecError>

Decode a server-to-phone message using the negotiated version for layouts whose frame header is zero or otherwise ambiguous.

Source

pub fn encode(&self, protocol: ProtocolVersion) -> Result<Vec<u8>, CodecError>

Encodes a control-to-station message using version-only layout selection.

When negotiated feature flags also select layouts, use Self::encode_for_session.

Source

pub fn encode_for_session( &self, session: StationSessionContext, ) -> Result<Vec<u8>, CodecError>

Encodes a control-to-station message with complete session layout inputs.

Source

pub fn encode_for_legacy_station( &self, protocol: ProtocolVersion, code_page: LegacyCodePage, ) -> Result<Vec<u8>, CodecError>

Encode station-facing labels in a legacy single-byte code page.

Version-only layout selection is used. See Self::encode_for_legacy_session when feature flags also matter.

Source

pub fn encode_for_legacy_session( &self, session: StationSessionContext, code_page: LegacyCodePage, ) -> Result<Vec<u8>, CodecError>

Encodes a station message with session-aware layout selection and a legacy single-byte code page for user-visible labels.

Trait Implementations§

Source§

impl Clone for ServerMessage

Source§

fn clone(&self) -> ServerMessage

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 ServerMessage

Source§

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

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

impl Eq for ServerMessage

Source§

impl PartialEq for ServerMessage

Source§

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

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

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

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for ServerMessage

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<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

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.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more