mod_voicemail
About
mod_voicemail is a Dialplan Application that provides voicemail services via Diaplans. It lets you send calls to voicemail, which allows callers to leave messages for users and allows users to retrieve and manage any messages left by callers.
Click here to expand Table of Contents
- 1 Synopsis
- 2 Dialplan variables
- 3 Controlling User Parameters & Variables
- 3.1 vm-enabled
- 3.2 vm-alternate-greet-id
- 3.3 voicemail_alternate_greet_id
- 3.4 voicemail_greeting_number
- 3.5 http-allowed-api
- 3.6 vm-disk-quota
- 3.7 vm-mailto
- 3.8 vm-mailfrom
- 3.9 vm-notify-mailto
- 3.10 vm-password
- 3.11 vm-a1-hash
- 3.12 vm-email-all-messages
- 3.13 vm-notify-email-all-messages
- 3.14 vm_cc
- 3.15 vm-keep-local-after-email
- 3.16 vm-attach-file
- 3.17 vm-message-ext
- 3.18 vm_message_ext
- 3.19 vm-skip-instructions
- 3.20 notify-template-file
- 3.21 vm-storage-dir
- 3.22 vm-storage-dir-shared
- 3.23 vm-domain-storage-dir
- 4 Using Outside Programs to Send Voicemail to Email
- 5 Send_mail setting
- 6 Exim4 settings
- 7 Windows settings
- 8 Mail via PHP
- 9 nullmailer settings
- 10 sSMTP settings
- 11 Debugging an external mailer
- 12 Example
- 13 Configuration Parameters
- 13.1 file-extension
- 13.2 Key FS Mapping
- 13.3 callback-dialplan
- 13.4 callback-context
- 13.5 terminator-key
- 13.6 max-login-attempts
- 13.7 digit-timeout
- 13.8 max-record-len
- 13.9 tone-spec
- 13.10 play-new-messages-key
- 13.11 play-saved-messages-key
- 13.12 main-menu-key
- 13.13 config-menu-key
- 13.14 record-greeting-key
- 13.15 choose-greeting-key
- 13.16 record-name-key
- 13.17 record-file-key
- 13.18 listen-file-key
- 13.19 save-file-key
- 13.20 delete-file-key
- 13.21 undelete-file-key
- 13.22 email-key
- 13.23 pause-key
- 13.24 restart-key
- 13.25 ff-key
- 13.26 rew-key
- 13.27 odbc-dsn
- 13.28 record-silence-threshold
- 13.29 record-silence-hits
- 13.30 email-from
- 13.31 db-password-override
- 13.32 dbname
- 13.33 allow-empty-password-auth
- 13.34 auto-playback-recordings
- 14 Database Schema
- 15 API
- 15.1 vm_boxcount
- 15.2 voicemail_inject
- 15.3 vm_prefs
- 15.4 vm_list
- 15.5 vm_delete
- 15.6 vm_read
- 16 Advanced API
- 16.1 vm_fsdb_pref_password_set
- 16.2 vm_fsdb_pref_greeting_set
- 16.3 vm_fsdb_pref_recname_set
- 16.4 vm_fsdb_msg_list
- 16.5 vm_fsdb_msg_email
- 16.6 vm_fsdb_msg_purge
- 16.7 vm_fsdb_msg_delete
- 16.8 vm_fsdb_msg_save
- 16.9 vm_fsdb_msg_undelete
- 16.10 vm_fsdb_auth_login
- 16.11 vm_fsdb_msg_get
- 16.12 vm_fsdb_msg_count
- 17 FAQ
- 18 How do I reload new configuration without restarting FreeSWITCH?
- 19 Do I need a text-to-speech engine installed?
- 20 How do I install sound files?
- 21 Voicemail Voice Prompt / Troubleshooting Problems
- 22 How to update keys for accessing voicemail from outside?
- 23 How can I disable remote login/access to voicemail?
- 24 Can I share voicemail boxes between multiple phones/users?
- 24.1 To Monitor Voicemail
- 24.1.1 1. SUBSCRIBE feature method
- 24.1.2 SNOM 320 configuration
- 24.1.3 2. Force MWI Info in Sofia
- 24.1.1 1. SUBSCRIBE feature method
- 24.2 To Receive Voicemail
- 24.3 Voicemail Callback
- 24.1 To Monitor Voicemail
- 25 Transcribing Voicemail
Synopsis
voicemail,Voicemail,[check] [auth] <profile_name> <domain_name> [<id>]
Dialplan variables
skip_greeting
Skips playback of greeting message when leaving messages. Variable is unset after voicemail application finishes.
If using a command to access voicemail, you can use the following to direct the playout of a custom greeting to the caller:
<action application="set" data="skip_greeting=true"/>
<action application="voicemail" data="default $${domain} $1"/>
However, if using bridge to get to voicemail, you need to use "export" instead of "set" to get the channel variable to the correct leg of the call
<action application="export" data="skip_greeting=true"/>
<action application="bridge" data="loopback/app=voicemail:default $${domain} $1"/>
skip_instructions
Skips playback of instructions when leaving messages. Variable is unset after voicemail application finishes.
<action application="set" data="skip_instructions=true"/>
<action application="voicemail" data="default $${domain} $1"/>
However, if using bridge to get to voicemail, you need to use "export" instead of "set" to get the channel variable to the correct leg of the call
<action application="export" data="skip_instructions=true"/>
<action application="bridge" data="loopback/app=voicemail:default $${domain} $1"/>
For instance, in dialplan/default.xml under <extension name="Local_Extension">, you would modify the xml by:
<action application="export" data="skip_instructions=true"/>
<action application="bridge" data="loopback/app=voicemail:default ${domain_name} ${dialed_extension}"/>
voicemail_callback_dialplan
Set's the dialplan for the voicemail callback. This channel variable will override the parameter 'callback_dialplan' in voicemail.conf.xml
<action application="set" data="voicemail_callback_dialplan=XML"/>
voicemail_callback_context
Set's the dialplan context for the voicemail callback. This channel variable will override the parameter 'callback_context' in voicemail.conf.xml
<action application="set" data="voicemail_callback_context=mydomain.com"/>
Controlling User Parameters & Variables
When the following parameters are set in the extension conf files located in (conf/directory/'extension'.xml or conf/directory/default/'extension'.xml), they set options for your voicemail users
vm-enabled
When set to false this user will not have a voicemail box. This means busy and no answer calls will not forward to a voicemail box, nor will the user be able to log in to a voicemail box.
vm-alternate-greet-id
voicemail_alternate_greet_id
The parameter allows you to override the default extension or phone number spoken by the system in the voicemail greeting. This can also be set in the dialplan before calling the voicemail app.
This controls system greetings that read back a phone number, not user recorded greetings. To change to a different recorded greeting, use voicemail_greeting_number below.
Example setting the parameter in the user's directory entry. This example will say "8661234567" in the voicemail generic system greeting instead of the extension number 1004.
Parameter set in user directory entry
<!-- note use of dashes in parameter name -->
<include>
<user id="1004">
<params>
<param name="password" value="xyzzy"/>
<param name="vm-password" value="1234"/>
<param name="vm-alternate-greet-id" value="8661234567"/>
</params>
<variables>
<variable name="toll_allow" value="domestic,local"/>
<variable name="user_context" value="default"/>
<variable name="effective_caller_id_number" value="703-591-1635"/>
<variable name="effective_caller_id_name" value="Frank Haynes"/>
<variable name="callgroup" value="tech_support"/>
</variables>
</user>
</include>
Example setting the variable before trasferring to voicemail. This example will say "2024561000" in the voicemail greeting instead of the extension number, for example 1019.
Variable set in dialplan
<!--
dial the extension (1000-1019) for 30 seconds and go to voicemail if the
call fails (continue_on_fail=true), otherwise hang up after a successful
bridge (hangup_after_bridge=true)
-->
<extension name="Local_Extension">
<condition field="destination_number" expression="^(10[01][0-9])$">
<action application="export" data="dialed_extension=$1"/>
<action application="set" data="ringback=${us-ring}"/>
<action application="set" data="transfer_ringback=$${hold_music}"/>
<action application="set" data="call_timeout=30"/>
<action application="set" data="hangup_after_bridge=true"/>
<action application="set" data="continue_on_fail=true"/>
<action application="bridge" data="user/${dialed_extension}@${domain_name}"/>
<action application="answer"/>
<!-- Note the use of underscore_ between elements of the variable name -->
<action application="export" data="voicemail_alternate_greet_id=2024561000"/>
<action application="sleep" data="1000"/>
<action application="bridge" data="loopback/app=voicemail:default ${domain_name} ${dialed_extension}"/>
</condition>
</extension>
voicemail_greeting_number
Selects the user-recorded greeting to play.
If using a command to access voicemail, you can use the following to direct the playout of a custom greeting to the caller:
<action application="set" data="voicemail_greeting_number=1"/>
<action application="voicemail" data="default $${domain} ${dialed_extension}"/>
However, if using bridge to get to voicemail, you need to use "export" instead of "set" to get the channel variable to the correct leg of the call
<action application="export" data="voicemail_greeting_number=1"/>
<action application="bridge" data="loopback/app=voicemail:default $${domain} ${dialed_extension}"/>
By default, either of the above would play the file in $${base_dir}/storage/voicemail/default/$${domain}/<user>/greeting_1.wav. However, this file is not created until the user has recorded a custom greeting in slot 1.
If you have defined voicemail_greeting_number in the user's XML directory entry and would like to follow that value then execute the set_user app before transferring to voicemail.
http-allowed-api
This allows the user to use the web vm
<param name="http-allowed-api" value="voicemail"/>
vm-disk-quota
This will put a limit to the length of voicemail messages a user can store. If 0 or missing doesn't make any limitation. Default is no limitation.
The following example will limit the user's voicemail box to 30 seconds. When the limit exceed, The caller will hear "mailbox is full, please try your call again later, goodbye".
<param name="vm-disk-quota" value="30"/>
vm-mailto
This is the user's email address, default: undefined.
(originally called email-addr. Use vm-mailto instead)
This is defined in the directory for the particular user as a param. Multiple email addresses can be defined using a comma-separated list.
<param name="vm-mailto" value="user101@mydomain.com" />
vm-mailfrom
This is the FROM address to send the email, default: undefined
This is defined in the directory for the particular user as a param.
<param name="vm-mailfrom" value="noreply@yourdomain.com" />
in the voicemail template you can get this value using: ${voicemail_email_from}
vm-notify-mailto
The address you want notification messages sent to, default: same as vm-mailto.
This is defined in the directory for the particular user as a param.
<param name="vm-notify-mailto" value="user101_manager@yourdomain.com" />
vm-password
This is the user's configured voicemail PIN. This is additional to the voicemail password that the user can change in the voicemail system. If the value is set to "user-choose", then there is no configured password and only the user set password is used. Note that if you set the vm_password in the directory XML, any changes to the password from a phone are stored in the voicemail_prefs table. The module does not update the XML. The result is that there will be 2 passwords that can access the mail box, the one set in XML and the one that the user set from the phone.
This is defined in the directory for the particular user as a param.
Example:
<param name="vm-password" value="12345" />
vm-a1-hash
This parameter allows you to avoid sending the voicemail password in plain text. This is the same as the user a1-hash (see [[XML_User_Directory_Guide]]). Set this parameter to the MD5 hash of "userid:domain_name:vm-password". Example:
<!-- The password has been left as a comment for example -->
<!-- <param name="vm-password" value="12345"/> -->
<!-- The MD5 hash of "101:mydomain.com:12345" -->
<param name="vm-a1-hash" value="fd5184d9d36a2009c72e1571abf0493e" />
vm-email-all-messages
Setting to true will send all messages to vm-mailto address (attachment based on vm-attach-file param), default: false
This is defined in the directory for the particular user as a param.
<param name="vm-email-all-messages" value="true" />
vm-notify-email-all-messages
Setting to true will send a notify email to vm-notify-mailto when a vm is left (never has attachment)
default: false
This is defined in the directory for the particular user as a param.
<param name="vm-notify-email-all-messages" value="true" />
vm_cc
Setting this variable will inject the message into the specified voicemail mailbox.
This is defined in the directory for the particular user as a variable.
Please note that the variable 'vm_cc' needs to be set as a channel variable before mod_voicemail is called. When set as a directory variable, it only becomes a channel variable when the UA is authenticated.
Dialplan Example (recommended):
<action application="set" data="vm_cc=1001@mydomain.com"/>
<action application="voicemail" data="default mydomain.com 1000"/>
<!--If you want to cc the message to multiple users, use a comma separated list of users:-->
<action application="set" data="vm_cc=1001@mydomain.com,1002@mydomain.com,1003@mydomain.com"/>
Directory Example:
<include>
<domain name="mydomain.com">
<user id="101">
<params>
<!--Note: for user directory you can use either vm_cc in variables or the vm-cc param-->
<param name="vm-cc" value="1001@mydomain.com,1002@mydomain.com,1003@mydomain.com" />
</params>
<varibles>
<variable name="vm_cc" value="1001@mydomain.com" />
<!--If you want to cc the message to multiple users, use a comma separated list of users:-->
<variable name="vm_cc" value="1001@mydomain.com,1002@mydomain.com,1003@mydomain.com" />
</varibles>
</user>
</domain>
</include>
vm-keep-local-after-email
Setting to false will delete the local copy of the voicemail file after transmission of the mail message. When set to true the voicemail file will be kept locally and set as New for the phone to retrieve.
default: true
Example:
<param name="vm-keep-local-after-email" value="false" />