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                [EMAIL PROTECTED]
Rockford, IL 61101                           815-968-9888 x102

_______________________________________________
Asterisk-Users mailing list
[EMAIL PROTECTED]
http://lists.digium.com/mailman/listinfo/asterisk-users
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-users

Reply via email to