Commit 0b7c9a2b authored by Johannes Barthel's avatar Johannes Barthel
Browse files

configurable nickname

parent 3972dee3
......@@ -250,7 +250,7 @@ checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b"
[[package]]
name = "freeswitch-watchdog"
version = "0.1.3"
version = "0.1.4"
dependencies = [
"anyhow",
"reqwest",
......@@ -1047,8 +1047,8 @@ dependencies = [
[[package]]
name = "senfi"
version = "0.1.7"
source = "git+https://gitlab.senfcall.de/senfcall-public/senfi?tag=v0.1.7#ec2b415920f50e1f661f98d4ca4591f22fbc6a0c"
version = "0.1.9"
source = "git+https://gitlab.senfcall.de/senfcall-public/senfi.git?tag=v0.1.9#3159b1cd117a471fa49853b3a3b2e8a1aec2f44e"
dependencies = [
"ansi_term 0.12.1",
"anyhow",
......
......@@ -8,7 +8,7 @@ license = "MIT OR Apache-2.0"
[dependencies]
reqwest = { version = "0.10", features = ["blocking"] }
anyhow = "1.0.31"
senfi = { git = "https://gitlab.senfcall.de/senfcall-public/senfi.git", tag="v0.1.7" }
senfi = { git = "https://gitlab.senfcall.de/senfcall-public/senfi.git", tag="v0.1.9" }
tokio = {features = ["full"], version = "0.2.18"}
[package.metadata.deb]
......
use anyhow::{Context, Result};
use bbb_api::BbbApi;
use anyhow::Result;
use std::sync::mpsc::{channel, Receiver, Sender};
use tokio::runtime::Runtime;
fn chatbot(recv: Receiver<()>) -> Result<()> {
let api = bbb_api::BbbApi::from_bbbconf()?;
let mut api = bbb_api::BbbApi::from_bbbconf()?;
let message: String = std::env::var("FREESWITCH_WATCHDOG_CHAT_MESSAGE").unwrap_or("A technical problem has occured. Please wait two minutes and then rejoin audio (telephone icon). We are sorry for the inconvenience.".to_owned());
api.set_bot_nickname(
&std::env::var("FREESWITCH_WATCHDOG_BOT_NICKNAME").unwrap_or("system".to_owned())
);
let mut runtime = Runtime::new()?;
loop {
recv.recv()?;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment