Now that we've covered the two main voice mail applications, let's look at the voicemail configuration. Voice mail options and mailboxes are configured in the voicemail.conf configuration file. This file has three major sections:
The [general] section
Near the top of voicemail.conf, you'll find the [general] section. This section of the configuration file controls the general aspects of the voicemail system, such as the maximum number of messages per mailbox, the maximum length of a voicemail message, and so forth. Feel free to look at the sample voicemail.conf file for more details about the various settings.
The [zonemessages] section
The [zonemessages] section is used to define various timezones around the world. Each mailbox can be assigned to a particular time zone, so that times and dates are announced relative to their local time. The time zones specified in this section also control the way in which times and dates are announced, such as reading the time of day in 24-hour format.
Voice Mail Contexts
After the [general] and [zonemessages] sections, any other bracketed section is a voice mail context. Within each context, you can define one or more mailbox. To define a mailbox, we set a mailbox number, a PIN, the mailbox owner's name, the primary email address, a secondary email address, and a list of mailbox options (separated by the pipe character), as shown below:
By way of explanation, the short email address is an email address that will receive shorter email notifications suitable for mobile devices such as cell phones and pagers. It will never receive attachments.
To add voice mail capabilities to extensions 6001 and 6002, add these three lines to the bottom of voicemail.conf.
Now that we've defined the mailboxes, we can go into the Asterisk CLI and type voicemail reload to get Asterisk to reload the voicemail.conf file. We can also verify that the new mailboxes have been created by typing voicemail show users.
server*CLI> voicemail reload Reloading voicemail configuration... server*CLI> voicemail show users Context Mbox User Zone NewMsg default general New User 0 default 1234 Example Mailbox 0 other 1234 Company2 User 0 vm-demo 6001 Alice Jones central 0 vm-demo 6002 Bob Smith eastern 0 5 voicemail users configured.
Now that we have mailboxes defined, let's add a priority to extensions 6001 and 6002 which will allow callers to leave voice mail in their respective mailboxes. We'll also add an extension 6500 to allow Alice and Bob to check their voicemail messages. Please modify your [users] context in extensions.conf to look like the following:
Reload the dialplan by typing dialplan reload at the Asterisk CLI. You can then test the voice mail system by dialing from one phone to the other and waiting twenty seconds. You should then be connected to the voicemail system, where you can leave a message. You should also be able to dial extension 6500 to retrieve the voicemail message. When prompted, enter the mailbox number and PIN number of the mailbox.
While in the VoiceMainMain() application, you can also record the mailbox owner's name, unavailable greeting, and busy greeting by pressing 0 at the voicemail menu. Please record at least the name greeting for both Alice and Bob before continuing on to the next section.
Go into lots of detail about the voicemail interface? How to move between messages, move between folders, forward messages, etc?