Page 183 - Asterisk™: The Future of Telephony
P. 183
name
This is the name of the mailbox owner. The company directory uses the text in this
field to allow callers to spell usernames.
email
This is the email address of the mailbox owner. Asterisk can send voicemail noti-
fications (including the voicemail message itself) to the specified email box.
pager_email
This is the email address of the mailbox owner’s pager or cell phone. Asterisk can
send a short voicemail notification message to the specified email address.
options
This field is a list of options that sets the mailbox owner’s time zone and overrides
the global voicemail settings. There are nine valid options: attach, serveremail, tz,
saycid, review, operator, callback, dialout, and exitcontext. These options
should be in option = value pairs, separated by the pipe character (|). The tz op-
tion sets the user’s time zone to a time zone previously defined in the [zonemes
sages] section of voicemail.conf, and the other eight options override the global
voicemail settings with the same names.
A typical mailbox definition might look something like this:
101 => 1234,Joe Public,jpublic@somedomain.com,jpublic@pagergateway.net,
tz=central|attach=yes
Continuing with our dialplan from the last chapter, let’s set up voicemail boxes for
John and Jane. We’ll give John a password of 1234 and Jane a password of 4444 (re-
member, these go in voicemail.conf, not in extensions.conf):
[default]
101 => 1234,John Doe,john@asteriskdocs.org,jdoe@pagergateway.tld
102 => 4444,Jane Doe,jane@asteriskdocs.org,jane@pagergateway.tld
Adding Voicemail to the Dialplan
Now that we’ve created mailboxes for Jane and John, let’s allow callers to leave mes-
sages for them if they don’t answer the phone. To do this, we’ll use the VoiceMail()
application.
The VoiceMail() application sends the caller to the specified mailbox, so that he can
leave a message. The mailbox should be specified as mailbox @ context, where con-
text is the name of the voicemail context. The option letters b or u can be added to
request the type of greeting. If the letter b is used, the caller will hear the mailbox owner’s
busy message. If the letter u is used, the caller will hear the mailbox owner’s
unavailable message (if one exists).
Let’s use this in our sample dialplan. Previously, we had a line like this in our
[internal] context, which allowed us to call John:
exten => 101,1,Dial(${JOHN})
Voicemail | 155