In order for Asterisk to rename and move the call recording, the built in variable MIXMON_POST in Asterisk is set (either in the GUI or the Global file) and pointed to the moverec.sh file, this script will move the call post processing and rename it to the following format <Number>_<DateTime>_<Ext>_<Duration>_<Direction>.WAV.
Installation Steps
- Download the sample moverec.sh file https://www.callcabinet.com/Downloads/AtmosModule/moverec.sh – QueueMetrics users please download here https://www.callcabinet.com/Downloads/AtmosModule/Queuemetrics/moverecfreepbx.sh.
- Edit the CCSTAGING variable in the moverec.sh file to point to the location that the CallCabinet module is installed in, by default it is set to: /home/callcabinet.
- In the asterisk dialplan, define the post-recording action as follows:
MIXMON_POST = /usr/share/asterisk/agi-bin/moverec.sh ^{MIXMONITOR_FILENAME} "^{AMPUSER}" "^{CALLERID(number)}" "^{CDR(dst)}" ^{CDR(start)}
- Make a test call and confirm that calls are being successfully renamed and placed in the location specified in point 2.
Additional information:
VARIABLE DEFENITIONS
====================
moverec.sh => script name that will handle the renaming
{MIXMONITOR_FILENAME} => filename of the recording (populated by Asterisk)
{AMPUSER} => user extension (dependent on the Asterisk distro being used…this is the FreePBX version)
{CALLERID(number)} => caller-id will be replaced at call time
{CDR(dst)} => dialed number, will be replaced at call time
{CDR(start)} => start time of the call, will be replaced at call time