How to setup Voicemail Admin Settings


Are there any how to documentation on how to setup the Voicemail Admin. Especially, how to setup your email settings so that voicemails will be emailed to users/extensions? Also is there anything special that needs to be done for google app users or gmail?

Nothing you set in voicemail admin will configure the portion of your system that sends emails. The configuration options in voicemail admin allow you to set things like the email text, the sender, etc. However, this won’t make email actually go through.

Most CentOS installs include a program called Sendmail. Sendmail must be configured to send out emails from the Linux commands prompt, and is fairly complicated to configure. I was never able to figure out how to configure it to relay through Gmail.

There is another email program that you can use with CentOS called Postfix. Postfix is the default mail client used on the FreePBX Distro. There are a number of guides to configuring Postfix to relay mail through Gmail. Eventually, I’ll be writing a guide on how to do it, but that’s quite a bit down my list.

Yeah that’s what I found in the other forums. It seems that the voicemail admin settings are rather new and didn’t require for you to go into those settings.

I found out how to make FreePBX to send email for google apps email.

  1. Uninstall sendmail and postfix if they are installed.
    yum remove postfix
    Loaded plugins: fastestmirror, presto
    Setting up Remove Process
    Resolving Dependencies
    –> Running transaction check
    —> Package postfix.x86_64 2:2.7.4-1.fc14 set to be erased
    —> Package sendmail.x86_64 8.14.4-10.fc14 set to be erased
    –> Finished Dependency Resolution
  2. Install ssmtp on the server.
    yum -y install ssmtp
    Setting up Install Process
    Resolving Dependencies
    –> Running transaction check
    —> Package ssmtp.x86_64 0:2.61-15.fc14 set to be installed
    –> Finished Dependency Resolution
  3. Backup the default ssmtp.conf file so we can create a new one with our gmail account.
    cd /etc/ssmtp
    mv ssmtp.conf
    touch ssmtp.conf
  4. Create a new config for ssmtp and add the gmail account to it by pasting in the below config and modify the email address and password.


ssmtp config for gmail or google apps account
[email protected]
[email protected]
[email protected]
5. Next you will need to add an entry for the root user to the revaliases file.


config for asterisk to email voicemail messages

root:[email protected]
6. Now you can test sending a message from the command line.
[[email protected] /]# ssmtp [email protected]
To: [email protected]
From: [email protected]
Subject: Test Mail Connection

The mail was sent from my Linux server

[use CTRL + d to send email]
7. Asterisk needs to be configured to use ssmtp to email voicemails, to do this we are going to edit voicemail.conf in the asterisk directory.
; /etc/asterisk/voicemail.conf
; configure asterisk voicemail to use ssmtp to use a gmail account
format = wav
attach = yes
delete = yes
maxmsg = 1000
envelope = yes
skipms = 3000
maxsilence = 10
silencethreshold = 128
maxlogins = 3
emaildateformat = %A, %B %d, %Y at %r

mailcmd=/usr/sbin/ssmtp -t
fromstring=Phone Greetings VM
pagerfromstring=Phone Greetings VM

4400 => 123456,4400,[email protected],[email protected],attach=yes|delete=1
4401 => 123456,4401,[email protected],[email protected],attach=yes
8. Just reload the voicemail config or restart asterisk and it will now email any new voicemail’s.
[[email protected] /]# asterisk -r
Asterisk, Copyright © 1999 - 2010 Digium, Inc. and others.
Created by Mark Spencer
Asterisk comes with ABSOLUTELY NO WARRANTY; type ‘core show warranty’ for details.
This is free software, with components licensed under the GNU General Public
License version 2 and other licenses; you are welcome to redistribute it under
certain conditions. Type ‘core show license’ for details.

Connected to Asterisk currently running on phone-call (pid = 10713)
phone-callCLI> module reload
CLI> exit
[[email protected] /]#

I wonder whether the modification to voicemail.conf is needed. In the past, I’ve removed sendmail, installed Postfix, and found that Postfix just took over without a modification to any asterisk .conf files.

Also, in FreePBX 2.9, I assume you’d use the voicemail admin module instead of modifying voicemail.conf.

No i didn’t have to do anything to voicemail.conf. The details that i have up there should let you be able to have google apps email work with your free pbx system as it worked for me in just minutes. I am on to my last part of getting this system up and running. Figuring out fax! =)

Your instructions DO involve doing something with voicemail.conf. So, I don’t understand your statement that you didn’t have to do anything with voicemail.conf.


Here is a gMail Relay on CentOS using postfix guide.
Hope it helps.