Asterisk PBX as Voicemail for CUCM

Hello All,

Configure Asterisk PBX as Voicemail Server for Cisco Unified Communications Manager (CUCM) which will use SIP Trunk Integration between the Asterisk and CUCM.  The callers can deposit voicemail if the extension is busy/unavailable/unregistered. The end users can also listen to their voicemail as well. Only drawback is Message Waiting Indicator (MWI) which i couldn’t figure out how to configure. So the end users will have to call by themselves and see if there are any voicemail for them.

 

How are we going to achieve this? 

Our scenario:

Extension Range on CUCM and Asterisk – 8109XXXX

Voicemail Pilot – *81099999

No Answer, Busy, Unregistered call forwarding to VM on Extensions – *8109XXXX   (Replace XXXX with the last 4 digit of extension configured on CUCM/Asterisk)

 

What are we going to do in our taken scenario?

On Cisco Unified Communications Manager –

We will create two extensions in Cisco Unified Communications Manager i.e., 81091000 and 81091001.

We will create a Route Pattern with *.8109XXXX and point it to SIP Trunk to Asterisk. We will discard pre-dot characters.

We will create a Voicemail Pilot with *81099999

We will create a Voicemail Profile and associate *8109999 Voicemail Pilot

 

On Asterisk PBX Server-

We will configure the same number in Asterisk as Virtual Extension as 81091000 and 81091001 and enable voicemail and create Voicemail password for the extensions.

We will create a Misc. Destination and point it to *97

We will create Inbound Route with 8109999 and Point it to Misc. Destination

 

Let’s start with the configuration

Configuration on Cisco Unified Communications Manager : 

Configure Voicemail Pilot and Voicemail Profile

  • Go to Advance Features > Voice Mail > Voice Mail Pilot > Add New
  • Voice Mail Pilot Number > *81099999
  • Calling Search Space > Select appropriate Calling Search Space
  • Description > Voicemail Pilot to Asterisk PBX
  • Click on Save
  • Go to Advance Features > Voice Mail > Voice Mail Profile > Add New
  • Voice Mail Profile Name * > Asterisk-VMP
  • Description > Asterisk Voicemail Profile
  • Voice Mail Pilot ** > Select *81099999 from the drop down menu
  • Click on Save

 

Configure Extensions

  • Create a extension as 81091000
    • Associate Asterisk-VMP as created in the above step
    • Forward Busy Internal > *81091000 and assign appropriate Calling Search Space
      Forward Busy External > *81091000 and assign appropriate Calling Search Space
      Forward No Answer Internal > *81091000 and assign appropriate Calling Search Space
      Forward No Answer External > *81091000 and assign appropriate Calling Search Space
      Forward No Coverage Internal > *81091000 and assign appropriate Calling Search Space
      Forward No Coverage External > *81091000 and assign appropriate Calling Search Space
      Forward on CTI Failure > *81091000 and assign appropriate Calling Search Space
      Forward Unregistered Internal > *81091000 and assign appropriate Calling Search Space
      Forward Unregistered External > *81091000 and assign appropriate Calling Search Space
  • Similarly create another extension as 81091001 and use the same forward procedure as *81091000 but replace 1000 with 1001

 

Configure Route Pattern

  • Go to Call Routing > Route/Hunt > Route Pattern
  • Click on Add New
  • Route Pattern > *.8109XXXX
  • Route Partition > Select appropriate Route Partition
  • Description > Route Pattern to Asterisk PBX for Voice Mail
  • Gateway/Route List > Select the SIP Trunk that was created to route the calls between CUCM and Asterisk
  • Discard Digits > Select PreDot from the Drop Down Menu
  • Click on Save

 

Configuration on Asterisk PBX

Configure Misc. Destinations

  • Login to Asterisk PBX Server
  • Under Internal Options & Configuration > Click on Misc. Destinations > Click on Add Misc. Destination
  • Description > CUCM-VM-Pilot-Trigger
  • Dial > *97
  • Click on Submit Changes
  • Click on Apply Config

 

Configure Virtual Extensions 

  • Under Basic > Click on Extensions
  • Device > Select “None (Virtual Exten)” from the Drop Down Menu
  • Click on Submit
    • User Extension > 81091000
    • Display Name > User A
    • Voicemail Status > Select “Enabled” from Drop Down Menu
    • Voicemail Password > Enter a Password which will be used to access the voicemail
    • Fill all other necessary details if required.
    • Click on Submit
    • Click on Apply Config
  • Similarly create another Virtual Extension for the User B with extension 81091001

 

Configure Inbound Routes

  • Under Inbound Call Control > Click on Inbound Routes
  • Description > Inbound Route from CUCM to Asterisk Voicemail Pilot
  • DID Number > 81099999
  • Set Destination > Select Misc. Destination from the Drop Down Menu > Select CUCM-VM-Pilot-Trigger
  • Click on Submit
  • Click on Apply Config

 

Time to test the configuration

Depositing Voice Mail

  • Now make a call from extension 81091000 to 81091001
  • Let the call ring the extension and after few rings the call will go to Voicemail of Extension 81091000. You try to leave a Voicemail.

 

Retrieving Voice Mail using Message Button and Listening to the Voice Mails

  • Now click on Message button on IP Phone on Extension 81091000.
  • You will hear something like “Comedian Mail..”
  • Enter UserID as Extension 81091000
  • You will now hear “Password”
  • Enter the Password created for the extensions
  • You will be logged into your voicemail box and can listen to the Voice Mails.

 

