Voicemail.conf Configuration Reference
Voicemail.conf Configuration Reference
The voicemail.conf file controls all aspects of Asterisk's voicemail system: mailbox definitions, email delivery, message limits, recording formats, password policies, and timezone-aware playback.
General Settings
[general]
format = wav49|gsm|wav
serveremail = pbx@example.com
attach = yes
maxmsg = 100
maxsecs = 180
minsecs = 3
maxsilence = 10
silencethreshold = 128
maxlogins = 3
skipms = 3000
sendvoicemail = yes
; Email customization
emaildateformat = %A, %B %d, %Y at %r
pagerdateformat = %A, %B %d, %Y at %r
; emailsubject = [PBX]: New message ${VM_MSGNUM} in mailbox ${VM_MAILBOX}
; emailbody = Dear ${VM_NAME}:\n\n\tYou have a new ${VM_DUR} voicemail (number ${VM_MSGNUM})\nfrom ${VM_CALLERID}, on ${VM_DATE}.\n\n\t\t--Asterisk\n
Timezone Messages
[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
Mailbox Definitions
[default]
; mailbox => password,name,email,pager_email,options
1001 => 4242,Alice Smith,alice@example.com
1002 => 1234,Bob Jones,bob@example.com,,tz=eastern|attach=yes
1003 => 5678,Carol White,carol@example.com,,tz=central|maxmsg=50
[sales]
2001 => 9999,Sales Team,sales@example.com,,tz=eastern
How it works
- format: Specifies which audio formats to record voicemail in.
wav49is compressed WAV (GSM in WAV container),gsmis GSM 6.10,wavis uncompressed 16-bit PCM. Multiple formats means the message is stored in all formats simultaneously. The first format listed is used for email attachments. - attach: When
yes, the voicemail audio file is attached to the notification email. This lets users listen without calling in to check messages. - maxsilence: Seconds of silence before the recording automatically stops. Set to
10to catch long pauses.silencethreshold(0-32767) controls how sensitive silence detection is. lower values are more sensitive. - Timezone zones: Each zone definition is
timezone|format_string. The format string uses codes likeQ("today", "yesterday", or full date),I(12-hour),M(minutes),p(AM/PM). Assign a user to a zone withtz=easternin their mailbox options. - Email variables: Custom
emailsubjectandemailbodytemplates can use:${VM_NAME}(mailbox owner),${VM_DUR}(message duration),${VM_MSGNUM}(message number),${VM_CALLERID}(caller ID),${VM_DATE}(timestamp),${VM_MAILBOX}(mailbox number). - Contexts: Mailboxes are organized into contexts (
[default],[sales]). The rest of the system references them asmailbox@context(e.g.,1001@default). Different contexts can have different settings.
Tips
- Use
-prefix on the password to make it unchangeable:1001 => -4242,Alice Smith,alice@example.com. - Set
delete = yesin per-mailbox options for users who only want email delivery and don't need to dial in. - For external notification scripts, use
externnotify = /usr/bin/myapp: it's called with argumentscontext mailbox countwhen a new message arrives. - The
forcename = yesoption prompts new users to record their name on first login. A "new user" is one whose password matches the mailbox number. - Store voicemail in a database with
odbcstorage = asteriskfor easier backup, replication, and web interface integration. - Password validation: set
minpassword = 6to enforce minimum length. Useexternpasscheck = /path/to/scriptfor custom password policy (the script prints VALID or INVALID to stdout). - Voicemail greetings are stored per-mailbox in
/var/spool/asterisk/voicemail/<context>/<mailbox>/. Back up this directory.
User Notes
No notes yet. Be the first to contribute a tip or example.
Contribute a note
Share a tip, gotcha, or practical example. Keep it under 2000 characters. No questions (use the Asterisk community forums for support). Wrap code in backticks.