Intergrating Asterisk Voicemail and CME 4.1

Posted on 2011-02-11
Last Modified: 2012-05-11
CME 4.1 Running on a Cisco 2651XM:    SIP Truck from ISP providing incoming & going calls and DIDs

R1#sh run
Building configuration...

version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
hostname R1
aaa new-model

aaa session-id common
clock timezone Pacific -8
clock summer-time pacific recurring
no network-clock-participate slot 1
no network-clock-participate wic 0
ip cef
no ip dhcp use vrf connected
ip dhcp excluded-address
ip dhcp pool VOIP
  option 150 ip
  lease 7
ip dhcp pool DATA
  option 150 ip
  lease 7

no ip domain lookup
ip name-server 69.44.XX.XX
ip name-server 69.44.XX.XX
ip name-server
multilink bundle-name authenticated
voice service voip
allow-connections h323 to sip
allow-connections sip to h323
allow-connections sip to sip
no supplementary-service sip moved-temporarily
no supplementary-service sip refer
fax protocol pass-through g711ulaw
 bind control source-interface FastEthernet0/1
 bind media source-interface FastEthernet0/1
 registrar server expires max 3600 min 3600
 no call service stop
voice class codec 1
codec preference 1 g711ulaw

voice translation-rule 1
rule 1 /714700000/ /201/
voice translation-profile IncomingCalls
translate called 1

username user privilege 15 password 0 000
username admin privilege 15 password 0 000
log config

interface Loopback0
ip address
interface FastEthernet0/0
no ip address
ip nat inside
ip virtual-reassembly
speed 100
interface FastEthernet0/0.2
encapsulation dot1Q 2
ip address
ip nat inside
ip virtual-reassembly
interface FastEthernet0/0.3
encapsulation dot1Q 3 native
ip address
ip nat inside
ip virtual-reassembly
interface FastEthernet0/1
description External WAN Connection
ip address
ip nat outside
ip virtual-reassembly
duplex auto
speed auto
ip forward-protocol nd
ip route

ip http server
no ip http secure-server
ip nat pool WANPOOL prefix-length 29
ip nat inside source list 10 pool WANPOOL overload
access-list 10 permit
access-list 10 permit

tftp-server flash:P00308010200.bin
tftp-server flash:P00308010200.loads
tftp-server flash:P00308010200.sb2
tftp-server flash:P00308010200.sbn

dial-peer voice 201 voip
description *** SIP-TRUNK (OUT) ***
destination-pattern 9..
voice-class codec 1
session protocol sipv2
session target
dtmf-relay sip-notify rtp-nte
dial-peer voice 210 voip      :: Dial Peer to the asterisk box.      
description Voice mail dial peer
destination-pattern 22...
session protocol sipv2
session target ipv4:192.168.xx3.254
dtmf-relay rtp-nte
codec g711ulaw
no vad

credentials username XXX password XX realm asterisk
authentication username XX password 7 XX realm asterisk
retry invite 2
retry register 3
timers connect 100
registrar expires 3600
registrar expires 3600 secondary

load 7960-7940 P00308010200
max-ephones 35
max-dn 35
ip source-address port 2000
timeouts interdigit 4
system message XX
max-conferences 4 gain -6
call-forward pattern .T
call-forward system redirecting-expanded
transfer-system full-consult dss
transfer-pattern .T
secondary-dialtone 9
directory last-name-first
voicemail 3999      :: Voicemail extension
mwi ipv4: unsolicited  :: Music on hold from Asterisk box
create cnf-files version-stamp 7960 Jan 15 2011 20:22:06
ephone-template  5
softkeys idle  Newcall Cfwdall Pickup
softkeys seized  Endcall Cfwdall Pickup
softkeys alerting  Endcall
softkeys connected  Endcall Hold Park Trnsfer Confrn
softkeys ringing  Answer
type 7960
ephone-dn  1
number 231
label Ext 231
description 714-700-0000
name Etx 231
call-forward busy 3231
call-forward noan 3231 timeout 10

ephone  1
device-security-mode none
mac-address A8B1.D41E.DC31
ephone-template 5
type 7960
button  1:1

The phone was power cycled to get the new settings.
All phones can place and receive call, can transfer etx. I’m trying to integrate Asterisk voicemail with Cme 4.1

--- Asterisk 1.8 FreePBX Config

Using Webmin-Filemanager-Edit, I added the following lines to /etc/asterisk/extensions_custom.conf

Number that CME dial to access voice mail when the message button is depressed on the IP Phone.
exten => 3999,1,VoicemailMain(${CALLERIDNUM})
exten => 3999,2,Wait(3)
exten => 3999,3,Hangup

;Number that CME dials to forward voice mail to Asterisk
exten => _3XXX,1,Setvar(ext=${EXTEN:1})
exten => _3XXX,2,Goto,vmail|s|1

Using FreePBX, I created a SIP trunk to CME’s Voice VLAN.

Trunk Name: DestoCME

Peers Detials
Host =
Type = friend
Qualify = yes
Context = cme-trunk

Using Free PBX, I created an outbound route to the CME trunk created previously:

Add Route:

Route Name: CME
Dial Patterns: 32XX

Truck Sequence: SIP/cme -trunk

Everything else defaults

For the CME voicemail extension, I created a corresponding SIP extension in Asterisk PBX with no secret

(Extension password), a DID number, enable voicemail services and check the NAT settings:

Add Sip Extension

User Extension: 3231
Display/ Name: CME3231

Add a DID entry with a prefix of 3 and leave the secret blank (no password):

Did Description: CME3231
Add Inbound DID: 3231

I enabled voicemail

And set Nat = no

My Problem:

When I press the voicemail button on the Cisco 7960 or dial the voicemail extension 3231 it display “Host cannot be found” on the phone
There seems to be no connection between the cme and asterisk
My question do I need a second sip-ua connecting the Cisco CME to asterisk?

Any ideas will help

Thanks again.

Question by:MikeLeePIT
LVL 13

Accepted Solution

luc_roy earned 500 total points
ID: 36452118
does this only happen with V-Mail? Do you have phones on both the CME and Asterisk?  Can they call each other?

Author Comment

ID: 37413355
I could not get the project to work. We have since purchase a unity express for vm. Thanks again.

Featured Post

Resolve Critical IT Incidents Fast

If your data, services or processes become compromised, your organization can suffer damage in just minutes and how fast you communicate during a major IT incident is everything. Learn how to immediately identify incidents & best practices to resolve them quickly and effectively.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
NBX V3000 Flashing Red Lights - What does this mean 5 76
Connect TV screen in another room 6 82
Lync - CUCM Integration Question 2 52
Cisco SRST questions 5 22
As companies replace their old PBX phone systems with Unified IP Communications, many are finding out that legacy applications such as fax do not work well with VoIP. Fortunately, Cloud Faxing provides a cost-effective alternative that works over an…
Messaging apps are amazing tools with the power to do a lot of good, but the truth is the process of collaborating with coworkers requires relationships established through meaningful communication - the kind of communication that only happens face-…
Sending a Secure fax is easy with eFax Corporate ( First, Just open a new email message.  In the To field, type your recipient's fax number You can even send a secure international fax — just include t…
Internet Business Fax to Email Made Easy - With eFax Corporate (, you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

749 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question