[Asterisk-Users] voicemail removal script
Roger
grunky at rockriver.net
Fri May 21 13:51:34 MST 2004
I'd like to propose a change to the voicemail remove script found in the
contrib directory of the asterisk source
Currently the find command looks like so
system('find '.$dir.'/'.$context.' -name msg????.??? -mtime +'.$age.'
-exec rm {} \; -exec echo Deleted {} \;');
I'd suggest it be changed to
system('find '.$dir.'/'.$context.'/*/Old -name msg????.??? -mtime
+'.$age.' -exec rm {} \; -exec echo Deleted {} \;');
with the additional
/*/Old
The script will only delete messages that have been listened to and not
new ones.
If you'd want to remove new unheard messages perhaps have 2 age
variables, quickly delete old listened to messages and slowly delete -
if at all - new unheard messages.
$newage=31
$ageold=7
system('find '.$dir.'/'.$context.'/*/INBOX -name msg????.??? -mtime
+'.$newage.' -exec rm {} \; -exec echo Deleted {} \;');
system('find '.$dir.'/'.$context.'/*/Old -name msg????.??? -mtime
+'.$ageold.' -exec rm {} \; -exec echo Deleted {} \;');
--
Rock River Internet Roger Grunkemeyer
202 W. State St, 8th Floor grunky at rockriver.net
Rockford, IL 61101 815-968-9888 x102
More information about the asterisk-users
mailing list