Quantcast
Channel: VOIP-info.org Wiki Changes
Viewing all articles
Browse latest Browse all 5767

Script to Age and Delete old Voicemails - vmspool_manager

$
0
0

Now Open Source

vmspool_manager is an Open Source program for managing your voicemail spool. Written in easy to read Perl. Tested with several versions of Asterisk. Automatically renumbers voicemail files after deleting old voicemails. Almost every option is controllable from the command line so it's easy to use as part of some automated nightly maintenance.

VMSPOOL Manager

New features (as of July 18, 2007)
  • Report mode is defualt - only says what _would_ have been done if active
  • Set the number of days from the command line
  • Option to operate on one mailbox instead of the whole queue

Get it, Install it, Run It

  • Just go to http://www.f2it.com/vmspool_manager and Download the script
  • Run it in report mode until you get the idea of what it will do
  • Finally run it for real by adding the --activate flag

Brought to you by F2 Incorporated

Please contact Judith Lebzelter at http://www.f2it.com for your comments and questions

See also



Here is the source code: the link seems to be broken:



#!/usr/bin/perl
use strict;
# Copyright 2007 Jay Allen
#   This program is free software; you can redistribute it and/or modify
#   it under the terms of the GNU General Public License as published by
#   the Free Software Foundation; either version 3 of the License, or
#   (at your option) any later version.
#
#   This program is distributed in the hope that it will be useful,
#   but WITHOUT ANY WARRANTY; without even the implied warranty of
#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#   GNU General Public License for more details.
#
#   You should have received a copy of the GNU General Public License
#   along with this program.  If not, see <http://www.gnu.org/licenses/>.
#


# Author:  Jay D. Allen  jay@f2it.com
# Version:  1.4  - July 2007
# 
#  1.  Delete any stale .lock* files.  Stale is defined as ctime/atime more 
#      a few minutes old (maybe 30 minutes to be safe)?  Look into the cause of 
#      these stake lock files?  What versions of Asterisk are effected?
#      Nasty bug!  .locked mailboxes _silently_ drop voicemail recordings.
#  2.  Remove voicemail files older than a policy date
#  3.  Possibly a report mode that just shows the age of the mail/boxes but 
#      does nothing
#      Report on number of messages per box, vs quota max
#      Send whiny emails to users about voicemail quota.
#  4.  Renumber boxes that are missing msg0001.X - since that will prevent
#      playback.

=head1 vmspool_manager.pl

This is a utility which does some checks on existing asterisk voicemail files and deletes old lock files and mail messages.  This is best run on a system that is not being used due the file renumbering and deleting of files which Asterisk could be accessing at the same time.

=head1 Options

--active:          Run in active mode, deleting files.  Default is to 'report'

--age=<#>:         Time after which a message is considered old in days.  Default is 14 days.

--bad:             Remove message files that do not have the expected number of files.

--context=<name>:  The context for Asterisk,  set to 'default' by default.

--debug:           Debug mode.

--group=<name>:    Name of group, default is "asterisk"

--help:            Help message.

--mailbox=<#>:     Run for a particular mailbox.

--spool=<path>:    Set to path to mail spool.  Default is "/var/spool/asterisk/voicemail"

--user=<name>:     Name of user, default is "asterisk"

=head1 USAGE:  To delete files over 30 days old.  Also remove bad lock files.

fixup-voicemail. ...

Viewing all articles
Browse latest Browse all 5767

Trending Articles