The storage of messages on a traditional voicemail system has always tended to be overly complicated.[87] Asterisk, on the other hand, not only provides you with a simple, logical, filesystem-based storage mechanism, but also offers a few extra message storage options.
By default, Asterisk will store voice messages in the spool folder, at /var/spool/asterisk/voicemail/<context>/<mailbox>
.
The messages can be stored in multiple formats (such as WAV and GSM),
depending on what you specified as the format
in the [general]
section of your voicemail.conf
file. Your greetings will also
be stored in this folder.
Asterisk will not create a folder for any mailboxes that do not have any recordings yet (as would be the case with a new mailbox), so this folder cannot be used as a reliable method of determining which mailboxes exist on the system.
Here’s an example of what might be in a
mailbox folder. This mailbox has no new messages in the INBOX
, has two saved messages in the
Old
folder, and has busy
and unavailable
greetings recorded:
/var/spool/asterisk/voicemail/default ./INBOX ./Old ./Old/msg0000.WAV ./Old/msg0000.txt ./Old/msg0001.WAV ./Old/msg0001.txt ./Urgent ./busy.WAV ./unavail ./unavail.WAV
For each message, there is a matching
msg####.txt
file, which
contains the envelope information for the message. The msg####.txt
file is also critically
important for message waiting indication (MWI), as this is the file
that Asterisk looks for in the INBOX
to determine whether the message
light for a user should be on or off.
In a centralized or distributed system, you may find it desirable to store messages as binary objects in a database, instead of as files on the filesystem. We’ll discuss this in detail in the section called “ODBC Voicemail”.
Many people would prefer to manage their voicemail as part of their email. This has been called unified messaging by the telecom industry, and its implementation has traditionally been expensive and complex. Asterisk allows for a fairly simple integration between voicemail and email, either through its built-in voicemail to email handler, or through a relationship with an IMAP server. We’ll discuss IMAP integration in detail in the section called “VoiceMail IMAP Integration”.
[87] Nortel used to store its messages in a sort of special partition, in a proprietary format, which made it pretty much impossible to extract messages from the system, or email them, or archive them, or really do anything with them.