Voicemail to Email

Hi all,

I’m a student working on a design for my module’s project. My underlying system is up and running and I’ve put lots of features. But I just couldn’t get the voicemail to email feature to work. I was experimenting and trying lots of settings, and somehow I managed to get it to work for four times (it went to my email’s spam folder). However, it appears to be random. The same settings don’t work anymore. All the instructions I’ve found seem to be fairly straightforward, and for the life of me I just can’t see what I’m doing wrong. Any help is much appreciated.

Tried with:
Fedora 16 with Asterisk 1.8 with Sendmail installed
Fedora 16 with Asterisk 10 with Sendmail installed

My current voicemail.conf (the commented lines are settings that I was experimenting with):
[general]
serveremail = asterisk
format = wav
attach = yes
;serveremail=asterisk@linux-support.net
;fromstring= The Asterisk PBX
;sendvoicemail=yes
;emailonly=no
;emailsubject= You have a new Voicemail
;emailbody= You have received a new voicemail

[login]
5152053 => 1234,Alastair Irons,yoboy7@gmail.com
5152068 => 1234,Chris Keech,yoboy7@gmail.com
5152095 => 1234,Anne Simmister,yoboy7@gmail.com,attach=yes

Note: I’ve also tried ‘service start sendmail’ in Terminal to make sure Sendmail is running. I even went as far as to uninstall Sendmail and install Postfix (didn’t work, messed up my asterisk’s repositories and had to reinstall my asterisk). Again, any help is much appreciated.

Logs from both Asterisk and the MTA?

Hi David,

Thanks for looking into this. Forgive me if I’m posting the wrong thing. I’m relatively new at this. Here’s what I got in /var/log/asterisk/messages:

