Why?


Search This Blog

Monday, February 16, 2015

Asterisk 11.15.0 Voicemail Setup

Setting up Voicemail in Asterisk 11.15.0

Edit your /etc/asterisk/voicemail.conf file. After the [general] and [zonemessages] sections, any other bracketed section is a voice mail context. Within each context, you can define one or more mailbox. To define a mailbox, we set a mailbox number, a PIN, the mailbox owner's name, the primary email address, a secondary email address, and a list of mailbox options (separated by the pipe character), as shown below:

[context]
mailbox=>pin,full name,email address,short email address,mailbox options

By way of explanation, the short email address is an email address that will receive shorter email notifications suitable for mobile devices such as cell phones and pagers. It will never receive attachments, even if attach=yes. If you don’t want to use the email, or short, email address just put nothing in it. Be sure to use the comma though for a place holder.
An example of this I use in my lab is:

[internal]
6026356915 => 9999, Glen whittenberg,glen.whittenberg@cableone.biz,,attach=yes|maxmsg=100

My context is internal and extension is 6026356915 as defined in my sip.conf and extensions.conf files. 9999 will be my password. Glen Whittenberg is my full name. glen.whittenberg@cableone.biz is my email address. I am not using a short email addr so I just put in the comma. My options, separated by pipe symbol, are voicemail attachments will be sent to email, attach=yes, and maximum messages will be 100, maxmsg=100.

Now let’s edit the /etc/asterisk/extensions.conf file. We will add 9999 to get to voicemal system and also add to our extensions, and DID’s, to enable voicemail for them.

To make 9999 your access number to the voicemail system add the flowing under the [internal] context:

;used 9999 to access voicemail
exten => 9999,1,Answer(500)
exten => 9999,n,VoiceMailMain(@internal)


Now for my extension of 6026356915 I added the following, still in my [internal] context:

exten => 100,n,VoiceMail(6026356915@internal,u)

My entire entry so far for this extensions is:

;used to pass extension dialed, 100, to registered phone of 6026356915
exten => 100,1,Dial(SIP/6026356915,20)
exten => 100,n,VoiceMail(6026356915@internal,u)
exten => 100,n,Playback(vm-goodbye)
exten => 100,n,Hangup

You can see I am using 100 to associate to 6026356915. This allows me to dial 100 from inside the system instead the entire 6026356915 number to call this phone/extension.


Now we need to edit our context concerning outside calls into the system. So when an outside caller calls my DID of 6026356915 they can also leave a voice message.

Again edit the /etc/asterisk/extensions.conf file under the correct context for inbound calls. In my case this context is called [from-test]. This was defined in my /etc/asterisk/dahdi-channels.conf file. Add the following for the DID 6026356915.

exten => 6026356915,n,VoiceMail(6026356915@internal,u)

My entire entry under the [from-test] context for DID 6026356915 is:

exten => 6026356915,1,Dial(SIP/6026356915,20)
exten => 6026356915,n,VoiceMail(6026356915@internal,u)
exten => 6026356915,n,Playback(vm-goodbye)
exten => 6026356915,n,Hangup

Now reload voicemail and extensions in asterisk with:
# asterisk –x ‘core reload’

Enjoy!

No comments:

Post a Comment