Asterisk Voicemail as email using sendmail

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.

  1. yum install sendmail
  2. 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.

1. Change directory to where your sendmail configuration files (sendmail.mc and sendmail.cf) are located, usually /etc/mail/.
2. Create a safe subdirectory (suggested name auth/):
  1. mkdir auth
  2. chmod 700 auth

3. Create a file with your authentication information (suggested name auth/client-info):
AuthInfo:your.isp.net "U:smtp.yourdomain.com" "I:user@yourdomain.com" "P:password"
filling in your ISP's mail server, your user name, and your password.

4. Generate the authentication database and make both files readable only by root:
  1. cd auth
  2. makemap hash client-info < client-info
  3. chmod 600 client-info*
  4. cd ..

5. 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

6. Generate sendmail.cf:
  1. m4 sendmail.mc > sendmail.cf

7. Restart the sendmail daemon, e.g., (this depends on your OS):
  1. /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 = shyju@epillars.com
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)

Created by: shyju, Last modification: Sun 25 of Jul, 2010 (06:39 UTC)


Please update this page with new information, just login and click on the "Edit" or "Discussion" tab. Get a free login here: Register Thanks! - Find us on Google+

Page Changes | Comments

 

Featured -

Search: