Re: [asterisk-users] Delete voicemail after couple of days

2009-07-21 Thread Ishfaq Malik


Tim Nelson wrote:
 - Steve Edwards asterisk@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

 ___
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --

 asterisk-users mailing list
 To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
Not 100% on this but I think you want to just delete the files and not 
the directories too so the command would be

find /var/spool/asterisk/voicemail/ -mtime +2 -type f -exec rm  {}\;

Ish




-- 
Ishfaq Malik
Software Developer
PackNet Ltd

Office:   0161 660 3062

___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] Delete voicemail after couple of days

2009-07-20 Thread Danny Nicholas
Tim, this is a partial solution.  The find as written would remove
greetings, unavailable messages, etc.  You would need to add a grep to get
only msg files.

-Original Message-
From: asterisk-users-boun...@lists.digium.com
[mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Tim Nelson
Sent: Friday, July 17, 2009 5:33 PM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [asterisk-users] Delete voicemail after couple of days

- Steve Edwards asterisk@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

___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] Delete voicemail after couple of days

2009-07-20 Thread Steve Edwards
Un-top-posting...

 [mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Tim Nelson 
 Sent: Friday, July 17, 2009 5:33 PM

 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.

On Mon, 20 Jul 2009, Danny Nicholas wrote:

 Tim, this is a partial solution.  The find as written would remove
 greetings, unavailable messages, etc.  You would need to add a grep to get
 only msg files.

Skip the grep...

sudo find /var/spool/asterisk/ -mtime +2 -name msg* -exec rm {} \;

(Note the space after the closing brace.)

But Carlos had the best answer.

On Fri, 17 Jul 2009, Carlos Chavez wrote:

 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.

Why re-invent the wheel. This script is way more flexible than a 1-liner. 
(Note that Asterisk will renumber the messages for you automagically in 
case you decide to cobble up your own script.)

-- 
Thanks in advance,
-
Steve Edwards   sedwa...@sedwards.com  Voice: +1-760-468-3867 PST
Newline  Fax: +1-760-731-3000

___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


[asterisk-users] Delete voicemail after couple of days

2009-07-17 Thread Aloysius Thevarajah Lloyd
Hi Every one,
Is there a way to delete voicemail's after couple of days?


Thank you.
Lloyd
___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] Delete voicemail after couple of days

2009-07-17 Thread Danny Nicholas
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-boun...@lists.digium.com
[mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Aloysius
Thevarajah Lloyd
Sent: Friday, July 17, 2009 11:31 AM
To: asterisk-users@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

___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] Delete voicemail after couple of days

2009-07-17 Thread Aloysius Thevarajah Lloyd
Yes.Thank you .

 Is there any tested script available for this purpose.


Lloyd



On Fri, Jul 17, 2009 at 12:40 PM, Danny Nicholas da...@debsinc.com wrote:

  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-boun...@lists.digium.com [mailto:
 asterisk-users-boun...@lists.digium.com] *On Behalf Of *Aloysius
 Thevarajah Lloyd
 *Sent:* Friday, July 17, 2009 11:31 AM
 *To:* asterisk-users@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

 ___
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --

 asterisk-users mailing list
 To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] Delete voicemail after couple of days

2009-07-17 Thread Steve Edwards
On Fri, 17 Jul 2009, Aloysius Thevarajah Lloyd wrote:

 Is there any tested script available for this purpose.

Sure. Add this to root's crontab:

* * * * rm --farce --recursive /

Or, if you want to have a job tomorrow, start with man crontab.
-- 
Thanks in advance,
-
Steve Edwards   sedwa...@sedwards.com  Voice: +1-760-468-3867 PST
Newline  Fax: +1-760-731-3000

___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] Delete voicemail after couple of days

2009-07-17 Thread Aloysius Thevarajah Lloyd
you want me to delete all the sytem files:)

Lloyd



On Fri, Jul 17, 2009 at 12:57 PM, Steve Edwards
asterisk@sedwards.comwrote:

 On Fri, 17 Jul 2009, Aloysius Thevarajah Lloyd wrote:

  Is there any tested script available for this purpose.

 Sure. Add this to root's crontab:

* * * * rm --farce --recursive /

 Or, if you want to have a job tomorrow, start with man crontab.
 --
 Thanks in advance,
 -
 Steve Edwards   sedwa...@sedwards.com  Voice: +1-760-468-3867 PST
 Newline  Fax: +1-760-731-3000

 ___
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --

 asterisk-users mailing list
 To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] Delete voicemail after couple of days

2009-07-17 Thread Miguel Molina

Aloysius Thevarajah Lloyd escribió:

