It is worth noting that call recordings can be quite large. If left unattended, a PBX that automatically records all of the calls will eventually fill up the entire available hard disk space and stop processing calls. It is important to have a maintenance strategy for dealing with call recordings in order to avoid this. While third-party tools exist to maintain recordings, adequate maintenance can often be performed with simple shell scripts.
The most common way of maintaining call recordings is to automate the deletion of recordings that are older than a certain time frame. The following script called OldRecordingDeletion.sh
will remove all of the recordings older than 14 days.
#!/bin/bash # Change this path to reflect your recording storage # location RECORDINGS=/var/spool/asterisk/monitor # Change this number to reflect the maximum age of call # recordings RECORDINGEXPIRY=14 # Change this number to reflect the maximum age of the # deletion logs LOGEXPIRY...