Sami Knudsen Al-Sayed
2006-Jul-31 11:59 UTC
[asterisk-users] Automatic deletion of voicemail messages older than N days?
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
Steven
2006-Jul-31 13:16 UTC
[asterisk-users] Re: Automatic deletion of voicemail messages olderthan N days?
Our PhoneXpress VM system replaces the old voicemail with a short "your message was stored too long and was removed" recording. You may be able to copy a symlink over the old message linking to one common recording like above. As long as asterisk(comedian mail) only deletes the symlink, not the above recording, then the cleanup is managed by the use/asterisk. The benefits of above are: The use is told that the message was deleted. The user still gets the message header with callerID, etc. This reminds the user that there is a limit. This save you disk space by symlinking to 1 common deleted recording message. -- -- Steven http://www.glimasoutheast.org "Sami Knudsen Al-Sayed" <supersambo@gmail.com> wrote in message news:d23ae820607311159r78448362w20cb9428728d072f@mail.gmail.com... 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 _______________________________________________ --Bandwidth and Colocation provided by Easynews.com -- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users