Description
This is a working example of a Voicemail as email for Asterisk .
Softwares
• OS: Centos 5.5 Final
• Asterisk 1.6.2.7
• DAHDI Version: 2.3.0.1
• Asterisk-GUI 2.0
• Sendmail
Overview
Install asterisk and all required libraries.Install sendmail. If sendmail is not installed already do the following.
- yum install sendmail
- yum install sendmail-cf
Using Sendmail as a Client with AUTH
(This section is from Sendmail.) If you are using sendmail only to transfer e-mail from your local computer to a mail server that requires SMTP AUTH, follow these instructions. They assume that sendmail 8.12 or later, and other software, is already installed on your computer. You should probably be logged in as root to perform these steps.
- Change directory to where your sendmail configuration files (sendmail.mc and sendmail.cf) are located, usually /etc/mail/.
- Create a safe subdirectory (suggested name auth/):
- mkdir auth
- chmod 700 auth
- Create a safe subdirectory (suggested name auth/):
- mkdir auth
- chmod 700 auth
- Create a file with your authentication information (suggested name auth/client-info):
AuthInfo:your.isp.net "U:smtp.yourdomain.com" "I:[email protected]" "P:password" filling in your ISP's mail server, your user name, and your password.
- Generate the authentication database and make both files readable only by root:
- cd auth
- makemap hash client-info < client-info
- chmod 600 client-info*
- cd ..
- Add the following lines to your sendmail.mc file, filling in your ISP’s mail server:
- Search for SMART_HOST put following line just below that.(Dont forget to change smtp.yourdomain.com to your domain name).
- define(`SMART_HOST’,`smtp.yourdomain.com’)dnl
- define(`confAUTH_MECHANISMS’, `EXTERNAL GSSAPI DIGEST-MD5 CRAM-MD5 LOGIN PLAIN’)dnl
- FEATURE(`authinfo’,`hash /etc/mail/auth/client-info’)dnl
- Generate sendmail.cf:
- >m4 sendmail.mc > sendmail.cf
- Restart the sendmail daemon, e.g., (this depends on your OS):
- >/etc/init.d/sendmail restart
Configuration Files
voicemail.conf
[general]
; Formats for writing Voicemail. Note that when using IMAP storage for
; voicemail, only the first format specified will be used.
;format=g723sf|wav49|wav
format = wav49|gsm|wav
serveremail = [email protected]
attach = yes
fromstring=The Asterisk PBX
sendvoicemail = yes ; Allow the user to compose and send a voicemail while inside
emailonly = no
emailsubject = You have a New Voicemail from ${VM_CALLERID}
emailbody = Dear ${VM_NAME} ,\n \t\t\t You have received a new voicemail from ${VM_CALLERID} \non ${VM_DATE}. \n Find attached.\n\n----\nAsterisk PBX
maxgreet =
operator = no
maxmsg = 25
maxmessage = 300
minmessage = 0
saycid = no
sayduration = no
envelope = no
review = no
Thats it !
Leave a voicemail on your extension and check if it arrives at your mail box. Shyju Kanaprath(shyju at epillars dot com)
Other Voicemail To Email Guides:
Asterisk Voicemail to Email w/ Gmail and Postfix – Configure Postfix on CentOS for Asterisk Voicemail to Email using a Gmail Account