pub enum SessionEvent {
Show 31 variants
Incoming {
track_id: String,
timestamp: u64,
caller: String,
callee: String,
sdp: String,
headers: Option<HashMap<String, String>>,
},
Answer {
track_id: String,
timestamp: u64,
sdp: String,
refer: Option<bool>,
},
MediaReady {
track_id: String,
timestamp: u64,
},
Reject {
track_id: String,
timestamp: u64,
reason: String,
refer: Option<bool>,
code: Option<u32>,
},
Ringing {
track_id: String,
timestamp: u64,
early_media: bool,
refer: Option<bool>,
},
Hangup {
track_id: String,
timestamp: u64,
reason: Option<String>,
initiator: Option<String>,
start_time: String,
hangup_time: String,
answer_time: Option<String>,
ringing_time: Option<String>,
from: Option<Attendee>,
to: Option<Attendee>,
extra: Option<HashMap<String, Value>>,
refer: Option<bool>,
},
AnswerMachineDetection {
track_id: String,
timestamp: u64,
start_time: u64,
end_time: u64,
text: String,
},
Interrupt {
receiver: Option<String>,
},
FunctionCall {
track_id: String,
call_id: String,
name: String,
arguments: String,
timestamp: u64,
},
Speaking {
track_id: String,
timestamp: u64,
start_time: u64,
is_filler: Option<bool>,
confidence: Option<f32>,
refer: Option<bool>,
},
Silence {
track_id: String,
timestamp: u64,
start_time: u64,
duration: u64,
refer: Option<bool>,
samples: Option<PcmBuf>,
},
Eou {
track_id: String,
timestamp: u64,
completed: bool,
interrupt_point: Option<String>,
text: Option<String>,
refer: Option<bool>,
},
RtpTimeout {
track_id: String,
timestamp: u64,
timeout: u64,
},
Inactivity {
track_id: String,
timestamp: u64,
},
Dtmf {
track_id: String,
timestamp: u64,
digit: String,
refer: Option<bool>,
},
Hold {
track_id: String,
timestamp: u64,
on_hold: bool,
refer: Option<bool>,
},
TransferRequest {
track_id: String,
timestamp: u64,
refer_to: String,
referred_by: Option<String>,
refer: Option<bool>,
extra_headers: Option<HashMap<String, String>>,
leg_session_id: Option<String>,
notify: Option<Arc<ReferProgressNotifier>>,
},
Message {
track_id: String,
timestamp: u64,
body: String,
content_type: Option<String>,
refer: Option<bool>,
},
TrackStart {
track_id: String,
timestamp: u64,
play_id: Option<String>,
},
TrackEnd {
track_id: String,
timestamp: u64,
duration: u64,
ssrc: u32,
play_id: Option<String>,
auto_hangup: Option<CallRecordHangupReason>,
},
Interruption {
track_id: String,
timestamp: u64,
play_id: Option<String>,
subtitle: Option<String>,
position: Option<u32>,
total_duration: u32,
current: u32,
},
AsrFinal {
track_id: String,
timestamp: u64,
index: u32,
start_time: Option<u64>,
end_time: Option<u64>,
text: String,
is_filler: Option<bool>,
confidence: Option<f32>,
task_id: Option<String>,
refer: Option<bool>,
},
AsrDelta {
track_id: String,
index: u32,
timestamp: u64,
start_time: Option<u64>,
end_time: Option<u64>,
text: String,
is_filler: Option<bool>,
confidence: Option<f32>,
task_id: Option<String>,
refer: Option<bool>,
},
Metrics {
timestamp: u64,
key: String,
duration: u32,
data: Value,
},
Error {
track_id: String,
timestamp: u64,
sender: String,
error: String,
code: Option<u32>,
},
AddHistory {
sender: Option<String>,
timestamp: u64,
speaker: String,
text: String,
},
Other {
track_id: String,
timestamp: u64,
sender: String,
extra: Option<HashMap<String, String>>,
},
Binary {
track_id: String,
timestamp: u64,
data: Vec<u8>,
},
Ping {
timestamp: u64,
payload: Option<String>,
},
Custom {
timestamp: u64,
sender: Option<String>,
data: Value,
},
RingbackState {
track_id: String,
timestamp: u64,
state: String,
state_index: u32,
confidence: f32,
prev_state: Option<String>,
prev_confidence: Option<f32>,
refer: Option<bool>,
is_final: bool,
},
}Variants§
Incoming
Fields
Answer
MediaReady
Reject
Ringing
Hangup
Fields
AnswerMachineDetection
Interrupt
FunctionCall
Speaking
Fields
Silence
Fields
Eou
End of Utterance
Fields
RtpTimeout
Incoming RTC media stopped; informational only, never hangs up the call.
Inactivity
Inactivity timeout
Dtmf
Hold
TransferRequest
Fields
§
extra_headers: Option<HashMap<String, String>>Custom (Header::Other) headers received on the REFER, blindly
forwarded onto the transfer INVITE (e.g. User-to-User,
X-ACC-Bizdata, X-AliyunIVR-*). Protocol headers (Via, Route,
Call-ID, …) are typed and never included.
§
leg_session_id: Option<String>Session id of the leg that received the REFER (the ref call id for refer bridge legs). Lets the actor tell the current INVITE-mode bridge leg apart from other refer legs.
§
notify: Option<Arc<ReferProgressNotifier>>RFC 3515 implicit-subscription notifier for the REFER’s parent dialog; used to report transfer progress back to the referrer.
Message
Fields
TrackStart
TrackEnd
Fields
§
auto_hangup: Option<CallRecordHangupReason>Hangup intent carried by the track itself; when set, the call should hang up with this reason once the track ends.
Interruption
Fields
AsrFinal
Fields
AsrDelta
Fields
Metrics
Error
AddHistory
Other
Binary
Ping
Custom
RingbackState
Fields
Trait Implementations§
Source§impl Clone for SessionEvent
impl Clone for SessionEvent
Source§impl Debug for SessionEvent
impl Debug for SessionEvent
Source§impl<'de> Deserialize<'de> for SessionEvent
impl<'de> Deserialize<'de> for SessionEvent
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for SessionEvent
impl Display for SessionEvent
Auto Trait Implementations§
impl !RefUnwindSafe for SessionEvent
impl !UnwindSafe for SessionEvent
impl Freeze for SessionEvent
impl Send for SessionEvent
impl Sync for SessionEvent
impl Unpin for SessionEvent
impl UnsafeUnpin for SessionEvent
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
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<T> CloneAny for T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
impl<S, T> Duplex<S> for Twhere
T: FromSample<S> + ToSample<S>,
Source§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§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> ⓘ
Converts
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> ⓘ
Converts
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