Accessing Voice Mail using the Voice Mail Pilot Number

  • From the extension 81091000 > Dial 8109999
  • You will hear something like “Comedian Mail..”
  • Enter UserID as Extension 81091000
  • You will now hear “Password”
  • Enter the Password created for the extensions
  • You will be logged into your voicemail box and can listen to the Voice Mails.

 

If you have not done CUCM and Asterisk SIP Trunk Integration, kindly refer to the below post.

CUCM Asterisk SIP Trunk Integration

If you would like to change the default “Comedian Mail” Audio Greetings in Asterisk PBX , kindly refer to the below post.

Asterisk PBX Comedian Mail Change Audio Greetings

Hope this helps!

 

Asterisk PBX as Voicemail for CUCM was last modified: July 6th, 2016 by Administrator
(Visited 605 times, 1 visits today)

15 thoughts on “Asterisk PBX as Voicemail for CUCM”

  1. Yiannis says:

    When VM is activated , elastix is playing the mailbox access greeting.
    Could you help ?

    1. Administrator says:

      Hi,

      Can you please share the call flow and let me know if you are dialing the voicemail pilot number or you are trying to call an extension, if the extension is not picking the call, you are trying to deposit a voicemail into a user’s mailbox?

      1. Yiannis says:

        Thanks for your reply.
        I found out the mistake at the end.

  2. Ken says:

    Hello, I am having the same problem as the other user. If I call an extension and it goes to voicemail, it shows “Comedian Mail, Extension”, instead of getting the voicemail prompt. I have following the tutorial to the “T”. Any ideas?

    1. Ken says:

      I figured it out. The sections in “directory number” in CUCM where we would put “*EXT” (ex. *1000) I checked the check box labeled “voice mail”. Unchecking them all the way down made it so it reached the voicemail prompt. Thank you for sharing this!! Now to figure out how incorporate MWI….

      1. Ken says:

        If anyone is interested in incorporating MWI using the above tutorial, look at the shell script here: http://community.freepbx.org/t/cisco-call-manager-freepbx-for-voicemail/10711/3. Where it says “callman” in the script (twice) change that to reflect the name of the SIP trunk going from FreePBX to CUCM server.

        1. Administrator says:

          Hello Ken,

          Thank you for confirming!

          Did you follow the steps provided in the link shared and had MWI work for you? If yes, then this is a great news. Now techies can use CUCM with Asterisk as VM in full fledge.

          1. Ken says:

            Hello! I followed your tutorial to the “T” and was able to get voicemail setup properly. The link I provided above, I simply copied the script, created the file in /var/lib/asterisk/scripts/vm.sh (had to create the “scripts” direectory) and then referenced that file under “externotify” within voicemail.conf (/etc/asterisk). One thing I forgot to mention above is, you need to setup MWI On/Off extensions in CUCM (Advanced Features -> Voicemail -> Message Waiting). Then, in the shell script where it shows “turnon” and “turnoff” change the extensions (script shows 1002 and 1003) to the MWI on/off extensions you create within CUCM.

          2. Administrator says:

            Hello Ken,

            Thanks for the feedback, your confirmation on MWI working scenario will surely help all the readers to follow the link you have provided. Appreciate your time to reply back with the confirmation. Keep in touch!

            Cheers!

        2. shivani sharma says:

          Hello Ken,

          I followed all the steps you mentioned in your posts to get MWI working, but I still dont have luck. Would you be able to provide more details on the MWI setup? I copied the script with the changes (CUCM IP address, MWI extensions) in the location you has specified. I also created MWI extensions on CUCM. Do I have to create similar extensions on Asterisk?

  3. Ken says:

    Hello again, sorry to keep asking questions. I know your tutorial states that to access voicemail you hit the VM button, enter your extension, and then password. I am wondering if you know how to alter this setup so that when you hit the VM button you would just enter your password and then your voicemail would play. I know in Asterisk *97 is for your personal voicemail, where as *98 is the pilot. Even though the Misc Destination is sending us to *97 it’s acting as if it’s *98. I looked at the asterisk debugs when hitting the VM button, and it shows a few ERROR messages but not finding much on Google about it. Just curious if you have any suggestions. Otherwise everything is working great!

    1. Administrator says:

      Hi Ken,

      The solution you are looking for is something that i have tried already but could not make it work. My understanding was that if we create an extension in Asterisk with same extension as in CUCM it would not prompt for username, it will only prompt for password when you dial into voicemail. I tried but failed for some reasons. Hence that was the reason i posted the above method.

      Try if this works for you.
      10000 as the extension in asterisk and 10000 in cucm. In asterisk, forward all calls to Voicemail for the extension 10000. Now dial the Voicemail Pilot Number and see if the username prompt is eliminated.

      Cheers!

      1. Ken says:

        Thank you for providing me that. I will give it a shot later on today.

        1. Ken says:

          I was unable to figure out how to “forward” an extension within Asterisk, but after some more poking around I got it to work. Instead of creating a “virtual extension” within FreePBX, I chose a “Custom Extension”. Fill in the information just as you would a virtual, and once the extension is created, hit apply settings. Now if you hit the voicemail button on the Cisco phone you get “Password”. And this is exactly what I was looking for.

          1. Administrator says:

            That’s Great News! Appreciate your hard work! Thanks for the confirmation.

            Cheers!

Leave a Reply

Show Buttons
Hide Buttons