Knowledge is Power

CallCabinet Knowledge Base Articles
  1. Home
  2. Knowledge Base
  3. Asterisk
  4. Setting up Asterisk post recording script

Setting up Asterisk post recording script

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

  1. 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.
  2. 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.
  3. 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)}
  4. 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

 

The owner of this website has made a commitment to accessibility and inclusion, please report any problems that you encounter using the contact form on this website. This site uses the WP ADA Compliance Check plugin to enhance accessibility.