[Asterisk-Users] Re: Voicemail storage in DB

James H. Cloos Jr. cloos at jhcloos.com
Mon Apr 12 14:30:16 MST 2004


>>>>> "James" == James H Thompson <jht at lj.net> writes:

James> You could use NFS with the Maildir alogrithm or
James> something similar to avoid the need for locking.

Here is an(other) idea if anyone is looking for a project:

When using a db for the meta data, there is no need for the filenames
to have the message number in them.  As such, one can use a mix of the
${UNIQUEID}, (the hostname or ip if a networked fs), and any other call
details of interest as the filename.  Or, for even nearer certainty of
collision-proof-ness¹ you can use the base64² of the sha hash of some
entropy and the call's ${UNIQUEID} for the filename.

The message order can be kept in the db table with the rest of the
meta data.

-JimC

¹ (don't you love neologisms) 
² be sure to use a filesystem-friendly version of base64

-- 
James H. Cloos, Jr. <cloos at jhcloos.com> <http://jhcloos.com>



More information about the asterisk-users mailing list