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://asterisk.edropbox.net/ccmasteriskvm.pdf. H323 does not provide the high level of integration that SIP does.
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).
- 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.
- 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]).
- 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
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).
- 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:
- 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:
MWI configuration
- Feature -> Voice Mail -> Message Waiting
We will be adding two new numbers, 28888 and 28889 as follows:
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:
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.
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://asterisk.edropbox.net/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.
That should be it. Leave yourself a message and hopefully everything should work.
Page Changes
Help for running asterisk as an ivr with cisco call manager
Can you help us in this integration?
Working MWI
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
MWI - how?
When I debug sip on my * server, I can see it dialing the MWI numbers on CCM, but it fails. debug details here: http://pastebin.ca/51992 any idea would be appreciated
MWI Working now
MWI is working all dandy now.
Asterisk MWI Sip CallDamager
Awesome, thank you