TUTORIAL VM to email with MP3 attachments

paulnye

Guru
Joined
Apr 17, 2011
Messages
208
Reaction score
2
The email notifications attach a WAV file with the recorded message that someone left you. It would be way better if it could be a MP3 file instead, that way I could play the sound clip right inside my email message (using gmail). For WAV files its a pain :-(
 

rossiv

Guru
Joined
Oct 26, 2008
Messages
2,624
Reaction score
139
I think you can change the format in the voicemail config files. Would certainly require considerably more CPU power, though.
 

paulnye

Guru
Joined
Apr 17, 2011
Messages
208
Reaction score
2
I think you can change the format in the voicemail config files. Would certainly require considerably more CPU power, though.

Before posting I searched in the gui, and searched in the 'voicemail admin' module to see if it was obvious, but couldnt find anything to change from wav to mp3. I would willingly sacrifice CPU capacity for this as I hardly see it go over 5% usage. Will I need to edit a config file manually do you think?
 

paulnye

Guru
Joined
Apr 17, 2011
Messages
208
Reaction score
2
found this field in Voicemail Admin..

vm2mp3.jpg


-----

but cant find any documentation on the allowed syntax. So far I tried mp3, wav49|mp3, mp3|mp3 etc... but when leaving a message you hear the persons greeting, then immediately after you hear, 'press one to accept..' (so it doesnt let you leave a message) BUT, I did get an MP3 file attachment.
I feel that If I knew the syntax, I could get it working without trying to install a 3rd party script (Im a linux noob)
 

rossiv

Guru
Joined
Oct 26, 2008
Messages
2,624
Reaction score
139
Using that script, I got a 0k MP3 attachment. :(
Will keep working on it.
 

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,159
Reaction score
5,192
This was lost in the disaster, but to bring it current...

NOTE: Originally coded by Delta End, Inc for version 1.0 and 2.0

UPDATED on 10/11/14 to support playback on all iPhones and Android devices. See this thread.

With FreePBX 2.11, to get voicemail messages delivered by email in a format you can actually listen to on your computer or cellphone plus optional 15-second transcription of message...

NOTE: This modified script now works with Incredible PBX for Raspberry Pi as well.

Log into your server as root. If you want transcription, before running the script, edit installmp3stt.sh and change transcribe=0 to transcribe=1.

Code:
cd /root
wget http://pbxinaflash.com/installmp3stt.sh
chmod +x installmp3stt.sh
./installmp3stt.sh

Log into FreePBX 2.11 and choose Settings, Voicemail Admin, Settings:

Code:
format: wav|wav49
mailcmd: /usr/sbin/sendmailmp3
 

krzykat

Telecom Strategist
Joined
Aug 2, 2008
Messages
3,145
Reaction score
1,235
I remember there was a thread that had this combined with having speech to text. So you could have the e-mail sent out with the MP3 coupled with the dictation of the message so that one could read it as well as listen to it. Was this that thread or does anyone know where that one is?
 

Cam__

Member
Joined
May 22, 2013
Messages
43
Reaction score
8
If I found the right one, the title of that thread was "Voicemails as MP3 Attachments with Google Transcription" and as far as I can tell from a quick check, Google's cache has some but not all of the pages. However there is enough there to reveal that at the end it had stopped working for all practical purposes because Google had reduced the amount of Speech to Text it would do to the first 15 seconds. If you want to see what is still available, search on that title and view the cached version, then for subsequent pages right click on the page numbers (on the cached page) and copy the link addresses, then put each address into a new Google search with the word "cache:" at the beginning. It appeared to me that out of seven pages, two were missing.

Here are links to the five pages I found:

http://webcache.googleusercontent.com/search?q=cache:http://pbxinaflash.com/community/index.php?threads/voicemails-as-mp3-attachments-with-google-transcription.14923/

http://webcache.googleusercontent.com/search?q=cache:http://pbxinaflash.com/community/index.php?threads/voicemails-as-mp3-attachments-with-google-transcription.14923/page-2

http://webcache.googleusercontent.com/search?q=cache:http://pbxinaflash.com/community/index.php?threads/voicemails-as-mp3-attachments-with-google-transcription.14923/page-4

http://webcache.googleusercontent.com/search?q=cache:http://pbxinaflash.com/community/index.php?threads/voicemails-as-mp3-attachments-with-google-transcription.14923/page-5

http://webcache.googleusercontent.com/search?q=cache:http://pbxinaflash.com/community/index.php?threads/voicemails-as-mp3-attachments-with-google-transcription.14923/page-7

Pages 3 and 6 are missing.
 

matt91

Member
Joined
Jul 29, 2010
Messages
58
Reaction score
5
Ran this last week on PIAF-Green, and it worked fine.

1. Log into your server via SSH as root and...

Code:
cd /root
wget -N http://pbxinaflash.com/installmp3stt.sh
chmod 0755 installmp3stt.sh
./installmp3stt.sh

2. In FreePBX, choose Settings -> Voicemail Admin -> Settings, make the following changes, then click Submit and Reload FreePBX.

Code:
format -> wav
mailcmd -> /usr/sbin/sendmailmp3

3. Leave yourself a voicemail and you should see the first 30 seconds of the voicemail transcribed for you.

From krzykat:
OK - luckily - I'm using Prox for this and had snapshots along the way before doing anything major items so I could go back in time to find out where it fell apart and I've been able to replicate it working and making one change that makes it no longer transcribe:
update-programs (tried to do update-fixes to check on it as well, but first thing it did was run update-programs anyhow which messed it up)
And to get things back, simply re-run the script:
./installmp3stt.sh
 

matt91

Member
Joined
Jul 29, 2010
Messages
58
Reaction score
5
Worked like a charm. I think this should be the default setup for voicemail.

There are a couple of dependencies that are needed on the Pi - lame and flac maybe? It was in that thread. i'll try to look later on, in case someone on a stock Pi wants to use this too.
 

tm1000

Schmoozecom INC/FreePBX
Joined
Dec 1, 2009
Messages
1,360
Reaction score
78
It's against Google TOS as far as I am aware so it would never been a default setup.

Worked like a charm. I think this should be the default setup for voicemail.
 

matt91

Member
Joined
Jul 29, 2010
Messages
58
Reaction score
5
If you look at the installmp3stt.sh script, it tries to determine whether it is running on an ARM-based processor and makes adjustments for that. It also attempts to install lame, flac, dos2unix, and unix2dos, plus asterisk-speech-recog-0.4. See this snippet of the script:

I tried a few times on my two Pi's, and it never auto-installed the dependencies. I seen to recall that the ARM check wasn't working on all Pi's for some reason.
 

tim

New Member
Joined
Jun 24, 2011
Messages
6
Reaction score
2
I'm not running a standard PiaF image (green on XEN, both 32 and 64-bit, pretty modified), but I thought I'd let folks know that lame installation in the script failed with my default setup. From the other posts, it looks like the repositories are set up in the suported PiaF distros so this wouldn't be an issue, but it was for me. I added a repo that has lame, yum installed it, and it works like a champ.

I put in /etc/yum.repos.d/linuxtech.repo:

Code:
[linuxtech]
name=LinuxTECH
baseurl=http://pkgrepo.linuxtech.net/el6/release/
enabled=1
gpgcheck=1
gpgkey=http://pkgrepo.linuxtech.net/el6/release/RPM-GPG-KEY-LinuxTECH.NET

Thanks everyone, this is great!
 

tim

New Member
Joined
Jun 24, 2011
Messages
6
Reaction score
2
By the way, Ward, I really like the new forum. I didn't realize how much I've relied on your forum for the last six or seven years until it was gone -- it was like the googs for asterisk, freepbx, and PiaF (every google result that was worth anything led here). I'm glad it's back and I'm glad you decided to leap headstrong into the 21st century with the new backend :) .

Thank you, and thanks to everyone who contributes. This is an invaluable resource.

Best,
Tim
 

krzykat

Telecom Strategist
Joined
Aug 2, 2008
Messages
3,145
Reaction score
1,235
Does anyone else have issues with this? The transcription portion is not working any longer for me.
 

Members online

Forum statistics

Threads
25,770
Messages
167,440
Members
19,181
Latest member
ejrubin
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