login | register
Tue 02 of Dec, 2008 [01:52 UTC]

voip-info.org

Asterisk Cisco CallManager Voicemail Integration

Created by: shaunewing,Last modification on Mon 11 of Aug, 2008 [23:45 UTC]
This is my first wiki entry and needs to be tidied up a bit. I'll do that when I get around to it, my main priority for now was getting this information online as it seems to be in demand.

Some time ago I wrote a tutorial on using Asterisk as a voicemail for CCM using H323. This has not been wikified, but is available at http://www.se.id.au/articles/files/cisco_callmanager_with_asterisk_vm.php . H323 does not provide the high level of integration that SIP does.

Overview


Asterisk provides a flexible voicemail system that is a viable option for companies using Cisco Callmanager that do not wish to implement Cisco Unity.

Current version of Cisco Callmanager support SIP trunks with the features required to setup a fully integrated voicemail system. (particularly RDNIS).

Requirements


  • A version of Asterisk. This guide was written with Asterisk 1.0.8.
  • Callmanager 4.0 or higher. This guide was written with Callmanager 4.1(2)sr1 and some menu options may differ between versions. This will NOT work with Callmanager 3.3(5) or lower.
  • Asterisk needs to be integrated with Callmanager using a SIP trunk as detailed Here.

Caveats


  • If a SIP telephone registered to the Asterisk machine acting as voicemail calls through to a Callmanager user and subsequently is sent to voicemail, the call will be dropped. This can be resolved by configuring the device in sip.conf as something like [sipexten] (eg: [sip7222]) rather than [exten] (eg: [7222]).

Features provided


  • MWI
  • Voicemail on the CCM side is enabled by selecting Forward to 'Voicemail' rather than forwarding calls to a mailbox specific extension number.
  • Messages are accessed by pressing the 'Messages' button on the CCM phones, or dialing the VM pilot number.
  • If a CCM user doesn't want to take a call, they can press the iDivert softkey to send to voicemail immediately.
  • CCM users can forward all calls to voicemail in the ccmuser pages, or by pressing CFwdAll and entering the pilot number or messages.
  • All the standard Asterisk voicemail features work just fine, eg: vm to email.
  • etc

Before we begin


You need to plan the following:
  • What your voicemail number will be. This guide will use 8888.
  • What number will disable message waiting on Callmanager. This guide will use 28888.
  • What number will enable message waiting on Callmanager. This guide will use 28889.
  • What number will disable message waiting on Asterisk. This guide will use 230XXXX (we have four digit extensions).
  • What number will enable message waiting on Asterisk. This guide will use 231XXXX (we have four digit extensions).

Callmanager Configuration


  • You need to ensure that "Redirecting Number Delivery - Outbound" is checked on your SIP trunk configuration in Callmanager.

Voicemail pilot configuration


  • Go to Feature -> Voice Mail -> Voice Mail Pilot.

You should have a pilot called 'Default' which we will use. If you don't add a new one. We will configure this pilot as follows:

Image


  • Update the pilot.

Voicemail Profile configuration.


  • Feature -> Voice Mail -> Voice Mail Profile

You should have a profile called 'Default'. If not, add one. Configure it as follows:

Image


MWI configuration


  • Feature -> Voice Mail -> Message Waiting

We will be adding two new numbers, 28888 and 28889 as follows:

Image

Image


Activate Voicemail


  • Activate voicemail on any CCM phones that require it. This is configured in Device -> Phone -> Device Name -> Directory Number.

The settings are fairly straightforward and look like:

Image


iDivert configuration


