Skip to content

HOWTO Call Center Logging

Call centers have a requirement for logging of screen captures and audio during a session.

The call center applications may have limited functionality or complex setup requirements.

IGEL OS can be configured to capture the audio and screen shots outside of the call center applications.



Applications to setup

  • Audio: Pipewire pw-cat built into IGEL OS 12
  • Screen Shot Tool: scrot via IGEL Community GitHub App Recipe scrot
  • Compress Audio WAV file: ffmpeg via IGEL Community GitHub App Recipe ffmpeg


Call Center Logging Script

Example script that can be started as part of the call center application start-up. For this example, the script is run with native Cisco Webex client. IGEL Community on GitHub App Recipe Webex

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
#!/bin/bash
#set -x
#trap read debug

#
# call-center-logging.sh
#
# Record audio pw-cat
# Screen captures at x seconds

#
# Applications used
#
# pw-cat - pipewire built into IGEL OS12
# scrot - screen shot tools - App Creator Recipe on GitHub
# ffmpeg - compress audio wav files into mp3 - App Creator Recipe on GitHub
#

FILE_PATH=/tmp/$(hostname)_$(date +%y%m%d%H%M%S)
AUDIO_FILE=$(hostname)_$(date +%y%m%d%H%M%S)
SCROT_BASENAME=$(hostname)
SCROT_QUALITY=1
SCREENSHOT_SLEEP=10
# Reduce audio file size by changing sample rate from 48000 to 6000
SAMPLE_RATE=6000
VOLUME=1.5
# Name of the process to check
# Cisco Webex
PROCESS_NAME="CiscoCollabHost"

# No changes needed below this line

# create folder
if [ ! -d ${FILE_PATH} ]; then
  mkdir -p ${FILE_PATH}
fi

cd ${FILE_PATH}

# start audio recording
pw-cat --record --rate=${SAMPLE_RATE} --volume=${VOLUME} ${AUDIO_FILE}.wav &

# take first screen shot and sleep
# scrot has settings to reduce image size - q num (1-100)
scrot -q ${SCROT_QUALITY} ${SCROT_BASENAME}_$(date +%y%m%d%H%M%S).png
sleep ${SCREENSHOT_SLEEP}

# Loop until the process is no longer running
while pgrep -x "$PROCESS_NAME" > /dev/null; do
  scrot -q ${SCROT_QUALITY} ${SCROT_BASENAME}_$(date +%y%m%d%H%M%S).png
  #echo "Press [CTRL+C] to stop.."
  sleep ${SCREENSHOT_SLEEP}
done

# Stop the pw-cat audio recording
pkill pw-cat

# Compress and remove WAV file
ffmpeg -i ${AUDIO_FILE}.wav ${AUDIO_FILE}.mp3
rm ${AUDIO_FILE}.wav

# zip up the session
zip -r /tmp/call_center_recording_$(hostname)_$(date +%y%m%d%H%M%S).zip ${FILE_PATH}
cd /tmp
rm -rf ${FILE_PATH}


Items left to work on



Steps to view / play files

  • To play the audio file:
1
pw-cat -p *.mp3
  • To view all images:
1
gpicview *.png