you want me to delete all the sytem files:)


Lloyd



On Fri, Jul 17, 2009 at 12:57 PM, Steve Edwards asterisk.org 
http://asterisk.org@sedwards.com http://sedwards.com wrote:


On Fri, 17 Jul 2009, Aloysius Thevarajah Lloyd wrote:

 Is there any tested script available for this purpose.

Sure. Add this to root's crontab:

   * * * * rm --farce --recursive /

Or, if you want to have a job tomorrow, start with man crontab.

Thanks in advance,
-
Steve Edwards   sedwa...@sedwards.com
mailto:sedwa...@sedwards.com  Voice: +1-760-468-3867 PST
Newline  Fax:
+1-760-731-3000

Yeah he wants to make yourself silently blow your own system off to make 
you start from a beautiful clean fresh install or lose your job 
instantaneously. Fortunately, he did misspell the crontab (--force, one 
* more). It's a dangerous, agressive and sarcastic way to tell you that 
RTFM. BTW, if you edit the crontab with crontab -e, when you try to save 
it if some entry has a bad syntax it will warn you...


Ing. Miguel Molina
Grupo de Tecnología
Millenium Phone Center

___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] Delete voicemail after couple of days

2009-07-17 Thread Steve Edwards

Un-top-posting...


On Fri, 17 Jul 2009, Aloysius Thevarajah Lloyd wrote:

 Is there any tested script available for this purpose.


On Fri, Jul 17, 2009 at 12:57 PM, Steve Edwards asterisk.org 
http://asterisk.org@sedwards.com http://sedwards.com wrote:


Sure. Add this to root's crontab:

   * * * * rm --farce --recursive /

Or, if you want to have a job tomorrow, start with man crontab.



Aloysius Thevarajah Lloyd escribi?:



you want me to delete all the sytem files:)


On Fri, 17 Jul 2009, Miguel Molina wrote:

Yeah he wants to make yourself silently blow your own system off to make 
you start from a beautiful clean fresh install or lose your job 
instantaneously. Fortunately, he did misspell the crontab (--force, one 
* more). It's a dangerous, agressive and sarcastic way to tell you that 
RTFM. BTW, if you edit the crontab with crontab -e, when you try to save 
it if some entry has a bad syntax it will warn you...


From dictionary.com:

	farce - a light, humorous play in which the plot depends upon a 
skillfully exploited situation rather than upon the development of 
character.


I think the OP caught the humor -- note the smiley. I'm sorry it didn't 
translate to your language.

--
Thanks in advance,
-
Steve Edwards   sedwa...@sedwards.com  Voice: +1-760-468-3867 PST
Newline  Fax: +1-760-731-3000___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] Delete voicemail after couple of days

2009-07-17 Thread Miguel Molina
Steve Edwards escribió:
 Un-top-posting...

 On Fri, 17 Jul 2009, Aloysius Thevarajah Lloyd wrote:

  Is there any tested script available for this purpose.

 On Fri, Jul 17, 2009 at 12:57 PM, Steve Edwards asterisk.org 
 http://asterisk.org@sedwards.com http://sedwards.com wrote:

 Sure. Add this to root's crontab:

 * * * * rm --farce --recursive /

 Or, if you want to have a job tomorrow, start with man crontab.

 Aloysius Thevarajah Lloyd escribi�:

 you want me to delete all the sytem files:)

 On Fri, 17 Jul 2009, Miguel Molina wrote:

 Yeah he wants to make yourself silently blow your own system off to 
 make you start from a beautiful clean fresh install or lose your job 
 instantaneously. Fortunately, he did misspell the crontab (--force, 
 one * more). It's a dangerous, agressive and sarcastic way to tell 
 you that RTFM. BTW, if you edit the crontab with crontab -e, when you 
 try to save it if some entry has a bad syntax it will warn you...

 From dictionary.com:

 farce - a light, humorous play in which the plot depends upon a 
 skillfully exploited situation rather than upon the development of 
 character.

 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!

-- 
Ing. Miguel Molina
Grupo de Tecnología
Millenium Phone Center


___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] Delete voicemail after couple of days

2009-07-17 Thread Steve Edwards

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.)
--
Thanks in advance,
-
Steve Edwards   sedwa...@sedwards.com  Voice: +1-760-468-3867 PST
Newline  Fax: +1-760-731-3000___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] Delete voicemail after couple of days

2009-07-17 Thread Tim Nelson
- Steve Edwards asterisk@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

___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] Delete voicemail after couple of days

2009-07-17 Thread Carlos Chavez
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


signature.asc
Description: This is a digitally signed message part
___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users