Where you want the user to be able to send a call to voicemail (whether it's ringing, on hold, etc.) open up the softkey template and add the iDivert softkey to the relevant call states. I'm assuming you know how to do this, so I won't go into detail. Your phones will need to be reset after doing this.

Asterisk Configuration


The fun part.

First we need to configure extensions.conf to handle the voicemail.

In a context that Callmanager has access to (set in sip.conf), add the following:

exten => 8888,1,GotoIf($[${RDNIS}]?2:400)
exten => 8888,2,MailboxExists(${RDNIS}@default)
exten => 8888,3,Congestion
exten => 8888,103,Voicemail(su${RDNIS})
exten => 8888,104,Playback(vm-goodbye)
exten => 8888,105,Hangup
exten => 8888,400,VoicemailMain

If there is no rdnis, Asterisk believes that a user is trying to access their own mailbox and says the login prompt.

Next is the mwi, still in extensions.conf.

You need to add a context that matches your voicemail context. For example, [default].

In this context, we'll add:

exten => _230XXXX,1,SetCallerID(${EXTEN:3})
exten => _230XXXX,2,Dial(SIP/28888@ciscocm)
exten => _230XXXX,3,Answer
exten => _230XXXX,4,Wait,1
exten => _230XXXX,5,Hangup

exten => _231XXXX,1,SetCallerID(${EXTEN:3})
exten => _231XXXX,2,Dial(SIP/28889@ciscocm)
exten => _231XXXX,3,Answer
exten => _231XXXX,4,Wait,1
exten => _231XXXX,5,Hangup

Change the dial lines to match your configuration.

We'll now create the script that calls voicemail. We shall call this /var/lib/asterisk/scripts/vm.sh

This script can be downloaded from http://vault.se.id.au/ccmasteriskvm/vm.txt

Don't forget to chmod to 755, and make sure the script can write in /var/spool/asterisk/outgoing/

In voicemail.conf, add:
externnotify=/var/lib/asterisk/scripts/vm.sh

Save and reload Asterisk.

Conclusion


That should be it. Leave yourself a message and hopefully everything should work.







Comments

Comments Filter
222

333

by shaunewing, Monday 11 of August, 2008 [23:47:13 UTC]
Hi All,

Images have been uploaded again and the URLs updated.

-Shaun
222

333These instructions do NOT appear to work... in 1.4

by smhickel, Tuesday 06 of May, 2008 [14:46:01 UTC]
I have probably spent 20 hours trying all variations on the above. There are too many holes in the CCM configuration because we can not see the images. Thus we can not tell what may be pertinent in the various CCM screens. If I follow what I believe the instructions tell me, I believe the RDNIS is not working as the rule seems to skip the 2 step in favor of going to 400 step (GoToIF command). Thus the voice prompts me to enter my extension and a password, which I believe is the 400 line. I am told that the RDNIS command has changed and is now CALLERID(rdnis) in version 1.4. Nothing I have tried will get my CCM 4.x to pass the RDNIS Redirecting Number (RGN) that this solution seems to require. This may be because I am simply not seeing something here that I need, but I must now give up integrating CCM 4.x to Asterisk 1.4 until such time that someone with far more knowledge of this steps in and figures it out. — Steve
222

333These instructions do NOT appear to work... in 1.4

by smhickel, Tuesday 06 of May, 2008 [14:44:15 UTC]
I have probably spent 20 hours trying all variations on the above. There are too many holes in the CCM configuration because we can not see the images. Thus we can not tell what may be pertinent in the various CCM screens. If I follow what I believe the instructions tell me, I believe the RDNIS is not working as the rule seems to skip the 2 step in favor of going to 400 step (GoToIF command). Thus the voice prompts me to enter my extension and a password, which I believe is the 400 line. I am told that the RDNIS command has changed and is now CALLERID(rdnis) in version 1.4. Nothing I have tried will get my CCM 4.x to pass the RDNIS Redirecting Number (RGN) that this solution seems to require. This may be because I am simply not seeing something here that I need, but I must now give up integrating CCM 4.x to Asterisk 1.4 until such time that someone with far more knowledge of this steps in and figures it out. — Steve
222

333apologies the document works

by crazyvoiper, Thursday 04 of October, 2007 [06:01:51 UTC]
Please ignore my last post
222

333images not available at wayback

by crazyvoiper, Thursday 04 of October, 2007 [04:31:33 UTC]
Hi

I tried using the link for wayback and got the following message....

The page you requested has not been archived. If the page is still available on the Internet, we will begin archiving it during our next crawl. Try another request or click here to search for all pages on asterisk.edropbox.net/ccmasteriskvm.pd
See the FAQs for more info and help, or contact us.

Can someone please re-upload or post the images somewhere......???????

cheers

crazyvoiper
222

333RE: Images *are* not displaying

by atheos, Wednesday 19 of September, 2007 [15:40:29 UTC]
dmitry, you can get the pdf from the wayback machine.
http://web.archive.org/web/20060620181138/http://asterisk.edropbox.net/ccmasteriskvm.pdf
222

333Images is not displaed

by shworker, Thursday 13 of September, 2007 [11:32:11 UTC]
Images on this page is not displayed :(
222

333Help for running asterisk as an ivr with cisco call manager

by smehrs, Saturday 24 of March, 2007 [23:45:03 UTC]
We are looking for a solution for integrating asterisk as an IVR with cisco call manager 4.1.3, CISCO routers as the Voip gateways; H.323 and G.729 as the protocal.
Can you help us in this integration?
222

333Working MWI

by l2trace, Thursday 17 of August, 2006 [03:53:26 UTC]
I want to thank you this it a very informative document.

MWI was the only tricky part and now that I now what it is. It's not that tricky

When setting up the MWI in Call Manager Make Sure that:
The MWI and the trunks to the asterisk server are in the same partition and calling search space. Everything else works great


222

333

by keli, Friday 28 of April, 2006 [12:12:33 UTC]