- fix setup script & config

This commit is contained in:
Dmytro Bogovych 2023-08-10 09:04:48 +03:00
parent 9c0c2fd817
commit b814b54acb
3 changed files with 26 additions and 74 deletions

View File

@ -1,11 +1,11 @@
# Backend URL
backend: http://89.184.187.247:8080
backend: BACKEND
# Phone / instance name
name:
name: PHONE_NAME
# Task name used to answer calls. Required for answerers only.
task:
task: TASK_NAME
# Exit from script after number of calls. Usually systemd restarts script after.
task_limit: 1
@ -16,12 +16,24 @@ force_task: no
# Use lite speech_detector instead of silence_eraser
speech_detector: yes
# Reboot the phone on start
reboot_on_start: no
# adb watchdog check interval
phone_watchdog_interval: 180
# RabbitMQ related settings
rabbitmq:
url:
exchange:
queue:
audio:
# Audio device used to play audio
play_device: "hw:2,0"
play_device: "auto"
# Audio device used to record audio
record_device: "hw:2,0"
record_device: "auto"
# Use native audio utilities from alsa-utils package instead of PyAudio based implementation
ALSA: yes
@ -29,8 +41,12 @@ audio:
# Use samplerate
samplerate: 48000
# Silence prefix & suffix lengths (in seconds)
silence_prefix: 30
silence_suffix: 30
bluetooth: no
bluetooth_mac: ""
bluetooth_mac: "MAC_ADDRESS"
log:
# Log file path (otherwise log will be sent to syslog)

View File

@ -1,64 +0,0 @@
# Backend URL
backend: $BACKEND
# Phone / instance name
name: $PHONE_NAME
# Task name used to answer calls. Required for answerers only.
task: $TASK_NAME
# Exit from script after number of calls. Usually systemd restarts script after.
task_limit: 1
# Should we force first task in the list ? It will run immediately
force_task: no
# Use lite speech_detector instead of silence_eraser
speech_detector: yes
# Reboot the phone on start
reboot_on_start: no
# adb watchdog check interval
phone_watchdog_interval: 180
# RabbitMQ related settings
rabbitmq:
url:
exchange:
queue:
audio:
# Audio device used to play audio
play_device: "auto"
# Audio device used to record audio
record_device: "auto"
# Use native audio utilities from alsa-utils package instead of PyAudio based implementation
ALSA: yes
# Use samplerate
samplerate: 48000
# Silence prefix & suffix lengths (in seconds)
silence_prefix: 30
silence_suffix: 30
# Should we start play with call established notification ? This is actual for caller nodes only
wait_for_notify: no
log:
# Log file path (otherwise log will be sent to syslog)
path:
# Verbose logging
verbose: yes
# Log ADB output
adb: yes
# Upload full audio recordings
audio: yes

View File

@ -28,18 +28,18 @@ read -p "Please specify phone name (ex: moto_1): " PHONE_NAME
read -p "Please specify expected task name (if this is answerer phone):" TASK_NAME
# Get a copy of config file from redist
cp config/agent.in.yaml config/config.yaml
cp config/agent.in.yaml config/agent.yaml
# Replace the values
if [[ $BACKEND_URL != "" ]]; then
sed -i "s/BACKEND_URL/$BACKEND_URL/" config/config.yaml
sed -i "s/BACKEND_URL/$BACKEND_URL/" config/agent.yaml
fi
if [[ $PHONE_NAME != "" ]]; then
sed -i "s/PHONE_NAME/$PHONE_NAME/" config/config.yaml
sed -i "s/PHONE_NAME/$PHONE_NAME/" config/agent.yaml
fi
sed -i "s/TASK_NAME/$TASK_NAME/" config/config.yaml
sed -i "s/TASK_NAME/$TASK_NAME/" config/agent.yaml
# Update systemD unit file
cp config/systemd/agent_gsm.in.service config/systemd/agent_gsm.service