[Apr 10 19:56:37] WARNING[1927] http.c: Got 1 addresses
[Apr 10 19:56:37] NOTICE[1927] cdr.c: CDR simple logging enabled.
[Apr 10 19:56:37] NOTICE[1927] loader.c: 204 modules will be loaded.
[Apr 10 19:56:39] WARNING[1927] loader.c: Module ‘res_srtp.so’ was not compiled with the same compile-time options as this version of Asterisk.
[Apr 10 19:56:39] WARNING[1927] loader.c: Module ‘res_srtp.so’ will not be initialized as it may cause instability.
[Apr 10 19:56:39] WARNING[1927] loader.c: Module ‘res_srtp.so’ could not be loaded.
[Apr 10 19:56:39] WARNING[1927] loader.c: Module ‘res_pktccops.so’ was not compiled with the same compile-time options as this version of Asterisk.
[Apr 10 19:56:39] WARNING[1927] loader.c: Module ‘res_pktccops.so’ will not be initialized as it may cause instability.
[Apr 10 19:56:39] WARNING[1927] loader.c: Module ‘res_pktccops.so’ could not be loaded.
[Apr 10 19:56:39] NOTICE[1927] res_smdi.c: No SMDI interfaces are available to listen on, not starting SMDI listener.
[Apr 10 19:56:39] WARNING[1927] loader.c: Module ‘app_setcallerid.so’ was not compiled with the same compile-time options as this version of Asterisk.
[Apr 10 19:56:39] WARNING[1927] loader.c: Module ‘app_setcallerid.so’ will not be initialized as it may cause instability.
[Apr 10 19:56:39] WARNING[1927] loader.c: Module ‘app_setcallerid.so’ could not be loaded.
[Apr 10 19:56:39] WARNING[1927] loader.c: Error loading module ‘chan_mgcp.so’: /usr/lib/asterisk/modules/chan_mgcp.so: undefined symbol: sched_context_destroy
[Apr 10 19:56:39] WARNING[1927] loader.c: Module ‘chan_mgcp.so’ could not be loaded.
[Apr 10 19:56:39] WARNING[1927] loader.c: Module ‘func_speex.so’ was not compiled with the same compile-time options as this version of Asterisk.
[Apr 10 19:56:39] WARNING[1927] loader.c: Module ‘func_speex.so’ will not be initialized as it may cause instability.
[Apr 10 19:56:39] WARNING[1927] loader.c: Module ‘func_speex.so’ could not be loaded.
[Apr 10 19:56:40] WARNING[1927] loader.c: Module ‘app_saycountpl.so’ was not compiled with the same compile-time options as this version of Asterisk.
[Apr 10 19:56:40] WARNING[1927] loader.c: Module ‘app_saycountpl.so’ will not be initialized as it may cause instability.
[Apr 10 19:56:40] WARNING[1927] loader.c: Module ‘app_saycountpl.so’ could not be loaded.
[Apr 10 19:56:40] WARNING[1927] loader.c: Module ‘app_dahdibarge.so’ was not compiled with the same compile-time options as this version of Asterisk.
[Apr 10 19:56:40] WARNING[1927] loader.c: Module ‘app_dahdibarge.so’ will not be initialized as it may cause instability.
[Apr 10 19:56:40] WARNING[1927] loader.c: Module ‘app_dahdibarge.so’ could not be loaded.
[Apr 10 19:56:40] WARNING[1927] loader.c: Module ‘app_page.so’ was not compiled with the same compile-time options as this version of Asterisk.
[Apr 10 19:56:40] WARNING[1927] loader.c: Module ‘app_page.so’ will not be initialized as it may cause instability.
[Apr 10 19:56:40] WARNING[1927] loader.c: Module ‘app_page.so’ could not be loaded.
[Apr 10 19:56:40] WARNING[1927] loader.c: Error loading module ‘format_sln16.so’: /usr/lib/asterisk/modules/format_sln16.so: undefined symbol: __ast_format_register
[Apr 10 19:56:40] WARNING[1927] loader.c: Module ‘format_sln16.so’ could not be loaded.
[Apr 10 19:56:40] WARNING[1927] loader.c: Module ‘app_meetme.so’ was not compiled with the same compile-time options as this version of Asterisk.
[Apr 10 19:56:40] WARNING[1927] loader.c: Module ‘app_meetme.so’ will not be initialized as it may cause instability.
[Apr 10 19:56:40] WARNING[1927] loader.c: Module ‘app_meetme.so’ could not be loaded.
[Apr 10 19:56:40] WARNING[1927] loader.c: Module ‘chan_usbradio.so’ was not compiled with the same compile-time options as this version of Asterisk.
[Apr 10 19:56:40] WARNING[1927] loader.c: Module ‘chan_usbradio.so’ will not be initialized as it may cause instability.
[Apr 10 19:56:40] WARNING[1927] loader.c: Module ‘chan_usbradio.so’ could not be loaded.
[Apr 10 19:56:40] WARNING[1927] loader.c: Error loading module ‘format_ogg_vorbis.so’: /usr/lib/asterisk/modules/format_ogg_vorbis.so: undefined symbol: __ast_format_register
[Apr 10 19:56:40] WARNING[1927] loader.c: Module ‘format_ogg_vorbis.so’ could not be loaded.
[Apr 10 19:56:40] WARNING[1927] loader.c: Module ‘app_readfile.so’ was not compiled with the same compile-time options as this version of Asterisk.
[Apr 10 19:56:40] WARNING[1927] loader.c: Module ‘app_readfile.so’ will not be initialized as it may cause instability.
[Apr 10 19:56:40] WARNING[1927] loader.c: Module ‘app_readfile.so’ could not be loaded.
[Apr 10 19:56:40] WARNING[1927] loader.c: Module ‘codec_speex.so’ was not compiled with the same compile-time options as this version of Asterisk.
[Apr 10 19:56:40] WARNING[1927] loader.c: Module ‘codec_speex.so’ will not be initialized as it may cause instability.
[Apr 10 19:56:40] WARNING[1927] loader.c: Module ‘codec_speex.so’ could not be loaded.
[Apr 10 19:56:40] WARNING[1927] loader.c: Module ‘app_saycounted.so’ was not compiled with the same compile-time options as this version of Asterisk.
[Apr 10 19:56:40] WARNING[1927] loader.c: Module ‘app_saycounted.so’ will not be initialized as it may cause instability.
[Apr 10 19:56:40] WARNING[1927] loader.c: Module ‘app_saycounted.so’ could not be loaded.
[Apr 10 19:56:40] WARNING[1927] loader.c: Module ‘res_http_post.so’ was not compiled with the same compile-time options as this version of Asterisk.
[Apr 10 19:56:40] WARNING[1927] loader.c: Module ‘res_http_post.so’ will not be initialized as it may cause instability.
[Apr 10 19:56:40] WARNING[1927] loader.c: Module ‘res_http_post.so’ could not be loaded.
[Apr 10 19:56:40] NOTICE[1927] chan_skinny.c: Configuring skinny from skinny.conf
[Apr 10 19:56:40] WARNING[1927] frame.c: Cannot allow unknown format ’ h263’
[Apr 10 19:56:40] WARNING[1927] chan_sip.c: Codec configuration errors found in line 12 : allow = h264, h263
[Apr 10 19:56:40] WARNING[1927] chan_sip.c: No valid transports available, falling back to ‘udp’.
[Apr 10 19:56:40] WARNING[1927] chan_dahdi.c: Ignoring any changes to ‘userbase’ (on reload) at line 23.
[Apr 10 19:56:40] WARNING[1927] chan_dahdi.c: Ignoring any changes to ‘vmsecret’ (on reload) at line 31.
[Apr 10 19:56:40] WARNING[1927] chan_dahdi.c: Ignoring any changes to ‘hassip’ (on reload) at line 35.
[Apr 10 19:56:40] WARNING[1927] chan_dahdi.c: Ignoring any changes to ‘hasiax’ (on reload) at line 39.
[Apr 10 19:56:40] WARNING[1927] chan_dahdi.c: Ignoring any changes to ‘hasmanager’ (on reload) at line 47.
[Apr 10 19:56:40] WARNING[1927] confbridge/conf_config_parser.c: Invalid option ‘end_mark’ at line 10 of confbridge.conf is not supported.
[Apr 10 19:56:41] ERROR[1927] codec_dahdi.c: Failed to open /dev/dahdi/transcode: No such file or directory
[Apr 10 19:56:41] NOTICE[1927] pbx_ael.c: Starting AEL load process.
[Apr 10 19:56:41] NOTICE[1927] pbx_ael.c: AEL load process: parsed config file name ‘/etc/asterisk/extensions.ael’.
[Apr 10 19:56:41] NOTICE[1927] pbx_ael.c: AEL load process: checked config file name ‘/etc/asterisk/extensions.ael’.
[Apr 10 19:56:41] NOTICE[1927] pbx_ael.c: AEL load process: compiled config file name ‘/etc/asterisk/extensions.ael’.
[Apr 10 19:56:41] NOTICE[1927] pbx_ael.c: AEL load process: merged config file name ‘/etc/asterisk/extensions.ael’.
[Apr 10 19:56:41] NOTICE[1927] pbx_ael.c: AEL load process: verified config file name ‘/etc/asterisk/extensions.ael’.
[Apr 10 19:56:44] NOTICE[2009] chan_sip.c: Peer ‘5152068’ is now UNREACHABLE! Last qualify: 0
[Apr 10 19:56:46] NOTICE[2009] chan_sip.c: Peer ‘5152095’ is now UNREACHABLE! Last qualify: 0
[Apr 10 19:57:17] NOTICE[2009] chan_sip.c: Peer ‘5152053’ is now Reachable. (153ms / 2000ms)
[Apr 10 19:57:18] NOTICE[2009] chan_sip.c: Received SIP subscribe for peer without mailbox: 5152053
[Apr 10 20:01:22] WARNING[2205] app_dial.c: Unable to create channel of type ‘SIP’ (cause 20 - Unknown)
[Apr 10 20:01:26] WARNING[2205] res_rtp_asterisk.c: RTP Read too short
[Apr 10 20:06:39] WARNING[2402] app_dial.c: Unable to create channel of type ‘SIP’ (cause 20 - Unknown)
[Apr 10 20:06:41] WARNING[2402] res_rtp_asterisk.c: RTP Read too short

