TIPS Change email subject and text for voicemail...

DoctorJ

Member
Joined
Jul 14, 2015
Messages
80
Reaction score
18
I'm running Incredible PBX 13 on Centos 6.7. Voicemail to email works perfectly, sending all voicemails to my configured email account (on gmail).

The problem is that all of the messages sort into a conversation, since they have the same subject. Is it possible to change the subject? The best subject would be something like: "New Voicemail: 212-555-5555" - with the actual callerID and not any CNAM records. In this way, gmail would sort repeat calls from the same caller into a conversation thread, and all new calls as a separate "conversation." We use the PBX in a small doctors' office - we could then easily identify who is "blowing up the phone" as well as listen to the last message before making a return call.

The message text is less critical, but would be far simpler, if it just read:

New Message
Caller: CID
Time: Date / time
Duration: duration

Any thoughts?

Thanks!
 

mainenotarynet

Not really a Guru - Just a long time user
Joined
May 29, 2010
Messages
754
Reaction score
155
/etc/asterisk/voicemail.conf --- emailsubject= emailbody=

in there is well commented stuff and the variables you can use. Emails tend to come out OK but there is also a pagersubject= and pagerbody for SMS messages but those are showing up weird.

to format the way you have above, do it like:
emailbody=New Email Message from:\nCaller: ${CIDNAME}\nLeft at: ${MSGTIME}\nDuration: ${MSGDURATION}

Must be on one line (will wrap but DO NOT press enter in the forming of the line. A \n is a new line marker so \n\n is to make a blank line. A \t is a Tab marker.

The field names I have listed MAY NOT be correct - check the conf file for what they actually are. But they ARE all ther for the information you had listed, and I believe you can use then in the Subject too (don't quote me on that - I don't have mine open right now.

This should help. If you use Maintenance->config edit then save and reload config files (if I add LE SSL to mine this section comes up blank) -- If you use an ftp thing like WinSCP (easier for me) save the file then login as root in SSH and issue asterisk -rx "dialplan reload" and Test by sending a VM on the system

Hope this helps.
 

DoctorJ

Member
Joined
Jul 14, 2015
Messages
80
Reaction score
18
Briefly skimmed through the file using SSH and nano. I found the section; changing the text seems fairly straightforward.

It seems, though, that most of the file, including the section to which you refer, is commented out. Am I missing something? Just change it? Thanks.

Also, after changing the file, should I type exactly

asterisk -rx "dialplan reload"

at the command prompt? Could I also simply reboot the system?

Again, thanks for the help.
 

mainenotarynet

Not really a Guru - Just a long time user
Joined
May 29, 2010
Messages
754
Reaction score
155
If you skimmed then you probably did not notice there are TWO lines there (one is commented out , the other is not). The second is a bit longer as it checks if it is a new Voicemail or a Forwarded message and edits the email accordingly. and if both are commented then look down a little further and you may find one that is NOT commented out.

As for the command - yes type it exactly (including the quote marks) as for just rebooting, I have not tried it that way. but the single line command is about a second to do whereas a reboot takes longer.

Hope this helps
 

DoctorJ

Member
Joined
Jul 14, 2015
Messages
80
Reaction score
18
I don't remember seeing one that is not commented out, but I assume there MUST be one. When I can access the server again, I'll check. Thanks for the update.
 

RoboLord

Member
Joined
Aug 18, 2017
Messages
56
Reaction score
5
Thanks! I was able to use /etc/asterisk/voicemail.conf to edit emailsubject= & emailbody=, but back to the original question: how do we edit the email "from" field to show the caller's number?

EDIT: I answered my own question-
add this:
Code:
fromstring=${VM_CIDNUM}
to:
/etc/asterisk/voicemail.conf

...to change the email "from" field to the ten digit number of the caller. This helps keep all the VM messages from stacking into conversations in gmail.
 
Last edited:

DoctorJ

Member
Joined
Jul 14, 2015
Messages
80
Reaction score
18
OK. So i finally got around to following the instructions above. In my voicemail.conf file, both emailsubject and emailbody were commented out - everywhere. I simply uncommented them, and then changed the subject and body using the excellent instructions above by mainenotarynet.

Simply reloading the dialplan did not work for me. I had to reboot the server in order for the changes to take effect.

In order to get the email formats that I wanted, I used the following:

emailsubject=[PBX]: New Voicemail: ${VM_CALLERID}

emailbody=New Voicemail\n\nCaller: ${VM_CIDNAME}\nPhone: ${VM_CIDNUM}\nTime: ${VM_DATE}\nDuration: ${VM_DUR}\nMailbox: ${VM_MAILBOX}\n\n

The string ${VM_CALLERID} displays {VM_CIDNAME} if the name is available, otherwise it shows {VM_CIDNUM}. If neither variable is known, then it shows "Unknown caller"

Hope that helps! Thanks to @mainenotarynet and @RoboLord
 

DoctorJ

Member
Joined
Jul 14, 2015
Messages
80
Reaction score
18
The saga continues...

After rebooting, I logged into the Incredible GUI, to find this error. The error persists post a second reboot.

Help? It's error 1, btw.

uc
 

DoctorJ

Member
Joined
Jul 14, 2015
Messages
80
Reaction score
18
These settings are configured in the GUI, not voicemail.conf.

DTgqMcAXUAEh6eu.jpg

Restored my PBX from a Digital Ocean backup. Then edited the fields "emailbody" and "emailsubject" under Settings --> Voicemail Admin --> Settings.

Updated as follows (from above):

Code:
emailsubject=[PBX]: New Voicemail: ${VM_CALLERID}

emailbody=New Voicemail\n\nCaller: ${VM_CIDNAME}\nPhone: ${VM_CIDNUM}\nTime: ${VM_DATE}\nDuration: ${VM_DUR}\nMailbox: ${VM_MAILBOX}\n\n

Then hit submit. Then apply config. Tested voicemail and works! Thanks.
 
Last edited:

JFrost

Active Member
Joined
Oct 1, 2016
Messages
351
Reaction score
93
Is this possible to customize on a per vm box basis?

I have a virtual box I'm creating to forward vm to a ticket system and would like that to have different subject and body contents than the global.
 

kenn10

Well-Known Member
Joined
Dec 16, 2007
Messages
3,779
Reaction score
2,190
Is this possible to customize on a per vm box basis?
I don't think so. I see no way to do that either through the FreePBX GUI or via Asterisk configuration files.
 

JFrost

Active Member
Joined
Oct 1, 2016
Messages
351
Reaction score
93
I don't think so. I see no way to do that either through the FreePBX GUI or via Asterisk configuration files.
That's a shame. And surprising. I would think I'm not the first to want to use it that way. I wonder what other shops do?

I've been thinking about maybe I can rig smth using diff variables.
I found this: https://www.voip-info.org/asterisk-detailed-variable-list/
and wondering if the ones under the "Voicemail() application variables" section are teh only ones I can use in that tab or are any others applicable (like maybe the Standard ones at top or maybe certain others)?

Is there any way to do some kind of speech to text and get that into the VM email subject? Maybe through some kind of variable?

Just trying to think out loud of ways to workaround.

thx.
 

Members online

Forum statistics

Threads
25,810
Messages
167,755
Members
19,240
Latest member
nikko
Get 3CX - Absolutely Free!

Link up your team and customers Phone System Live Chat Video Conferencing

Hosted or Self-managed. Up to 10 users free forever. No credit card. Try risk free.

3CX
A 3CX Account with that email already exists. You will be redirected to the Customer Portal to sign in or reset your password if you've forgotten it.
Top