text
stringlengths
0
152
zone (CST/CDT).
This value would also be suitable for CST/CDT, but
would play back the time in 24-hour format.
This value would be suitable for Universal Time
Coordinated (Zulu time, formerly GMT).
european
Europe/Copenhagen|'vm-received'
a d b 'digits/at' HM
This value would be suitable for Central European
time (CEST).
Mailboxes
You can configure mailboxes in the voicemail.conf file, but it’s not the recommended
way. We’re going to use the database to define your mailboxes.
The first thing we need to do is tell Asterisk that voicemail users are available in the
database. We do that by editing the /etc/asterisk/extconfig.conf file:
$ sudo vim /etc/asterisk/extconfig.conf
[settings] ; older mechanism for connecting all other modules to the database
ps_endpoints => odbc,asterisk
ps_auths => odbc,asterisk
ps_aors => odbc,asterisk
ps_domain_aliases => odbc,asterisk
ps_endpoint_id_ips => odbc,asterisk
ps_contacts => odbc,asterisk
voicemail => odbc,asterisk,voicemail
You should restart Asterisk to ensure this change has been applied ($ sudo service
asterisk restart).
In the voicemail system, a mailbox must be defined with a context. This does not
relate to any dialplan context; it’s a label specific to voicemail that will determine what
mailboxes will be grouped together, and is also used to name the folder in the spool
that contains the various files associated with this mailbox (greeting, messages, enve‐
lopes, and so forth). Normally, you don’t need to worry about this, as all mailboxes
will end up in the default context. You really only need to define various contexts if
you have a complex, multi-tenanted system, where there’s a potential for extension
overlap, or where you don’t want certain groups of users exposed to other groups of
users.
136
|
Chapter 8: Voicemail
The `asterisk`.`voicemail` table offers many options; however, to create a mail‐
box there are only three fields that are required, plus two more that are recom‐
mended. The context, mailbox, and password fields are required, and fullname and
email are strongly recommended. Here’s a simple MySQL INSERT that’ll create some
mailboxes for you.
INSERT INTO `asterisk`.`voicemail` (context,mailbox,password,fullname,email)
VALUES
('default','100','486541','Russell Bryant', 'russell@shifteight.org'),
('default','101','957642','Leif Madsen', 'leif@shifteight.org'),
('default','102','656844','Jared Smith', 'jared@shifteight.org'),
('default','103','375416','Jim VanMeggelen', 'jim@shifteight.org')
;
The parts of the mailbox definition are:
mailbox
This is the mailbox number. It is normal to ensure it corresponds with the exten‐
sion number of the associated set.
password
This is the numeric password that the mailbox owner will use to access her voice‐
mail. If the user changes her password, the system will update this field in the
database.
If the password is preceded by the hyphen (-) character, the user cannot change
their mailbox password.
fullname (FirstName LastName)
This is the name of the mailbox owner. The company directory uses the text in
this field to allow callers to spell usernames. You only get one space, which is
meant to delimit the first name from the last name, so if your last name is some‐
thing like Van Meggelen, you’ll put that in as VanMeggelen. Other punctuation
characters might also cause problems. (We’re looking at you, O’Reilly.)
email address
This is the email address of the mailbox owner. Asterisk can send the voicemail
to the specified email box.
The Asterisk directory cannot handle the concept of a surname
that is anything other than a simple word. This means that family
names such as O’Reilly, Bryant-Madsen-Smith, and yes, even Van
Meggelen must have any punctuation characters and spaces
removed before being added to voicemail.conf.