This is what my Asterisk CLI interface says:

*CLI>
*CLI>
*CLI> == Using SIP RTP CoS mark 5
– Executing [2095@sunderland:1] Verbose(“SIP/5152053-00000001”, “someone is calling 2095”) in new stack
someone is calling 2095
– Executing [2095@sunderland:2] Dial(“SIP/5152053-00000001”, “SIP/5152095,40,tk”) in new stack
[Apr 10 20:06:39] WARNING[2402]: app_dial.c:2218 dial_exec_full: Unable to create channel of type ‘SIP’ (cause 20 - Unknown)
== Everyone is busy/congested at this time (1:0/0/1)
– Executing [2095@sunderland:3] VoiceMail(“SIP/5152053-00000001”, “5152095@login”) in new stack
– <SIP/5152053-00000001> Playing ‘vm-intro.gsm’ (language ‘en’)
[Apr 10 20:06:41] WARNING[2402]: res_rtp_asterisk.c:2138 ast_rtp_read: RTP Read too short
– <SIP/5152053-00000001> Playing ‘beep.gsm’ (language ‘en’)
– Recording the message
– x=0, open writing: /var/spool/asterisk/voicemail/login/5152095/tmp/A5s8Di format: wav, 0xb7404610
– User ended message by pressing #
– <SIP/5152053-00000001> Playing ‘auth-thankyou.gsm’ (language ‘en’)
– Executing [2095@sunderland:4] Hangup(“SIP/5152053-00000001”, “”) in new stack
== Spawn extension (sunderland, 2095, 4) exited non-zero on ‘SIP/5152053-00000001’

