Email notification won't be sent if it is configured via FreePBX GUI Voicemail Admin setting

Hi,

This might be a beginner question; however, after upgrading from FreePBX12 to FreePBX13, I noticed voicemail email notification stopped working.

Currently it is cured by commenting the parameters created between [general] and [default] of /etc/asterisk/voicemail.conf file, but if I do so, I will receive notification message with “Just wanted to let you know you were just left a x:xx long message…” in email body with .wav file attachment.

I am not sure where the message is set, I looked /etc/asterisk folder but I don’t see the file with such email body… I remember the message wasn’t like that in FreePBX12.

I prefer to set email body in below format, and I prefer to manage via FreePBX GUI.

 ${VM_NAME},
 There is a new voicemail in mailbox ${VM_MAILBOX}:
	From:	${VM_CALLERID}
	Length:	${VM_DUR} seconds
	Date:	${VM_DATE}
 Dial *98 to access your voicemail by phone.
 Visit http://AMPWEBADDRESS/ucp to check your voicemail with a web browser.

Below is my setup, instead of using FreePBX distribution, I installed asterisk and FreePBX manually on CentOS7, and email relay is setup via Postfix.

  • FreePBX version: 13.0.190.19
  • Asterisk version: 13.6.0
  • Linux version: CentOS Linux release 7.3.1611 (Core)

The mail command from linux console works, so I am guessing it is about my either asterisk or FreePBX setting.

Any suggestion is appreciated. Thank you!

I’d submit a feature request, but instead of something like “broke want old” message, ask that the body of this message (in fact, all of them) was stored in the database so that we could manage all of the messages the system sends out.

Throw in a “management” page that helps you edit the mail messages, and Bob’s Your Uncle.

You can set that from the GUI. Voice Mail Admin/Settings/Email Config

I guess I need to implement FreePBX 13 on a couple more servers…

Thank you for your comment, yes, actually I copied it from the Email Body field, and once I submit and applied config, I see below parameters are inserted between [general] and [default] section of /etc/asterisk/voicemail.conf

[general]
#include "vm_general.inc"
#include "vm_email.inc"
attach=yes
charset=UTF-8
emailbody=${VM_NAME},\n\nThere is a new voicemail in mailbox ${VM_MAILBOX}:\n\n\tFrom:\t${VM_CALLERID}\n\tLength:\t${VM_DUR} seconds\n\tDate:\t${VM_DATE}\n\nDial *98 to access your voicemail by phone.\nVisit http://AMPWEBADDRESS/ucp to check your voicemail with a web browser.\n
emaildateformat=%A, %B %d, %Y at %r
emailsubject=PBX Voicemail Notification
envelope=yes
forcegreetings=no
forcename=yes
fromstring=PBX Phone System
imapclosetimeout=60
imapgreetings=yes
imapopentimeout=60
imapreadtimeout=60
imapwritetimeout=60
maxgreet=60
maxlogins=3
maxmsg=100
maxsecs=300
maxsilence=3
minsecs=5
moveheard=yes
nextaftercmd=yes
operator=yes
pagerbody=New ${VM_DUR} long msg in box ${VM_MAILBOX}\nfrom ${VM_CALLERID}, on ${VM_DATE}
pagerfromstring=PBX Phone System
pagersubject=PBX Voicemail Notification
pbxskip=no
pollfreq=30
pollmailboxes=yes
review=no
saycid=no
sayduration=yes
searchcontexts=no
sendvoicemail=yes
smdienable=no
tempgreetwarn=yes
usedirectory=yes
[default]

But if these parameters are added in, email won’t be sent out. (I can record voicemail, but the recorded voicemail is neither stored nor sent via email…)

If those added parameters are commented with “#” in the beginning of line, and restart asterisk, voicemail email notification feature works.

The # is to include the file , asterisk comments with ; so you are doing the opposite of what you wanted.

1 Like

Hi dicko,

Ah, amateur me, humbled!

So I commented with “;” for those parameter created by voicemail admin GUI except emailbody line and restarted asterisk with “fwconsole restart” command, I started receiving voicemail notification email with the format of what I want.

For some reason, if those parameters created by FreePBX are in voicemail.conf file, email notification is not working; I am guessing some parameters are not favorable with my setting.

I will follow up by commenting out one by one when I have spare time, but for now it is working great, so I will leave it like that!

Once again, thank you very much for your insight, that saved a lot of debugging time!!!