Auto-deletion of call recordings?

acs3121

Joined
Jan 27, 2011
Messages
5
Likes
0
Points
0
#1
I have a customer that wishes to record all of their phone conversations.

The problem is they never remember to do any house-cleaning and fill up their storage.

Is there any way to have the PBX auto delete call recordings older than x days or better yet, start deleting the oldest recordings first when the storage gets x% full?
 

dicko

Joined
Oct 24, 2008
Messages
4,099
Likes
0
Points
0
#2
To delete all *.wav files over 90 days

Code:
/usr/bin/find /var/spool/asterisk/monitor/*.wav -mtime 90 -delete
for the percentage based solution:

Code:
while (( `df /|/usr/bin/tail -1|/usr/bin/awk '{print $5'}|/bin/sed 's/\%//'` >= 76 ));do  /bin/rm -f `/bin/ls -tr /var/spool/asterisk/monitor/*.wav| /usr/bin/head -n 1` ;done
where 76 is the percentage desired, head -n 1 is one file at a time, season to taste

use these commands in a cron job.

dicko
 

acs3121

Joined
Jan 27, 2011
Messages
5
Likes
0
Points
0
#3
AWESOME, I'll give it a try.

THANKS!

Cameron
 

MageMinds

Joined
Jun 26, 2008
Messages
55
Likes
0
Points
0
#4
Thanks, very helpfull!!!
 

Members online

No members online now.

Latest posts

Forum statistics

Threads
30,902
Messages
130,887
Members
17,566
Latest member
Fpino
Top