A simple script to delete call recordings. Note that this has been designed to work hand-in-hand with our other script, that coverts the recordings to MP3 to save space: FreePBX – convert WAV call recordings to MP3
You can easily modify the script to delete call recordings that are in WAV format, or for different periods of time, by altering the “*.mp3” to “*.wav” and by modifying the +365 to +30 +60 +90 etc.
# A script to delete old FreePBX call recordings
# Version 1 - 2016/12/08
# v1 - Initial Version
# Copyright Jaytag Computer Limited 2016 - www.jaytag.co.uk
# You may use or modify this script as you wish as long as this copyright
# message remains. Redistribution prohibited.
# Find all recordings older than 365 days and delete
find /var/spool/asterisk/monitor -name "*.mp3" -mtime +365 -delete