Voicemail is configured in voicemail.conf.
The file has three sections:
[general]
[zonemessages]
Global configurations for the voicemail system go here. The available options for this section are described in detail below.
attach = [yes|no]
Sets whether voice message files are attached to e-mail notifications. Default: yes. The format defined by the first entry in the format= line is used.
Example:
attach = no
callback = [context]
Specifies the context through which callbacks from the voicemail system are made. If unset, callbacks cannot be made from voicemail. Default: unset.
Example:
callback = internal-extensions
charset = [charset]
Specifies the character set used to encode the text of the e-mail.
Example:
charset = ISO-8859-1
delete = [yes|no]
Sets whether messages are deleted once the e-mail notification with attachment has been sent. This saves hard disk space on the server if users are only to receive messages via e-mail.
Example:
delete = yes
directoryintro = [filename]
Specifies the filename of a sound file (found in the default sound file directory /var/lib/asterisk/sounds/) to be used instead of the default sound file for the Dial-by-Name system (see the section called “Directory (Dial-by-Name)”).
Example:
directoryintro =
intro-widgets-phonebook
emailsubject = [subject]
Specifies the subject line to be used in e-mail notifications. For information about variables, see emailbody.
Example:
emailsubject = New message from
${VM_CALLERID}
pbxskip = [yes|no]
Asterisk prefixes [PBX] to the subject line of every e-mail notification. This is intended to make filtering e-mail notifications into a specific folder more straightforward, but can be suppressed with yes if undesired.
Example:
pbxskip = yes
emailbody = [Text der Email]
Specifies the body text of the e-mail notifications. Limited to 512 characters.
You may use variables in the subject and body of e-mail notifications:
Example:
emailbody = Hi, ${VM_NAME}!\n\nYou have a new
message from ${VM_CALLERID} in mailbox
${VM_MAILBOX}.
[17]
serveremail = [fromaddress]
Specifies the e-mail address that appears in the "From:" field of e-mail notifications.
Example:
serveremail =
voicemail@widgets-inc.biz
fromstring = [fromname]
Specifies the envelope sender (From-Header) in e-mail notifications.
Example:
fromstring = VM
mailcmd = [mailer]
Specifies the application (including absolute path) to be used for sending e-mail notifications.
Examples:
mailcmd = /usr/sbin/sendmail -t
mailcmd = /usr/exim/bin/exim -t
externnotify = [application]
Specifies the application (including absolute path) called by Asterisk when a new message arrives.
Example:
externnotify =
/usr/bin/local/send-sms.sh
externpass = [application]
Specifies the application (including absolute path) called by Asterisk when a user changes his password.
Example:
externpass =
/usr/bin/local/password-notify.sh
forcegreetings = [yes|no]
Sets whether the user will be forced to record a new greeting when logging in to the system for the first time. Default: no
Example:
forcegreetings = no
forcename = [yes|no]
Sets whether the user will be forced to record her name when logging in to the system for the first time. Default: no
Example:
forcename = yes
format = [gsm|wav|wav49]
Defines the codecs used to save voicemail messages. If more than one codec is specified, the message is stored once in each of the formats specified. This can lead to a shortage of available disk space but means further transcoding will not be needed if a user using a different codec is retrieving the messages.
If attach=yes, the first format specified is used for the attachment to the e-mail notification.
Examples:
format = gsm|wav
Every message is saved in GSM and WAV format.
format = wav
Every message is saved only in WAV format.
|
|
|
If this setting is changed during operation, existing files in other formats must be deleted manually by the system administrator. |
searchcontexts = [yes|no]
Asterisk only looks for mailboxes in the specified context. Setting searchcontexts=yes makes Asterisk search in all contexts. Default: no
Example:
searchcontexts = no
maxmsg = [number of messages]
Defines the maximum number of messages a single mailbox may hold. Once this limit is reached, no further messages can be recorded, and the caller hears the message /var/lib/asterisk/sounds/vm-mailboxfull.gsm. Default: 100
[18].
Example:
maxmsg = 50
maxmessage = [length in seconds]
Sets the maximum duration of a message. Default: no limit
Example:
maxmessage = 120
minmessage = [length in seconds]
Sets the minimum duration of a message. Default:
0
Example:
minmessage = 5
maxgreet = [length in seconds]
Sets the maximum duration of greeting messages. Default: no limit
Example:
maxgreet=240
maxsilence = [length in seconds]
Sets the number of seconds of silence that the system will allow before it assumes that the caller has finished.
Example:
maxsilence=10
silencethreshold = [Schwellenwert]
Specifies the maximum sound level that Asterisk considers silence when measuring maxsilence=. The lower the number, the more sensitive the detection. Default: 128
[19]
Example:
silencethreshold = 50
maxlogins = [number of login attempts]
Sets the maximum number of failed login attempts (e.g., the user enters an incorrect password) before Asterisk hangs up. Default: 3
Example:
maxlogins = 3
skipms = [milliseconds]
Sets the number of milliseconds the "skip forward" and "rewind" keys will jump forward or back during message playback. Default: 3000
Example:
skipms = 3000
usedirectory = [yes|no]
Gives callers access to the Dial-by-Name system. Default: no
Example:
usedirectory = yes
saycid = [yes|no]
Sets whether the telephone number of the caller is announced when the message is heard. Default: no
Example:
saycid = yes
cidinternalcontexts = [context,context,...]
pagerfromstring = [sendername]
Indicates the sender for pager notifications. See fromstring=.
Example:
pagerfromstring = Widgets, Inc.
pagersubject = [subject]
Specifies the subject for pager notifications. See emailsubject=.
Example:
pagersubject = New message
pagerbody = [body text]
Specifies the message body for pager notifications. See emailbody=.
Example:
pagerbody = New message in mailbox ${VM_MAILBOX}
from ${VM_CALLERID}.
There are other parameters in addition to those documented above; nevertheless, these are those most frequently used. A complete listing of the available parameters, with brief descriptions, may be found in the default version of voicemail.conf.
In larger enterprises, voicemail users can be spread across time zones; the [zonemessages] section allows for time announcements that correspond to the user's time zone.
[20]
zonename = timezone | format
zonename
timezone
Time zone information is stored in
/usr/share/zoneinfo for most Linux
distributions. Typically the time zone files are sorted by
continent, then region or city, separated by a /.
Examples:
Canada/Mountain
Europe/Berlin
Australia/Sydney
format
Defines the format for time announcements. This is done with the following variables:
A
|
Weekday (Monday to Sunday) |
a
|
as A |
B
|
Month (January to December) |
b
|
as B |
h
|
as B |
d
|
Day of the month (1st to 31st) |
e
|
as d |
Y
|
Year (e.g. 2007) |
I
|
Hour in 12 hour clock |
l
|
as I |
H
|
Hour in 24 hour clock. Single digit hours are preceded by a 0 ("oh"). |
k
|
Hour in 24 hour clock. Single digit hours have no prefix. |
M
|
Minute |
P
|
AM or PM |
p
|
as P |
Q
|
"Today," "yesterday," or "weekday, month, day, year." |
q
|
Nothing if today, "yesterday," or "weekday, month, day, year." |
R
|
Hour:minute:second |
Other allowed variables include
${ANY_VARIABLE} (the contents of the
variable are entered) and 'soundfilename'.
When specifying a sound file, be careful not to add a file
extension (e.g. .wav, .gsm); the specified
sound file in /var/lib/asterisk/sounds is then
played. The single quotation marks are
mandatory.
Example:
[zonemessages] germany = Europe/Berlin | 'vm-received' Q 'digits/at' kM alberta = Canada/Mountain | 'vm-received' Q 'digits/at' HM england = Europe/London | 'vm-received' Q 'digits/at' R military = Zulu | 'vm-received' q 'digits/at' H N 'hours' 'phonetic/z_p'
As in the dialplan (extensions.conf) we
can define contexts in voicemail.conf. This is
useful when there is a need to separate voicemail access by department,
branch, or city, and makes it possible to define separate Dial-by-Name
directories as well (see the section called “Directory (Dial-by-Name)”).
You can configure as many mailboxes as you like in a given context.
mailbox => password,name[,e-mail[,pager-e-mail[,options]]]
Example:
202 => 1234,Gina Smart,gina@widgets-inc.biz,,attachfmt=wav|delete=yes
mailbox
password
e-mail
pager-e-mail
options
Multiple options must be separated by the pipe character (|); these options can override global options set in [general]. Note that there cannot be any spaces between the parameter name, the = sign, and the value, nor between the options and the pipe character.
The most important options applied here are:
tz=[timezone]
Sets the time zone previously defined in
[zonemessages] (see the section called “[zonemessages]”).
Example:
tz=alberta
attach=[yes|no]
attachfmt=[gsm|wav|wav49]
saycid=[yes|no]
sayduration=[yes|no]
saydurationm=[length in minutes]
0dialout=[context]
Specifies the context to be used for dialling out from a message. Calls cannot be made out of voice mail unless this parameter is set.
Example:
dialout=internal-extensions
sendvoicemail=[yes|no]
callback=[context]
review=[yes|no]
operator=[yes|no]
noenvelope=[yes|no]
yesdelete=[yes|no]
nextaftercmd=[yes|no]
noforcename=[yes|no]
noforcegreetings=[yes|no]
nohidefromdir=[yes|no]
no[17] This must all be on one line. The \n character puts a carriage return in the text.
[18] The path depends on the installation; some packages
install the sounds in
/usr/share/asterisk/sounds/
[19] There is no indication in the Asterisk source code what the range or unit for this value is. The only way to set the value sensibly is through trial and error.
[20] Note that time zones defined here must still be activated for individual users. See the section called “Mailboxesd”
[21] Note that such notifications are still, in essence, e-mail notifications. If you want to send SMS notifications, this can be done with a number of external applications which may be invoked through Asterisk.