Voicemail email configuration

Get help with installing, upgrading and running Asterisk.

Moderators: muppetmaster, Moderator, Support

Voicemail email configuration

Postby paul1975 » Wed Apr 18, 2012 2:26 am

Hi

I'm having trouble configure voicemail to send emails.

I have Asterisk 1.6 running on a Synology ds108j. I've installed nail to be able to send emails under my gmail credentials.

Basically, I can get Asterisk to send an email, but with the following observations:

1. Only wav49 format works. If I set format=wav, I get errors such as 'Can't find format wav'
2. I don't seem able to override the default 'messagebody'. The email that is sent always comes through with some default message "Just wanted to let you know you were just left a 0:04 long message ..."
3. The 'wav' attachment isn't coming through as an attachment, but instead arrives as some 'MIME mulitpart' nonsense:

------voicemail_1200025152611019739
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit

Dear CiscoFon:

Just wanted to let you know you were just left a 0:04 long message (number 1)
in mailbox 2000 from xxx, on Wednesday, April 18, 2012 at 07:29:20 AM so you might
want to check it when you get a chance. Thanks!

--Asterisk

------voicemail_1200025152611019739
Content-Type: audio/x-WAV; name="msg0000.WAV"
Content-Transfer-Encoding: base64
Content-Description: Voicemail sound attachment.
Content-Disposition: attachment; filename="msg0000.WAV"

UklGRt0aAABXQVZFZm10IBQAAAAxAAEAQB8AAFkGAABBAAAAAgBAAWZhY3QEAAAAQIMAAGRh
dGGpGgAAHindnYQiYNs0cuPYC2Acx3HbRiSAG7mN20QHYNRGjhv3kbNhTi0ENpYix5UrALhx
48qRXwS4TRzJkekGNpKjNm4eKdfVZAxgI8lS5CYjYCJJjh0JS4DbOG4UxwyAmzZt3Padc2Gt
MgLYkRw3cr4CNrIcR5LkAlhuIjeOuAI6ciNXjp8p19EULmDjRq5ciy1gnThyY9tEgCNHkht1
JWDkyLIk65VSHU3wBNiR27hxwQK0cZpIkuMAxo0cR3LABlaS5Thy3zjjlQILgOO2beQGTYAb
OU4bmURAGymSHEkkgCS5kdzqjXLdDXYESJbaOJIxAraNJEeO3QS2beRKcnMCJpLcyG3eGdfV
xAOA5LaR5QgGYCRHjhyZS4Act2ncVi9gY7mRXOeNMR2NPATKkeVYjncCtnWjuGnWBraR48iR
9QC0kmTJll4Z182Ga4BkR5Lk5g5g4zhtGzlPYNvGUSSJJIAkSY7l6JkR3UlmACZOI8eNtAKo
jdy2beAAOHIjx5FsAMayZEeOHhnZ0UYHQBu3beSmLmAjuW0bxy6ApEht24YjYCNHduPoiZPh
TFACNo4luW3EAkaS3EZy1wTIjeW2cqwENnJdx5GeGZ+ZIAtg5UiSJJksgCM7kuWmImDkyG3c
Vk9gJElu2+aVsRkprQQ2cuRIbkACto0jJW4xAqZtG0mOVwTGcSvJkZ4o09mkZoAlR47kaCyA
27ZxIwktYONYkiNlS6AcyW1kiY6zIUo6BDhO4yZp7wK4aa24krwASIosuXLcAMrSIseKaIlZ
etc.etc.

My voicemail.conf file is along the lines of:

[general]
format=wav49
attach=yes
messagebody=Test
...

Any assistance will be much appreciated, I've been battling with this for hours!

Thanks
Paul
paul1975
Newsterisk
 
Posts: 7
Joined: Fri Apr 13, 2012 12:32 am

Re: Voicemail email configuration

Postby david55 » Wed Apr 18, 2012 4:37 am

paul1975 wrote:3. The 'wav' attachment isn't coming through as an attachment, but instead arrives as some 'MIME mulitpart' nonsense:


That's how attachments have been handled in internet mail for more than the last decade. Before that, the methods were more ad hoc and required heuristics in the mail client.
david55
Moves Like Spencer
 
Posts: 7723
Joined: Fri Sep 26, 2008 5:03 am

Re: Voicemail email configuration

Postby paul1975 » Wed Apr 18, 2012 7:05 am

MIME might be the proctcol used to deliver the message, but you would not expect an email client to present the 'raw' MIME code to you as text content.

I think the issue is something to do with using "nail" as the mailcmd instead of "sendmail". With sendmail you can do "cat <attachment-stream> | sendmail -t target_address. But with nail, you have to do "nail -a <attachment path>". So the question becomes, how can I override the way Asterisk uses the 'mailcmd'? I could just write a shell script to do this, and set the mailcmd as the path to this script, but surely there is a more elegant way to do this by editing the Asterisk configuration.
paul1975
Newsterisk
 
Posts: 7
Joined: Fri Apr 13, 2012 12:32 am

Re: Voicemail email configuration

Postby david55 » Wed Apr 18, 2012 7:10 am

No. The defacto standards for program submission of mail is the sendmail one, which is why alternative MTAs will emulate sendmail for submission purposes. They question is why are you using a non-conforming mail program, possibly one intended only for human use?

The submission to sendmail will include the top level headers, not just the ones for the individual parts.
david55
Moves Like Spencer
 
Posts: 7723
Joined: Fri Sep 26, 2008 5:03 am

Re: Voicemail email configuration

Postby david55 » Wed Apr 18, 2012 7:19 am

nail appears to be based on mailx. A CentOS build of mailx users /usr/sbin/sendmail to actually submit the email. You should not be using mailx to submit mail from a program.

[root@centos code]# strings /bin/mailx | grep sendmail
[-- sendmail-options ...]
/usr/sbin/sendmail
david55
Moves Like Spencer
 
Posts: 7723
Joined: Fri Sep 26, 2008 5:03 am

Re: Voicemail email configuration

Postby paul1975 » Fri Apr 20, 2012 4:01 am

David, thanks for your response. I've ended up using msmtp, as it looks like sendmail is difficult to configure without a static IP address. msmtp works well.
paul1975
Newsterisk
 
Posts: 7
Joined: Fri Apr 13, 2012 12:32 am

Re: Voicemail email configuration

Postby dejanst » Sun Apr 29, 2012 2:04 pm

One good option would also be using SSMTP instead of sendmail. SSMTP is also very simple to set up.
dejanst
Astmaster
 
Posts: 594
Joined: Tue Apr 27, 2010 7:14 am
Location: Ljubljana, Slovenia


Return to Asterisk Support

Who is online

Users browsing this forum: bharanikumar, Google [Bot] and 30 guests