pub enum Command {
Show 17 variants
Invite {
option: CallOption,
},
Accept {
option: CallOption,
},
Reject {
reason: String,
code: Option<u32>,
},
Ringing {
recorder: Option<RecorderOption>,
early_media: Option<bool>,
ringtone: Option<String>,
},
Tts {
text: String,
speaker: Option<String>,
play_id: Option<String>,
auto_hangup: Option<bool>,
streaming: Option<bool>,
end_of_stream: Option<bool>,
option: Option<SynthesisOption>,
wait_input_timeout: Option<u32>,
base64: Option<bool>,
cache_key: Option<String>,
},
Play {
url: String,
play_id: Option<String>,
auto_hangup: Option<bool>,
wait_input_timeout: Option<u32>,
offset_ms: Option<u32>,
},
Interrupt {
graceful: Option<bool>,
fade_out_ms: Option<u32>,
},
Pause {},
Resume {},
Hangup {
reason: Option<String>,
initiator: Option<String>,
headers: Option<HashMap<String, String>>,
refer: Option<bool>,
},
Refer {
caller: String,
callee: String,
options: Option<ReferOption>,
},
Bridge {
target_session_id: String,
},
Unbridge {
target_session_id: String,
},
Mute {
track_id: Option<String>,
},
Unmute {
track_id: Option<String>,
},
History {
speaker: String,
text: String,
},
Custom {
sender: Option<String>,
data: Value,
},
}Variants§
Invite
Fields
§
option: CallOptionAccept
Fields
§
option: CallOptionReject
Ringing
Tts
Fields
§
auto_hangup: Option<bool>If auto_hangup is true, it means the call will be hung up automatically after the TTS playback is finished
§
streaming: Option<bool>If streaming is true, it means the input text is streaming text, and end_of_stream needs to be used to determine if it’s finished, equivalent to LLM’s streaming output to TTS synthesis
§
option: Option<SynthesisOption>Play
Fields
Interrupt
Pause
Resume
Hangup
Fields
Refer
Fields
§
options: Option<ReferOption>Bridge
Bridge audio with another established call. This creates separate bridge tracks for the two sessions and patches audio bidirectionally. It does not replace the server-side track and does not control hangup; each call keeps its own session/event flow.
Unbridge
Remove audio bridge tracks with another established call.
Mute
Unmute
History
Custom
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Command
impl<'de> Deserialize<'de> for Command
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
Auto Trait Implementations§
impl Freeze for Command
impl RefUnwindSafe for Command
impl Send for Command
impl Sync for Command
impl Unpin for Command
impl UnsafeUnpin for Command
impl UnwindSafe for Command
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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<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