This page looks best with JavaScript enabled

Voicemail in Asterisk

 ·  πŸŽƒ kr0m

In this article, I will explain how to configure voicemail in Asterisk. An interesting feature is that it can send us an email with the attached audio file, so we can listen to the messages wherever we are.

First, we install Postfix:

emerge -av postfix

The main configuration file isΒ /etc/asterisk/voicemail.conf, and the syntax is as follows:

mailbox => password,name[,email[,pager_email[,options]]]

Let’s get started:

vi /etc/asterisk/voicemail.conf

[general]
format=wav
attach=yes
serveremail=localhost
fromstring=PBXAsterisk
emailsubject="Tiene correo electronico con mensajes de voz adjuntos"
emailbody="Estos son los siguiente mensajes: "
attach=yes
sendvoicemail=yes

[default]
20 => 1234,20,email1@lol.com
22 => 1234,22,email2@lol.com

The previous configuration would be as follows:

*Ext: 20,22*  
*Pass: 1234*  
*Mail: email1,2@lol.com*

The Asterisk dialplan would be as follows:

Leave a message:

exten => 1,1,VoiceMail(20,s)
exten => 1,n,HangUp()

Retrieve it:

exten => 2,1,NoOp(##################### CONSULTANDO BUZON DE VOZ: (CALLERID(num)) ################################)
exten => 2,n,VoiceMailMain(CALLERID(num))
exten => 2,n,HangUp()
If you liked the article, you can treat me to a RedBull here