And when I type ‘mail’ in my terminal, this is the error message that I see:

Message 7:
From MAILER-DAEMON@YoDora Tue Apr 10 20:32:07 2012
Return-Path: MAILER-DAEMON@YoDora
Date: Tue, 10 Apr 2012 20:32:07 +0100
From: Mail Delivery Subsystem MAILER-DAEMON@YoDora
To: yodora@YoDora
Content-Type: multipart/report; report-type=delivery-status;
boundary="q3AJW7M7003815.1334086327/YoDora"
Subject: Returned mail: see transcript for details
Auto-Submitted: auto-generated (failure)
Status: R

Part 1:

The original message was received at Tue, 10 Apr 2012 20:32:01 +0100
from localhost.localdomain [127.0.0.1]

----- The following addresses had permanent fatal errors -----
yoboy7@gmail.com
(reason: 550-5.7.1 [90.222.185.116] The IP you’re using to send mail is not authorized to)

----- Transcript of session follows -----
… while talking to gmail-smtp-in.l.google.com.:

DATA
<<< 550-5.7.1 [90.222.185.116] The IP you’re using to send mail is not authorized to
<<< 550-5.7.1 send email directly to our servers. Please use the SMTP relay at your
<<< 550-5.7.1 service provider instead. Learn more at
<<< 550 5.7.1 support.google.com/mail/bin/answ … swer=10336 k51si267617weq.75
554 5.0.0 Service unavailable

Part 2:
Content-Type: message/delivery-status

Part 3:
Content-Type: message/rfc822

From yodora@YoDora Tue Apr 10 20:32:01 2012
Return-Path: yodora@YoDora
Date: Tue, 10 Apr 2012 20:30:55 +0100
From: Asterisk PBX asterisk@YoDora
To: “Anne Simmister” yoboy7@gmail.com
Subject: [PBX]: New message 20 in mailbox 5152095
X-Asterisk-CallerID: 5152068
Content-Type: multipart/mixed; boundary="----voicemail_20515209519271306818152"

