Delete voice recordings older than N-days

Disk space running out fast in loaded telephony systems with instant call recording or either with heavy usage of voicemail. It’s good to purge them on regular basis.

Create an executable bash file and put it to the cron.daily:

cd /var/spool/asterisk/monitor

# replace rm -f if you want to do other file 
# manipulations, i.e. backup first...
find . -mtime +31 -exec rm -f {} \;