Euphoria telecoms recording downloading

The Euphoria telecoms requires a API Key to download the recordings from their platform.
Our recording software uses the “get extension” function to download a list of the extensions to download. Then you enable the extensions for download in the INI file.

Default location is
/opt/datatex/euphoria
euphoriabe.ini contains the list of users found via the get extensions function.

[EXTENSIONS]
0=UNKNOWN
1011=Leon|
1012=Belinda|1

The “1” indicates that the extension should be downloaded.

The next time this Batch Engine runs, it will download all the files for the extensions marked with a “1” and process them for Amethyst.
Every time the downloads scripts runs it will check the INI files for the “DOWNLOAD DATE” value to see from where it has to start.

Update the list of extensions available on Euphoria
This script connects to Euphoria and downloads the latest list of extensions and configure the euphoriabe.ini with all these extensions as recorded extensions.
getextensions.sh

The command in the script:
./euphoriabe -getextensions

Prepare the files list to be downloaded:
This script downloads all the call metadata (call records) for all the extensions that are configured with a “1” for recording.
The DTA, REC and RECORDING files are downloaded to the work folder.
The WAV and CSV files are downloaded to the callrecordinghistory/<date>/ folder.
The WAV file will be renamed to the Datatex recording refernece format.
preparefiles.sh

The command inside the script is:
/usr/bin/run-one ./euphoriabe -downloadrecordings

Download the files:
This script downloads all the and converts them to ZLB files.
processfiles.sh

The command inside the script is:
/usr/bin/run-one ./dtxrecordings

Downloading historic data:
Recommended to create a separate folder to download the files. This works like the PrepareFiles script, but can download historic data.

  • Place the euphoriabe and the INI file in this folder.
  • Remove all the extensions from the INI file that you do not want to process to speed up the processing.
  • Copy the iniyearfiles as well as the callrecordingdata folders to the new folder. This contains the last recording processed per extension per date. This prevents duplicate downloads.
  • Create a script to download a date range from euphoria:
#!/bin/bash
BASE=/opt/datatex/euphoria_historic
LOGLOC=$BASE/logs/`/usr/local/bin/logdate`/
LOG=$LOGLOC/euphoria.log
FROMDATE=20220501
TODATE=20220502
export TEMP=$BASE/temp
cd $BASE
mkdir -p $LOGLOC $TEMP $BASE/success $BASE/failed
echo "`/usr/local/bin/logdate -l` Start processing $INFOLDER" >> $LOG
cd $BASE
/usr/bin/run-one ./euphoriabe -downloadhistoricdata $FROMDATE $TODATE >> $LOG
echo "`/usr/local/bin/logdate -l` Stop processing $INFOLDER" >> $LOG
  • You need to specify the STARTDATE and TODATE.
  • The date format is yyyymmdd
  • Change the SERVERID to have an different ID than the live server, to prevent duplicate recording references.