text stringlengths 0 152 |
|---|
Since we’ve installed the table required for voicemail in the MySQL database, it is pos‐ |
sible to create mailboxes there without any other configuration. It is, however, also |
possible to create mailboxes in an /etc/asterisk/voicemail.conf file (this file also allows |
you to change various other default settings). We’ll continue to use the database to |
create and manage users, since it is far more suited to the task, but we’ll also explore |
the configuration file so that you can get a sense of the flexibility possible with Aster‐ |
isk’s voicemail. |
130 |
| |
Chapter 8: Voicemail |
The voicemail.conf file contains several sections where various default parameters can |
be adjusted. For the most part, you won’t need to change any of these; however, you |
should take a look at the ~/src/asterisk-1.15.<your version>/configs/samples/voice‐ |
mail.conf.sample file. It contains useful information about various options that can be |
adjusted. |
We have provided a simple voicemail.conf file next. If you wish to tweak the basic |
configuration beyond this, simply add or edit the relevant option. |
An Initial voicemail.conf File |
We recommend the following sample as a starting point. You can refer to ~/asterisk- |
complete/asterisk/11/configs/voicemail.conf.sample for details on the various settings. |
Place the following in a file named /etc/asterisk/voicemail.conf: |
; Voicemail Configuration |
[general] |
format=wav49|wav |
serveremail=voicemail@shifteight.org |
attach=yes |
skipms=3000 |
maxsilence=10 |
silencethreshold=128 |
maxlogins=3 |
emaildateformat=%A, %B %d, %Y at %r |
pagerdateformat=%A, %B %d, %Y at %r |
sendvoicemail=yes ; Allow the user to compose and send a voicemail while inside |
[zonemessages] |
eastern=America/New_York|'vm-received' Q 'digits/at' IMp |
central=America/Chicago|'vm-received' Q 'digits/at' IMp |
central24=America/Chicago|'vm-received' q 'digits/at' H N 'hours' |
military=Zulu|'vm-received' q 'digits/at' H N 'hours' 'phonetic/z_p' |
european=Europe/Copenhagen|'vm-received' a d b 'digits/at' HM |
Setting up a Linux server to handle the sending of email is a Linux |
administration task that is beyond the scope of this book. You will |
need to test your voicemail-to-email service to ensure that the |
email is being handled appropriately by the Mail Transfer Agent |
(MTA),2 and that downstream spam filters are not rejecting the |
messages (one reason this might happen is if your Asterisk server is |
using a hostname in the email body that does not in fact resolve to |
it). |
2 Also sometimes called a Message Transfer Agent. |
The voicemail.conf File |
| |
131 |
You can create a massive and complex voicemail.conf file (and can even store user |
mailboxes in it), but we’re going to focus on a few curated examples to keep things |
simple. You’ll likely find that what we present will serve your needs quite well (and |
that the documentation samples will provide more detail, should you require it). |
The [general] Section |
The first section of the voicemail.conf file, [general], allows you to define global set‐ |
tings. Many of these settings can be assigned on a per-mailbox setting. We’ve listed in |
Table 8-1 a few settings that we feel are the most important to consider. |
Table 8-1. [general] section options for voicemail.conf |
Option |
format |
Value/example |
wav49|gsm|wav For each format listed, Asterisk creates a separate recording in that format |
Notes |
whenever a message is left. The benefit is that some transcoding steps may be |
saved if the stored format is the same as the codec used on the channel. We like |
WAV because it is the highest quality, and WAV49 because it is nicely compressed |
and easy to email. We don’t like GSM due to its scratchy sound, but it enjoys some |
popularity.a |
When an email is sent from Asterisk, this is the email address that it will appear to |
come from.b |
If an email address is specified for a mailbox, this determines whether the message |
is attached to the email (if not, a simple message notification is sent, and the user |
will need to call into voicemail to retrieve their messages). |
By default, Asterisk only allows a maximum of 100 messages to be stored per user. |
For users who delete messages, this is no problem. For people who like to save |
their messages, this space can get eaten up quickly. With the size of hard drives |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.