Aloysius Thevarajah Lloyd
2009-Jul-17 16:30 UTC
[asterisk-users] Delete voicemail after couple of days
Hi Every one, Is there a way to delete voicemail's after couple of days? Thank you. Lloyd -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20090717/b5f5bcfb/attachment.htm
Danny Nicholas
2009-Jul-17 16:40 UTC
[asterisk-users] Delete voicemail after couple of days
Just set up a cron job to remove entries from /var/spool/asterisk/voicemail/default/xxx/INBOX or the database that contains the entry if you are going that route. _____ From: asterisk-users-bounces at lists.digium.com [mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Aloysius Thevarajah Lloyd Sent: Friday, July 17, 2009 11:31 AM To: asterisk-users at lists.digium.com Subject: [asterisk-users] Delete voicemail after couple of days Hi Every one, Is there a way to delete voicemail's after couple of days? Thank you. Lloyd -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20090717/c7de6342/attachment.htm
----- "Steve Edwards" <asterisk.org at sedwards.com> wrote:> On Fri, 17 Jul 2009, Miguel Molina wrote: > > >> I think the OP caught the humor -- note the "smiley." I'm sorry it > > >> didn't translate to your language. > > > Oops, well I'm not a native english speaker so it's really hard to > catch > > some humor of a word that I don't know or I get as misspelled. > Thanks > > for the definition, now I can laugh with you guys. > > > > Sorry for all the fuzz around this. > > > > PD: Es como si yo te contara un chiste en espa?ol! > > Si, pero el Ingles es mejor que mi espanol! > > (Google translate is my friend.) > --All the politics, list etiquette, and general bitching aside, here is how I would do what the OP wants. Write up a small shell script that uses 'find /var/spool/asterisk/voicemail/ -mtime +2' for a list of files older than two days assuming you want ALL files deleted older than two days. You could always grep that output if you only wanted to delete voicemail that is not still in the INBOX or elsewhere. Anyways, then use -exec to rm the files. If the goal was to remove all files, it might look something like this: #!/bin/bash find /var/spool/asterisk/voicemail/ -mtime +2 -exec rm {}\; Run that from cron once a day/hour/whatever and you're set. <rant> It still amazes me how often posters are unable to get a simple answer to a question and instead are inundated with 'you top posted', 'you didn't ask the question right', 'your spelling was wrong', etc... I mean, is this list just a really big bridge with a bunch of trolls(no pun intended) waiting to pounce on people just wanting to get to the other side where "Asterisk Enlightenment" awaits? And of course because I've diverted from the norm and possibly hurt someone's ego, I expect a full backlash or smarmy remarks etc. Thank you in advance. </rant> --Tim
Carlos Chavez
2009-Jul-17 22:54 UTC
[asterisk-users] Delete voicemail after couple of days
I did not catch all the messages on this thread but why not use the messages-expire.pl script included in Asterisk for this simple task? It will delete and renumber all messages and you can program how many days before a message is deleted. -- Telecomunicaciones Abiertas de M?xico S.A. de C.V. Carlos Ch?vez Prats Director de Tecnolog?a +52-55-91169161 ext 2001 -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 197 bytes Desc: This is a digitally signed message part Url : http://lists.digium.com/pipermail/asterisk-users/attachments/20090717/9c2c61a1/attachment.pgp