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.
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/AST_CRON_audio_2_compress.pl --MP3
Deleting Vicidial Recordings:
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
59 23 * * * /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.
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
59 23 * * * /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
59 23 * * * /usr/bin/find /var/spool/asterisk/monitorDONE/ORIG -maxdepth 2 -type f -mtime +30 -print | xargs rm -f
Conclusion:
Its always recommended to store the recordings in the remote FTP servers, vicidial scripts supports automate the Recordings storage in FTP servers
vicidial autodelete old recordings.