Asterisk VM integration with Cisco CallManager -- help

Hi. I’m trying to get Asterisk to play with Cisco CallManager to provide VoiceMail. It’s a very simple CCM system that does not require extensive access control and is not using Partitions or Calling Search Space. The desire to use Asterisk solely for VoiceMail (VM) and nothing else at this time. Asterisk and CCM are on different subnets on my internal network. Two CallManagers are present, CCM1 and CCM2, with CCM1 ( as the Publisher and the Media Termination Point
(MTP) stuff on CCM2 ( as the Subscriber. My CCM extension is 7419 and desired VM box is 7419. A second account 7414 was created for another extension for testing with, same issues.

I’d really appreciate any help. I’ve been at it for a few weeks off and on and scoured the Internet but am about at a loss… TIA!

Cisco CallManager 4.1(3)
Cisco 2811 Voice Gateway attached to a PRI for PSTN access
Cisco 7960 handsets

Configured per Wiki: … ntegration

Copied Wiki except VM pilot changed to 6500 from 8888. I think parts of the problem may be related to:

  1. The Wiki entry lists Asterisk 1.0.8 but I am using 1.2.x? It appears that aspects of the VM and other commands have changed syntax from 1.0.x to 1.2.x but I can’t track exactly what.

  2. I’m using two CallManagers where I think the Wiki has one.

  3. I’ve got a Cisco 2800 router in the mix where I don’t think the Wiki has one.

I’m able to:
Manually enable/disable MWI by dialing the numbers on the handset.
Dial the VM pilot number to access VM.
Hit the “messages” button to access VM.
Change password, record greetings, etc.

I’m unable to:
Have a no answer/busy call roll into VM internally.
Have a no answer/busy call roll into VM externally (PSTN > PRI > Cisco 2811 Voice Gateway > AutoAttendant).
Leave a message in my own inbox or on another inbox on the system by using 3 (advanced options ), 5 (leave message).

SIP debug when call leaves CCM and goes into Asterisk:
*CLI> – Executing GotoIf(“SIP/”, “7419?2:400”) in new stack
– Goto (incoming,6500,2)
– Executing MailboxExists(“SIP/”, “7419@default”) in new stack
– Executing Congestion(“SIP/”, “”) in new stack
== Spawn extension (incoming, 6500, 3) exited non-zero on ‘SIP/’

SIP debug when I try to leave a message to my own extension from within VM:
Jun 13 20:15:19 WARNING[28152]: app_voicemail.c:2411 leave_voicemail: No entry in voicemail config file for ‘7419’
– Playing ‘vm-opts’ (language ‘en’)

SIP debug upon hangup after failing to leave myself a message:
== Spawn extension (incoming, 6500, 400) exited non-zero on ‘SIP/’
/var/lib/asterisk/scripts/ line 37: -default: command not found
– Attempting call on Local/2307419 for wait@default:1 (Retry 1)
– Executing SetCallerID(“Local/2307419@default-da58,2”, “7419”) in new stack
– Executing Dial(“Local/2307419@default-da58,2”, “SIP/”) in new stack
– Called
– Got SIP response 500 “Internal Server Error” back from
– SIP/ is circuit-busy
== Everyone is busy/congested at this time (1:0/1/0)
– Executing Answer(“Local/2307419@default-da58,2”, “”) in new stack
> Channel Local/2307419@default-da58,1 was answered.
== Starting Local/2307419@default-da58,1 at default,wait,1 failed so falling back to exten ‘s’
== Starting Local/2307419@default-da58,1 at default,s,1 still failed so falling back to context ‘default’
– Executing Wait(“Local/2307419@default-da58,2”, “1”) in new stack
Jun 13 20:15:31 WARNING[28165]: pbx.c:2354 __ast_pbx_run: Channel ‘Local/2307419@default-da58,1’ sent into invalid
extension ‘s’ in context ‘default’, but no invalid handler
== Spawn extension (default, 2307419, 4) exited non-zero on 'Local/2307419@default-da58,2’
Jun 13 20:15:31 NOTICE[28165]: pbx_spool.c:279 attempt_thread: Call completed to Local/2307419

Asterisk configs:
;context=default ; Default context for incoming calls



bindport=5060 ; UDP Port to bind to (SIP standard port is 5060)
bindaddr= ; IP address to bind to ( binds to all)
srvlookup=yes ; Enable DNS SRV lookups on outbound calls
; Note: Asterisk only uses the first host
; in SRV records
; Disabling DNS SRV lookups disables the
; ability to place SIP calls based on domain
; names to some other SIP users on the Internet
dtmfmode = rfc2833 ; Set default dtmfmode for sending DTMF. Default: rfc2833

; Default formats for writing Voicemail

; Who the e-mail notification should appear to come from
; Should the email contain the voicemail as an attachment
; How many miliseconds to skip forward/back when rew/ff in message playback
; How many seconds of silence before we end the recording
; Silence threshold (what we consider silence, the lower, the more sensitive)
; Max number of failed login attempts
emaildateformat=%A, %B %d, %Y at %r
sendvoicemail=yes ; Context to Send voicemail from [option 5 from the advanced menu]

eastern=America/New_York|‘vm-received’ Q ‘digits/at’ IMp
central=America/Chicago|‘vm-received’ Q ‘digits/at’ IMp
central24=America/Chicago|‘vm-received’ q ‘digits/at’ H N 'hours’
military=Zulu|‘vm-received’ q ‘digits/at’ H N ‘hours’ ‘phonetic/z_p’

; Define maximum number of messages per folder for partcular context.
7419 => 1111,Foo Bar,,saycid=yes
7414 => 1111,Boo Far,

; If static is set to no, or omitted, then the pbx_config will rewrite
; this file when extensions are modified. Remember that all comments
; made in the file will be lost when that happens.
; XXX Not yet implemented XXX


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

;MWI off/on; shaunewing
exten => _230XXXX,1,SetCallerID(${EXTEN:3})
exten => _230XXXX,2,Dial(SIP/
exten => _230XXXX,3,Answer
exten => _230XXXX,4,Wait,1
exten => _230XXXX,5,Hangup

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

exten => s,1,ChanIsAvail(SIP/ccm2)
exten => s,2,Cut(AVAILCHAN=AVAILCHAN,1)
exten => s,3,Dial(${AVAILCHAN}/${ARG1})
exten => s,4,Hangup

exten => s,102,Congestion

exten => _XXXX,1,Macro(dialout-callmanager,${EXTEN})
exten => _9NXXXXXX,1,Macro(dialout-callmanager,${EXTEN})
exten => _91NXXNXXXXXX,1,Macro(dialout-callmanager,${EXTEN})

exten => i,1,Congestion

I converted my Cisco VM server over to asterisk. All went pretty good. I didnt have time to read all this. I may be able to help you if I have time.



Hi Dallas,

Here i am also looking to move out from Unity 4.0.4 to Asterisk for voice mail services. Is it ok, if i call you. I am at NJ. If you can provide some basic documentation you might have prepared during the your move, that will hlep.

Sekhar.Hi Richard,

Thanks for your valuable inputs. I will install Trixbox today. I am planning to do load balancing at this time. Multiple sites are not my goal for now.

Please suggest me some documents/links to understand more on Direct dialing configuration (DID) & International restrictions.

My goal is by this weekend, i want have VOIP Server ready for SIP Physical phones (5) & 5 Soft phones. My Cisco phones are capable of 3 lines (7940), how do i activate line2 thru Asterisk?

Really appreciated your time.


About the cisco phone. Just add another account in sip.conf and go in the phone and add that account to line2. What hardware is recieving the dids. Is it a PRI or sip server? You need to create a asterisk server with needed hardware and move the dids to it. I can provide you with examples of voicemail setup. But need to know your setup.