SOLVED Voicemail to Email on Incredible PBX on Vultr

kenn10

A lesser geek
Joined
Dec 16, 2007
Messages
1,013
Reaction score
208
After trialing VULTR for awhile, I feel it is stable enough to host my muilti-home PBX. Unfortunately, I cannot get the voicemail to email to work on it.

I did the stock CentOS 7 64-bit install and loaded the basic PIAF 13-13.2 on it. Everything works fine except for sendmail. It seems that for the past 5 years, every time I load a PIAF on any server it takes a lot of trial and error to get the system to properly email notifications.

@wardmundy When I was playing with Wazo, I was impressed that the functionality for emailing notifications and voicemail just worked. The same applies for 3CX. Is there something that can be done with Incredible PBX distributions so that email will also just work on this platform?

In the meantime, what needs to be done with the sendmail setup on VULTR so that I can use GMail to send the voicemail to email? I've read numerous forum posts and tips/tricks that don't work out. I'm not sure if I need to have VULTR unblock port 25 or use the procedures using port 587, etc. Nothing seems to work.

Any help is appreciated.
 

phonebuff

Guru
Joined
Feb 7, 2008
Messages
900
Reaction score
61
Can check the maillog in /var/log and see what it's complaining about -
 

kyle95wm

Phone Genius Owner
Joined
Apr 16, 2016
Messages
522
Reaction score
90
Location
Midhurst, ON, Canada
I wrote a shell script to help with this purpose:

PLEASE NOTE: You will require the sendmailmp3 binary for vm to email to work. This script will not check for this requirement.

replace "yourname" with your gmail username without the @gmail.com and replace "yourpassword" with either your main gmail password, or an app password if using 2FA:

Code:
#!/bin/bash

cd /etc/mail || exit
hostname -f > genericsdomain
touch genericstable
makemap -r hash genericstable.db < genericstable
mv sendmail.mc sendmail.mc.original
wget http://nerdvittles.dreamhosters.com/pbxinaflash/source/sendmail/sendmail.mc.gmail
cp sendmail.mc.gmail sendmail.mc
mkdir -p auth
chmod 700 auth
cd auth || exit
echo AuthInfo:smtp.gmail.com \"U:smmsp\" \"I:yourname\" \"P:yourpassword\" \"M:PLAIN\" > client-info
echo AuthInfo:smtp.gmail.com:587 \"U:smmsp\" \"I:yourname\" \"P:yourpassword\" \"M:PLAIN\" >> client-info
echo AuthInfo:smtp.gmail.com:465 \"U:smmsp\" \"I:yourname\" \"P:yourpassword\" \"M:PLAIN\" >> client-info
chmod 600 client-info
makemap -r hash client-info.db < client-info
cd /etc/mail || exit
yum -y install sendmail-cf
make
service sendmail restart
echo "test from server $(curl -s icanhazip.com)" | mail -s testmessage [email protected]
 

kenn10

A lesser geek
Joined
Dec 16, 2007
Messages
1,013
Reaction score
208
Thanks @kyle95wm but I already tried that. The fact that fail2ban was sending messages and the phone system was not led me to look more at the email settings. I noticed in the Settings > Voicemail Admin under the Email Config tab, there is a field called "Mail Command" at the bottom. This field has "usr/local/sbin/sendmailmp3" in it. There was no such file located on my installation.

I found this link http://bernaerts.dyndns.org/linux/179-asterisk-voicemail-mp3 which contained the script for sendmailmp3 and added that in the directory.

@wardmundy you might want to check to see why this did not come across in the latest Incredible PBX installation roll-up.
 

kenn10

A lesser geek
Joined
Dec 16, 2007
Messages
1,013
Reaction score
208
I installed the basic skinny version for CentOS 7. Dind't need all the extra's in the Whole Enchilada.
 

kyle95wm

Phone Genius Owner
Joined
Apr 16, 2016
Messages
522
Reaction score
90
Location
Midhurst, ON, Canada
Makes sense. If memory serves, you should be able to find the sendmailmp3 binary in the part that talks about installing IBM STT. In the download, there is a sendmailmp3 binary - both one with IBM compatibility, and one without.

I understand that Ward is trying to make the install as lean as possible, but seriously, at least include vanilla sendmailmp3 as a standard so that things like this don't happen to unsuspecting users.
 

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
15,247
Reaction score
2,670
Here we go. Lean means Lean. Can't have it both ways. Bring Enchilada up on VirtualBox and grab the pieces you'd like to use.
 

billsimon

Experienced in Asterisk, FreePBX, and SIP
Joined
Jan 2, 2011
Messages
995
Reaction score
330
I understand that Ward is trying to make the install as lean as possible, but seriously, at least include vanilla sendmailmp3 as a standard so that things like this don't happen to unsuspecting users.
The unadulterated FreePBX can send voicemail-by-email just fine, in wav format. If you want to "enhance" it by converting to mp3 then you should be able to figure out what you're doing; otherwise just do it the standard way. "sendmailmp3" is not a standard. Why do you need to convert to mp3 anyway? It's not like these wav files are large. They are 8khz voicemail files, a few hundred KB at most...
 

kenn10

A lesser geek
Joined
Dec 16, 2007
Messages
1,013
Reaction score
208
I could care less about converting voicemail to mp3. The only reason I was looking for sendmailmp3 is because the lean version I spun up had it as the "Mail Command" in the FreePBX settings on the Settings > Voicemail Admin > Settings > Email Config page. If I had know it was not supposed to be there, I would have simply changed it to the sendmail command.

There are so many tweaks and improvements made in the Incredible PBX deployments that I take whatever is shown as gospel when I spin it up.

upload_2018-6-9_21-22-2.png
 
Last edited:

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
15,247
Reaction score
2,670
Just kidding. We'll add sendmailmp3 to the Lean install as soon as we get back to home base. The reason for converting to MP3 was because a lot of smartphones couldn't play the wav files.
 

billsimon

Experienced in Asterisk, FreePBX, and SIP
Joined
Jan 2, 2011
Messages
995
Reaction score
330
Just kidding. We'll add sendmailmp3 to the Lean install as soon as we get back to home base. The reason for converting to MP3 was because a lot of smartphones couldn't play the wav files.
Is it the GSM-encoded ones? I wonder what could be the problem playing WAV files?
 

[email protected]

New Member
Joined
Jul 24, 2018
Messages
2
Reaction score
0
I have IncrediblePBX 13-13.3 Lean on CentOS6, and had the same error. Placing semdmailmp3 in /usr/local/sbin/ fix the problem. I have uploaded the sendmailmp3 future readers, if you prefer not to take the time to bring up the Whole Enchilada upgrade in a separate VM, just rename sendmailmp3.txt to sendmailmp3 and place it in /usr/local/sbin/.

On a secondary note, I haven't tested it out but I do believe that if you just remove /usr/local/sbin/sendmailmp3 or change to /usr/sbin/sendmail under mail command in Settings/Voicemail Admin/Settings/Email Config in the webui will fix it also, but you will have wav instead of mp3.


/usr/sbin/sendmail
 

Attachments

Members online

PIAF 5 - Powered by 3CX

Forum statistics

Threads
22,456
Messages
138,073
Members
14,620
Latest member
Brads#Bell