In telephony systems with high call volumes, enabling instant call recording or experiencing heavy voicemail usage can lead to rapid disk space consumption. Regularly purging old recordings is advisable.
Create an executable bash file and place it in the cron.daily
directory:
#!/bin/sh
cd /var/spool/asterisk/monitor
# Find and delete files older than 31 days.
# Modify 'rm -f' for other operations, e.g., backup before deletion.
find . -mtime +31 -exec rm -f {} \;