[asterisk-users] Voicemail retention

Gordon Henderson gordon+asterisk at drogon.net
Fri Sep 26 15:01:38 CDT 2008


On Fri, 26 Sep 2008, Asterisk User List wrote:

> Asterisk version 1.2.27
>
>
>
> We are running into issues where people are not deleting their
> voicemails and it is filling up the storage for voicemail.  We would
> like to run a script that dumps all voicemail that are older than X
> days.
>
>
>
> Can we simply check the date time stamp on the message directory and
> delete those files older than X days or will that mess up the sequence
> of the voicemails?
>
>
>
> Anyone have a smooth way of doing this in 1.2?

Standard unix stuff:

cd /voicemail
find . -ctime +7 -type f -exec rm {} \;

However you'll need to do some work to stop it deleting the announcments. 
Left as an excercise to the user because you really ought to know this 
stuff. IMO.


Gordon



More information about the asterisk-users mailing list