How to automatically delete old recordings in vicidial

Deleting the Call Recordings in Vicidial either automatic or manually

Topic: How to automatically delete the old recordings in vicidial ,which is older than x number of days.

vicidial recordings auto delete

  Overview: Vicidial Recordings

    Vicidial is an enterprise class, open source, contact center suite in use by many large call centers around the world. VICIdial has a full featured predictive dialer.  It is capable of inbound, outbound, and blended phone call handling. 

Vicidial Supports Live call recordings which is stored in disk under /var/spool/asterisk/monitorDONE folder/directory.

The Recording folder further categorized with subfolders like

MP3  - stores the Recordings in mp3 format

GSM  - store the recordings in gsm format

GSW - stores the recordings in gsw format

GPG  - Store the encrypted Recordings files.

ORIG - stores the default recordings in wav format,kind of backups

note: by default the recordings are initially captured in wav format,further based on vicidial cronjob entry the files are converted and stored in respective folders.

the script which converts the file to specific format.

/usr/share/astguiclient/ --MP3

  Deleting Vicidial  Recordings:

   The vicidial recordings over a period consumes disk space, which leads to vicidial in-operative like shortage of disk space,mysql database crash .
Below are the commands you run manually or schedule with cronjob to delete the recordings in bulk keeping the latest recordings files of x no of days.

   Deleting MP3 Recordings

 If you are using MP3 Format of recordings in vicidial , Run the below command  to delete recordings which are 30 days old 

find /var/spool/asterisk/monitorDONE/MP3 -maxdepth 2 -type f -mtime +30 -print | xargs rm -vf

note : mtime +30 will delete files older than 30 days, if you want to delete older than 7 days that is keep past 7 days file then type mtime +7
 If you want the system to automatically delete the recordings which are 30 days old (eg last month recordings)
Enter the Below Line in your crontab,  type crontab -e  to enter to the cronjob file and paste at firt line.
This will run the command every day 23:59 and delete files which are 30 days old.

23 59 * * * /usr/bin/find /var/spool/asterisk/monitorDONE/MP3 -maxdepth 2 -type f -mtime +65 -print | xargs rm -f

Note: mtime +30 , modify this as per your requirement.if you want to delete 60 days then enter mtime +60.

   Deleting GSM Recordings:

For deleting the GSM format recordings files, run the below command at linux console.

/usr/bin/find /var/spool/asterisk/monitorDONE/GSM -maxdepth 2 -type f -mtime +30 -print | xargs rm -vf

For automatically deleting the GSM recordings copy paste the below command in cronjob,  type crontab -e to enter to the cronjob file and paste it at first line

23 59 * * * /usr/bin/find /var/spool/asterisk/monitorDONE/GSM -maxdepth 2 -type f -mtime +30 -print | xargs rm -f

   Deleting  WAV Recordings in ORIG folder:

For  Manual delete type the below command at linux console

/usr/bin/find /var/spool/asterisk/monitorDONE/ORIG -maxdepth 2 -type f -mtime +30 -print | xargs rm -vf

For automatic delete enter the below command in cronjob

23 59 * * * /usr/bin/find /var/spool/asterisk/monitorDONE/ORIG -maxdepth 2 -type f -mtime +30 -print | xargs rm -f


Its always recommended to store the recordings in the remote FTP servers, vicidial scripts supports automate the Recordings storage in FTP servers

Next Post Previous Post
  • gopi baskar
    gopi baskar April 4, 2022 at 10:26 AM

    vicidial autodelete old recordings.

Add Comment
comment url