pub struct EslConnection { /* private fields */ }
Expand description
contains Esl connection with freeswitch
Implementations§
Source§impl EslConnection
impl EslConnection
Sourcepub async fn disconnect(self) -> Result<(), EslError>
pub async fn disconnect(self) -> Result<(), EslError>
disconnects from freeswitch
Sourcepub async fn send_recv(&self, item: &[u8]) -> Result<Event, EslError>
pub async fn send_recv(&self, item: &[u8]) -> Result<Event, EslError>
sends raw message to freeswitch and receives reply
Sourcepub async fn subscribe(&self, events: Vec<&str>) -> Result<Event, EslError>
pub async fn subscribe(&self, events: Vec<&str>) -> Result<Event, EslError>
subscribes to given events
Sourcepub async fn hangup(&self, reason: &str) -> Result<Event, EslError>
pub async fn hangup(&self, reason: &str) -> Result<Event, EslError>
For hanging up call in outbound mode
Sourcepub async fn execute(
&self,
app_name: &str,
app_args: &str,
) -> Result<Event, EslError>
pub async fn execute( &self, app_name: &str, app_args: &str, ) -> Result<Event, EslError>
executes application in freeswitch
Source§impl EslConnection
impl EslConnection
Sourcepub async fn playback(&self, file_path: &str) -> Result<Event, EslError>
pub async fn playback(&self, file_path: &str) -> Result<Event, EslError>
plays file in call during outbound mode
Sourcepub async fn record_session(&self, file_path: &str) -> Result<Event, EslError>
pub async fn record_session(&self, file_path: &str) -> Result<Event, EslError>
record_session during outbound mode
Sourcepub async fn send_dtmf(&self, dtmf_str: &str) -> Result<Event, EslError>
pub async fn send_dtmf(&self, dtmf_str: &str) -> Result<Event, EslError>
send dtmf during outbound mode
Sourcepub async fn wait_for_silence(
&self,
silence_str: &str,
) -> Result<Event, EslError>
pub async fn wait_for_silence( &self, silence_str: &str, ) -> Result<Event, EslError>
wait for silence during outbound mode
Sourcepub async fn sleep(&self, millis: u32) -> Result<Event, EslError>
pub async fn sleep(&self, millis: u32) -> Result<Event, EslError>
sleep for specified milliseconds in outbound mode
Sourcepub async fn set_variable(
&self,
var: &str,
value: &str,
) -> Result<Event, EslError>
pub async fn set_variable( &self, var: &str, value: &str, ) -> Result<Event, EslError>
set a channel variable
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for EslConnection
impl !RefUnwindSafe for EslConnection
impl Send for EslConnection
impl Sync for EslConnection
impl Unpin for EslConnection
impl !UnwindSafe for EslConnection
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