#[non_exhaustive]pub enum CallEvent {
Show 14 variants
Ringing {
reliable: bool,
},
EarlyMediaStarted,
Answered,
Dtmf {
digit: Digit,
duration: Duration,
},
PlaybackFinished {
playback: PlaybackId,
completed: bool,
},
RecordingFinished {
duration: Duration,
},
TransferRequested {
target: Uri,
attended: bool,
},
TransferProgress(TransferState),
Hold,
Resumed,
Muted,
Unmuted,
ApplicationRequest(ApplicationRequest),
Ended(EndCause),
}Expand description
Something that happened to a call, in the order it happened.
Carries what docs/specs/app-contract.md §5.3 needs
as the “extra fields” of its wire event of the same shape; building the full per-event call
snapshot from a Call’s other state is the interpreter’s job (C-5), not this enum’s.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Ringing
A provisional response was sent or received (RFC 3262), other than a bare 100 Trying —
which acknowledges only that a request arrived, not that anything is ringing.
Fields
EarlyMediaStarted
A provisional answer completed offer/answer and the early dialog’s media session is now running (RFC 3960 section 3.2).
Emitted after the session starts and before Self::Answered, exactly once. This is the
signal an application uses to stop a locally generated ringing tone and render what the
far end is sending instead. A provisional that carries no usable reliable answer never
emits it.
Answered
The 2xx/ACK exchange completed. Media may flow.
Dtmf
A telephone-event run ended: one full keypress (RFC 4733).
Fields
PlaybackFinished
A playback ran out, or was cut short.
Emitted by Call::play and by
Call::start_playback — every playback either call starts
resolves here exactly once, whether it ran out, was stopped, was interrupted by a keypress,
or was cut off by the call ending (M-17).
Fields
playback: PlaybackIdWhich playback. Clips queue, so a call may have several outstanding at once and “a playback finished” on its own does not say which one to move on from.
RecordingFinished
A recording resolved.
Emitted by Call::record_until_idle and
Call::record_at_least, whichever ended the recording.
Fields
TransferRequested
The far end asked to transfer this call here (RFC 3515 REFER).
Fields
TransferProgress(TransferState)
A transfer this side asked for moved on (RFC 3515 NOTIFY).
Hold
The far end put the call on hold.
Resumed
The far end took the call off hold.
Muted
This side gated its own outbound audio (Call::mute).
A local decision, not a signalled one: unlike Self::Hold this reports something this
side did, and the far end was told nothing about it. It is emitted only on a transition —
muting a call that is already muted is not something that happened.
The contract’s own vocabulary has no wire event for this, deliberately
(docs/specs/app-contract.md §5.3 — mute is an
instruction that completes immediately). What a remote app sees is media.muted on the
next snapshot (§5.2). This variant is what lets the interpreter build that snapshot from a
push rather than by polling the call.
Unmuted
This side let its outbound audio through again (Call::unmute).
ApplicationRequest(ApplicationRequest)
An application-owned method arrived inside this dialog.
INFO and MESSAGE are admitted directly. A private extension token appears here only after
Call::admit_dialog_method admitted it. The owned
value must be answered or dropped; either outcome resolves its server transaction.
Ended(EndCause)
The call is over. Always the last event on the stream — the channel’s delivery policy reserves a slot for it specifically so this is never the one an overflow drops.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for CallEvent
impl !RefUnwindSafe for CallEvent
impl Send for CallEvent
impl Sync for CallEvent
impl Unpin for CallEvent
impl UnsafeUnpin for CallEvent
impl !UnwindSafe for CallEvent
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more