diff --git a/src/dp_tools.rs b/src/dp_tools.rs index a9ad072..06afbcd 100644 --- a/src/dp_tools.rs +++ b/src/dp_tools.rs @@ -12,12 +12,12 @@ impl EslConnection { pub async fn playback(&self, file_path: &str) -> Result { self.execute(PLAYBACK_APP, file_path).await } - + /// record_session during outbound mode pub async fn record_session(&self, file_path: &str) -> Result { self.execute("record_session", file_path).await } - + /// send dtmf during outbound mode pub async fn send_dtmf(&self, dtmf_str: &str) -> Result { self.execute("send_dtmf", dtmf_str).await @@ -29,22 +29,21 @@ impl EslConnection { } /// sleep for specified milliseconds in outbound mode - pub async fn sleep(&self, millis: i128) -> Result { + pub async fn sleep(&self, millis: u32) -> Result { self.execute("sleep", &millis.to_string()).await } - ///set a channel variable + ///set a channel variable pub async fn set_variable(&self, var: &str, value: &str) -> Result { let args = format!("{}={}", var, value); self.execute("set", &args).await } - + ///add a freeswitch log pub async fn fs_log(&self, loglevel: &str, msg: &str) -> Result { let args = format!("{} {}", loglevel, msg); self.execute("log", &args).await } - #[allow(clippy::too_many_arguments)] /// Used for mod_play_and_get_digits