You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
vmnotify/recnotify

27 lines
700 B

#!/bin/bash
# Wrapper script to trigger transcription from an rtpengine recording
################################################################################
set -e
set -u
set -o pipefail
if [ "$#" -lt 2 ]; then
echo "Usage: $0 <file name> <DB ID>"
exit 1
fi
FILENAME="$1"
DB_ID="$2"
ENC_DB_ID="$(echo "$DB_ID" | jq -R)"
if [ -n "$FILENAME" ] && [ -f "$FILENAME" ]; then
ENC_FILENAME="$(echo "$FILENAME" | jq -R)"
exec ngcp-invoke-task --task transcribe_rtpengine_file_recording --dst localhost --data \
"{\"filename\":$ENC_FILENAME, \"db_id\":$ENC_DB_ID}"
fi
exec ngcp-invoke-task --task transcribe_rtpengine_db_recording --dst localhost --data \
"{\"db_id\":$ENC_DB_ID}"