1 (800) 653-1389

Setting up FreePBX post recording script

In order for FreePBX to rename and move the call recording, the built in variable MIXMON_POST in FreePBX is set (either in the GUI or the Global file) and pointed to the moverecfreepbx.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 moverecfreepbx.sh file (download here).
  2. Edit the CCSTAGING variable in the moverec.sh file to point to the location that the Atmos module is installed in, by default it is set to: /home/callcabinet.
  3. In the asterisk dialplan (extensions_addtional.conf), define the post-recording action as follows:
    MIXMON_POST = /usr/share/asterisk/agi-bin/moverecfreepbx.sh ^{MIXMONITOR_FILENAME}
    "^{AMPUSER}" "^{CALLERID(number)}" "^{CDR(dst)}" ^{CDR(start)} "^{CDR(src)}"

    Alternatively the variables can be set under in the FreePBX GUI under settings > advanced settings > Post Call Recording Script

    Note that you might need to enable the following before the “Post Call Recording Script” will show up under advanced settings:
    Display Readonly Settings True
    Override Readonly Settings True


4. Update your CCconfig.txt configuration file with the following setting; set repository to “/home/callcabinet/recordings/” and enable tree support “Treesupport:<yes>”

5. Make a test call and confirm that calls are being successfully renamed and placed in the location specified in point 2.

Additional information:

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


© Copyright 2016 Call Cabinet Corporation.   All rights reserved.   Terms and Conditions

Website designed by Druff Interactive