auto delete call recordings

All installation and configuration problems and questions

Moderators: gerski, enjay, williamconley, Op3r, Staydog, gardo, mflorell, MJCoate, mcargile, Kumba, Michael_N

auto delete call recordings

Postby justinmoodley3 » Wed Jan 13, 2021 7:28 am

afternoon Gents

i got a question ,how do i set my call recordings to auto del every 30- 60 days

Kind regards
Justin

VERSION: 2.14-611c BUILD: 200909-0952
justinmoodley3
 
Posts: 24
Joined: Thu Dec 03, 2020 8:34 am

Re: auto delete call recordings

Postby williamconley » Thu Jan 14, 2021 6:46 pm

Vicidial's crontab -e list already has some of this.

You want to delete these files Original WAV files nightly, all of them, since they are redundant once the MP3s are created:

Code: Select all
/var/spool/asterisk/monitorDONE/ORIG


Then the MP3s should be pushed to dated folders on an FTP server (that also happens to be a web server) so you can get them off your Vicidial server to reduce storage requirements. There's a crontab entry for:

Code: Select all
/usr/share/astguiclient/AST_CRON_audio_3_ftp.pl


This script uses the credentials for recordings in /etc/astguiclient.conf. Once that script has harvested all the MP3s, the files in question will have been moved to:

Code: Select all
/var/spool/asterisk/monitorDONE/FTP


So the files in this FTP folder are automatically redundant, indicating that they have been moved to another location via FTP and may also be removed, just like the ORIG folder.

But to directly answer your question, if all you want is to delete those MP3s after 30 days, this line will do the trick:

Code: Select all
25 1 * * * /usr/bin/find /var/spool/asterisk/monitorDONE/MP3 -maxdepth 2 -type f -mtime +30 -print | xargs rm -f


Put that with the other xargs rm -f lines in crontab -e.
Vicidial Installation and Repair, plus Hosting and Colocation
Newest Product: Vicidial Agent Only Beep - Beta
http://www.PoundTeam.com # 352-269-0000 # +44(203) 769-2294
williamconley
 
Posts: 20256
Joined: Wed Oct 31, 2007 4:17 pm
Location: Davenport, FL (By Disney!)

Re: auto delete call recordings

Postby justinmoodley3 » Thu Jan 21, 2021 9:38 am

Thank you for your help much appreciated

Kind regards
Justin
justinmoodley3
 
Posts: 24
Joined: Thu Dec 03, 2020 8:34 am


Return to Support

Who is online

Users browsing this forum: Google [Bot] and 90 guests