The sections of the voicemail.conf file
The voicemail.conf file consists of one general section, one zonemessages section and one or more user-defined context sections.
The [general] section
The general section contains the global configuration settings that will apply as a common policy across all users. Configuration entries are coded in the setting=value format. There are about a hundred of available options, but I will only explain the most important ones that we will use in our example:
- format=wav49|wav – specifies the audio file formats for storing voice mail messages.
- email@example.com – specifies the source of a voicemail notification message.
- attach=yes – sends voice file attachments in the email notifications.
- maxsilence=20 – specifies how long Asterisk will wait for a contiguous period of silence before the recording is stopped. The default value is 0, which means that the option is disabled.
- maxmessage=200 – specifies the maximum length (in seconds) of an incoming message.
The [zonemessages] section
The purpose of this section is to define custom time zones, and to change the way time is announced in a particular time zone. The syntax of an entry in this section is:
The name of the zone can be anything you like. The country field contains the name of the country, the city field contains the name of the city within the country, and the options field contains a set of options that define how timestamps are played back.
The time zones that can be used are located in the /usr/share/zoneinfo directory. If your country or city is not present, pick a country/city pair that is in the same time zone as your location. For example, to set up a timezone for the city of Berlin, we would use the following code:
[zonemessages] berlin=Europe/Berlin|'vm-received' Q 'digits/at' R
The [context] section
The last part of the voicemail.conf file contains one or more context sections where the voice mailboxes are specified. The syntax for defining mailboxes is:
mailbox => voicemail_password,user_name,user_email_address,user_pager_email_address,user_option(s)
Here is a brief description of each parameter:
- mailbox – the number assigned to the voice mailbox, usually the extension number of the associated set.
- voicemail_password – the numeric password for the voicemail access.
- user_name – the first and last name of the voice mailbox user.
- user_email_address – the email address where the voicemail notifications (including the voicemail message itself, as an attachment) will be sent.
- user_pager_email_address – the email address of the user’s pager or cell phone, where a short voicemail notification message will be sent.
- user_option(s) – one or more options that can be used to override the default settings specified in the general section.
In most cases, you will need only a single one voicemail context, usually named [default]. If no context is specified, the voicemail-related applications (e.g. the VoiceMail application) assume this context.
Now, let’s create a simple voicemail system.