[asterisk-users] Automatic deletion of voicemail messages older than N days?

Sami Knudsen Al-Sayed supersambo at gmail.com
Mon Jul 31 11:59:20 MST 2006


Hi,

I am using Asterisk 1.2.4 on a Debian GNU/Linux server. I am looking
for a simple way to automatically delete all voicemail messages older
than a certain number of days for a given mailbox number. For example,
I want to be able to delete all voicemail messages older than 7 days
for telephone number 201. I can delete the messages like this:

find /var/spool/asterisk/voicemail/default/201/INBOX/msg????.* -ctime
+7 -exec rm {} \;

but I need a way of renaming the remaining files, so they are numbered
correctly - Asterisk always expects the first voicemail message to be
called msg0000.WAV, the second message is msg0001.WAV etc. Anybody got
any suggestions for an easy (and elegant!) way of doing this?

Thanks,

Sami
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20060731/3a95630b/attachment.htm


More information about the asterisk-users mailing list