[asterisk-users] How to delete voice mail messages?

Robert Lister robl at linx.net
Tue Nov 6 08:54:37 CST 2007


On Mon, Nov 05, 2007 at 12:47:52PM +0100, Michiel van Baak wrote:
> On 12:15, Mon 05 Nov 07, voip crazy wrote:
> > Hello all,
> > 
> > Could I create a script to delete the first messages on my voice mail? In
> > this script should I update any "messages index file" or there isn't any
> > file  to index them? Could you share any script to do that?
> 
> Hi,
> Voicemails are stored in
> /var/spool/asterisk/voicemail/<context>/<vmbox> by default.
> There's some .wav files and a .txt file for every message.
> You can easily delete them using some shellscript.

Yes, but you must not just barge in and start deleting them, they have to be 
renumbered in sequence after you delete the ones you want, otherwise the vm 
app breaks when the user is listening to their messages.

I think there is also a way to lock the files (I think with .LCK files) so 
that the vm app does not try to write them while you are manupulating. (and 
so your script can detect that there is a message being created.)

I expect you will be able to find some code out there that does it without 
breaking it. (vmspool_manager) ?

Rob


-- 
Robert Lister     - London Internet Exchange - http://www.linx.net/
sip:robl at linx.net - inoc-dba:5459*710        - tel: +44 (0)20 7645 3510



More information about the asterisk-users mailing list