# Voicemail to Email

**URL:** <https://community.asterisk.org/t/voicemail-to-email/38853>\
**Category:** Asterisk Support\
**Created:** [April 9, 2012, 9:46pm UTC](https://community.asterisk.org/t/voicemail-to-email/38853 "2012-04-09T21:46:58Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/asterisk/original/2X/4/475d0c889911cfb84ac4881ad6df8b523e3f9105.png) [@system](https://community.asterisk.org/u/system)\
**Post date:** [April 9, 2012, 9:46pm UTC](https://community.asterisk.org/t/voicemail-to-email/38853/1 "2012-04-09T21:46:58Z")

</div>

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](mailto:Irons,yoboy7@gmail.com)  
5152068 =\> 1234,Chris [Keech,yoboy7@gmail.com](mailto:Keech,yoboy7@gmail.com)  
5152095 =\> 1234,Anne [Simmister,yoboy7@gmail.com](mailto: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.

---

<div class="post-metadata">

**Author:** ![david55](https://avatars.discourse-cdn.com/v4/letter/d/e19adc/32.png) [@david55](https://community.asterisk.org/u/david55)\
**Post date:** [April 9, 2012, 10:12pm UTC](https://community.asterisk.org/t/voicemail-to-email/38853/2 "2012-04-09T22:12:52Z")

</div>

Logs from both Asterisk and the MTA?

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/asterisk/original/2X/4/475d0c889911cfb84ac4881ad6df8b523e3f9105.png) [@system](https://community.asterisk.org/u/system)\
**Post date:** [April 10, 2012, 7:41pm UTC](https://community.asterisk.org/t/voicemail-to-email/38853/3 "2012-04-10T19:41:47Z")

</div>

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](mailto:MAILER-DAEMON@YoDora)  
Date: Tue, 10 Apr 2012 20:32:07 +0100  
From: Mail Delivery Subsystem [MAILER-DAEMON@YoDora](mailto:MAILER-DAEMON@YoDora)  
To: [yodora@YoDora](mailto: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](mailto: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](http://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](http://support.google.com/mail/bin/answer.py?answer=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](mailto:yodora@YoDora)  
Date: Tue, 10 Apr 2012 20:30:55 +0100  
From: Asterisk PBX [asterisk@YoDora](mailto:asterisk@YoDora)  
To: “Anne Simmister” [yoboy7@gmail.com](mailto: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”

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/asterisk/original/2X/4/475d0c889911cfb84ac4881ad6df8b523e3f9105.png) [@system](https://community.asterisk.org/u/system)\
**Post date:** [April 10, 2012, 7:48pm UTC](https://community.asterisk.org/t/voicemail-to-email/38853/4 "2012-04-10T19:48:41Z")

</div>

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](http://www.voip-info.org/wiki/view/Asterisk+Voicemail+as+email+using+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](http://sendmail.mc) is:

dnl #  
dnl define(`SMART_HOST',`[smtp.gmail.com](http://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?

---

<div class="post-metadata">

**Author:** ![david55](https://avatars.discourse-cdn.com/v4/letter/d/e19adc/32.png) [@david55](https://community.asterisk.org/u/david55)\
**Post date:** [April 10, 2012, 9:37pm UTC](https://community.asterisk.org/t/voicemail-to-email/38853/5 "2012-04-10T21:37:39Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/asterisk/original/2X/4/475d0c889911cfb84ac4881ad6df8b523e3f9105.png) [@system](https://community.asterisk.org/u/system)\
**Post date:** [April 10, 2012, 10:37pm UTC](https://community.asterisk.org/t/voicemail-to-email/38853/6 "2012-04-10T22:37:52Z")

</div>

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](mailto:MAILER-DAEMON@YoDora)  
Date: Tue, 10 Apr 2012 23:21:18 +0100  
From: Mail Delivery Subsystem [MAILER-DAEMON@YoDora](mailto:MAILER-DAEMON@YoDora)  
To: [yodora@YoDora](mailto: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](mailto:yoboy7@gmail.com)  
(reason: 530-5.5.1 Authentication Required. Learn more at)

----- Transcript of session follows -----  
… while talking to [smtp.gmail.com](http://smtp.gmail.com):

> > > MAIL From:[yodora@YoDora](mailto: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](http://support.google.com/mail/bin/answer.py?answer=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](mailto:yodora@YoDora)  
From: Yodora [yodora@YoDora](mailto:yodora@YoDora)  
Date: Tue, 10 Apr 2012 23:20:15 +0100  
To: [yoboy7@gmail.com](mailto: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 😄 Thanks for helping… Appreciate it…

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/asterisk/original/2X/4/475d0c889911cfb84ac4881ad6df8b523e3f9105.png) [@system](https://community.asterisk.org/u/system)\
**Post date:** [April 11, 2012, 1:29am UTC](https://community.asterisk.org/t/voicemail-to-email/38853/7 "2012-04-11T01:29:09Z")

</div>

Yep! I know where the problem is coming from. 😄😄😄 Cheers !Thank U ! 💡💡💡 Keep contect .

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/asterisk/original/2X/4/475d0c889911cfb84ac4881ad6df8b523e3f9105.png) [@system](https://community.asterisk.org/u/system)\
**Post date:** [April 12, 2012, 12:09am UTC](https://community.asterisk.org/t/voicemail-to-email/38853/8 "2012-04-12T00:09:17Z")

</div>

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](http://www.tux89.com/telephonie/configurer-sendmail-comme-relais-smtp-vers-la-messagerie-gmail/?lang=en)
