[Asterisk-Dev] voicemail filenames

Ben Klang ben at alkaloid.net
Wed Sep 29 07:12:34 MST 2004


On Wed, 2004-09-29 at 10:00, Aaron S. Joyner wrote:
> Ben Merrills wrote:
> 
> ><...>
> >But if I delete any of the voicemails, then I have to renumber ALL of them.
> ><...>
> >Could the voicemails be time stamped instead (unix file time style?) of
> >msgXXXX format? This would mean you could delete a file, and not need to
> >reorder files!
> >  
> >
> First, let me say that I *do* think Asterisk should handle this aspect 
> of the voicemail file handling better, and I haven't taken a look at the 
> source, but I suspect it's written the way it is for performance 
> reasons.  It's faster and safer from a memory-use perspective to just 
> iterate through the list of known filenames until you do an fopen() on 
> the first one that doesn't exist and stop there, as opposed to pulling 

It has long been an idea of mine to implement something like Maildir
(Voicemaildir?) for these files.  This potentially solves many problems:
safely storing voicemail on NFS, not needing to iterate through existing
files (potential race condition on shared voicemail storage here
incidentally), the format is time proven, and thanks to other projects
example code should be easy enough to implement.  I've just been
distracted by the many other things.  

At any rate a Maildir like storage mechanism is my vote.

/BAK/



More information about the asterisk-dev mailing list