* how to check for current voicemail accounts* how to create a new voicemail.conf from a scratch* how to add a new timezone* how to add global keywords and options* how to add new contexts* how to add new users* how to add options per-user* how to edit your dialplan in order to activate voicemail functionality* how to check your voicemail

Requirements - this tutorial starts in the following setup:

you have a working Asterisk server
you have registered SIP and/or IAX2 accounts - we will run this tutorial with the following accounts:

We are going to work from a scratch for this example. This means that we will begin with an empty voicemail.conf file. If you want to follow this tutorial you should back up your configuration file. You can do this by typing `cd /etc/asterisk/ && mv voicemail.conf ~voicemail.conf`

How to check for current voicemail accounts?
The easiest way to check which voicemail accounts is via the Asterisk console. Connect to your Asterisk console (via the command `asterisk -r`) and type:

voicemail list users - to list all users
voicemail list users for AAAA - in order to list only the users from AAAA context

Creating voicemail.conf from a scratch.

We presume that you don't have voicemail.conf in our configuration folder. We can create it as every common file. We will use the command `touch /etc/asterisk/voicemail.conf`. After we execute this command we will add three important lines in our voicemail.conf. We will declare [general], [zonemessages] and [default]. The file should look like this:

Adding global options. We won't use all the keywords that voicemail.conf provide us because we are making very simple tutorial. Since we have very few voicemail accounts, we can a be little bit more generous in some options. Here are some of the keywords that we are going to add:

attach=no ; we won't send notification messages
format=wav49|gsm ; we will save the audio message in wav49 and gsm formats
maxlogins=5 ; we are setting the maximum invalid login attempts before disconnecting the call
minmessage=1 ; messages with length less than one seconds won't be saved
maxmessage=600 ; we are setting the maximum length of messages to ten minutes
forcename=yes ; we will force every 'new user' to record his/hers name
forcegreetings=yes ; we will force every 'new user' to record his/hers greeting
maxmsg=100 ; mailbox's max messages capacity

When we set such keywords in the [general] area, every user will receive these options (if the the current option is not overridden per-user).

This scenario is about a small company, so we will need only one timezone. Let's add it
Notice that we have added one more option to the general section - `tz=sofia`. This will set all accounts that we create, in the timezone `sofia`.

Now let's create three new contexts in which we are going to create our voicemail accounts. We will add these contexts after the general section:

Now let's add the voicemail accounts. Notice that the "bosses" in our imaginary company has two "phones" (an IAX2 and a SIP), but have only one mailbox. It is time to reload our Asterisk configuration and check the differences. Connect to Asterisk by typing `asterisk -r`. Then type `reload`. Now let's check the accounts. Type:

Now let's add some options per user. For example our "bosses" should have extended max messages capacity. The secretaries should have an increased minimal length of the messages (in order to be saved). We can easily achieve this by adding options per-accounts:

It is time to activate our mailboxes. To do this we will have to modify our dialplan. Our first task is to make possible the recording of messages. We will use VoiceMail application in order to achieve this task.

The second step is make possible for every user to check his/hers voicemail account. We will add some new extensions in order to achieve this step. We will use VoiceMailMain application for this purpose.
We have created new context (we have named it [voicemail]) in extensions.conf but we have included it into [intenal] context, so everyone will be able to dial the extensions in the new context.

Could you please provide any way to get active voice mail users list, the voicemail show users : lists all the users which exist but not configured(not working) . i need to list all the configured one ?

Appreciate your help,

jeevangan (jeevaim at yahoo dot co dot in)04 December 2007 11:45:59nice.. but i need some information about the uses and how to impliment in our pc.. what are the basic requirements are require to send voice mail..

sarah (foxxracing18 at hotmail dot com)29 April 2007 20:37:00hi i just wanted to no if u could teach me over e-mail how to mhmm.... do an voicemail answering machine cuz i don't have one doo could u do that if u could or if u can't sen dm ebacck peace out thanks.

Add Comment

Name:

Email:

Comment:

In order to prevent automatic posting on our website, we kindly request you to type in the number you see in the picture below.