Delete voice recordings older than N-days

Disk space in loaded telephony systems such as call centre or PBX with call recording function or with heavy usage of voicemails will be full of voice files in very short time. It’s better to remove them…

Create an bash file, put it to 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 {} \;