Part 3.1:
Content-Type: text/plain; charset=ISO-8859-1

Dear Anne Simmister:

Just wanted to let you know you were just left a 0:07 long message (number 20)

in mailbox 5152095 from 5152068, on Tuesday, April 10, 2012 at 08:30:55 PM so you might
want to check it when you get a chance. Thanks!

			--Asterisk

Part 3.2:
Content-Type: audio/x-wav; name="msg0019.wav"
Content-Description: Voicemail sound attachment.
Content-Disposition: attachment; filename=“msg0019.wav”

I did try to configure the SMTP thingy in sendmail, using the tutorial found in this link:
voip-info.org/wiki/view/Aste … g+sendmail

The content of my current client-info file (based on the name given in the tutorial above) is:

AuthInfo:smtp.gmail.com “U:smtp.gmail.com” "I:xxx@gmail.com"“P:xxxx”

The (modified) content of sendmail.mc is:

dnl #
dnl define(SMART_HOST',smtp.gmail.com’)dnl
define(confAUTH_MECHANISMS',EXTERNAL GSSAPI DIGEST-MD5 CRAM-MD5 LOGIN PLAIN’)dnl
FEATURE(authinfo',hash /etc/mail/newauth/client-info’)dnl
dnl #

Thoughts?

I’m afraid the last time I configured sendmail for the internet was when most ISPs were prepared to use SMTP in the fully distributed mode it was designed to use, so I don’t know how to configure it for a smart host that uses authentication, rather than being your ISP’s smart host.

No worries. I believe I’m getting nearer. I’m getting a different error message now:

Message 14:
From MAILER-DAEMON@YoDora Tue Apr 10 23:21:18 2012
Return-Path: MAILER-DAEMON@YoDora
Date: Tue, 10 Apr 2012 23:21:18 +0100
From: Mail Delivery Subsystem MAILER-DAEMON@YoDora
To: yodora@YoDora
Content-Type: multipart/report; report-type=delivery-status;
boundary="q3AMLI08006169.1334096478/YoDora"
Subject: Returned mail: see transcript for details
Auto-Submitted: auto-generated (failure)
Status: R

Part 1:

The original message was received at Tue, 10 Apr 2012 23:21:17 +0100
from localhost.localdomain [127.0.0.1]

----- The following addresses had permanent fatal errors -----
yoboy7@gmail.com
(reason: 530-5.5.1 Authentication Required. Learn more at)

----- Transcript of session follows -----
… while talking to smtp.gmail.com:

MAIL From:yodora@YoDora SIZE=682
<<< 530-5.5.1 Authentication Required. Learn more at
<<< 530 5.5.1 support.google.com/mail/bin/answ … swer=14257 gd4sm240
6752wib.6
554 5.0.0 Service unavailable

Part 2:
Content-Type: message/delivery-status

Part 3:
Content-Type: message/rfc822

From yodora@YoDora Tue Apr 10 23:21:17 2012
Return-Path: yodora@YoDora
From: Yodora yodora@YoDora
Date: Tue, 10 Apr 2012 23:20:15 +0100
To: yoboy7@gmail.com
User-Agent: Heirloom mailx 12.5 7/5/10
Content-Type: text/plain; charset=us-ascii

At least now I know where the problem is coming from. It appears that I need to take care of SSL/TLS certs or something like that. I’ll keep searching :smile: Thanks for helping… Appreciate it…

Yep! I know where the problem is coming from. :smile: :smile: :smile: Cheers !Thank U ! :bulb: :bulb: :bulb: Keep contect .

Solved it! As I initially guessed, the problem was with sendmail’s configuration. Had to configure sendmail as SMTP relay to gmail. Most tutorials in the web do not explain the certificate settings clearly. However, the following tutorial explains everything in detail. If you can get sendmail to work (test by sending an email to your email address), then voicemail to email in asterisk should work as well. The asterisk part of the settings is pretty straight forward.

tux89.com/telephonie/configu … l/?lang=en