Asterisk Voicemail Problem

I have a Cisco Call Manager Express router that is handling all my calling. It currently has a SIP trunk to Viatalk. I am able to make and receive calls fine. I have an Asterisk box with a SIP trunk configured to the CME router. When a n extension is busy or unavailable I want the Asterisk box to handle voicemail. I have configured extensions_custom.conf, sip_custome.conf, and voicemil.conf to reflect the extensions that are configured in CME. However, I am not sure how to handle the call when CME forwards it to Asterisk in extensions_custom.conf. I currently have:

include => attendant

;messages button
exten => 999,1,Background(silence/1)
exten => 999,2,VoicemailMain(${CALLERID(num)})
exten => 999,3,Hangup

;busy message
exten => 998,1,NoOp,${CALLERID(num)}
exten => 998,2,NoOp,${CALLERID(rdnis)}
exten => 998,3,Playback(silence/1)
exten => 998,4,VoiceMail(b${CALLERID(rdnis)})
exten => 998,5,Hangup

;unavaiable message
exten => 997,1,NoOp,${CALLERID(num)}
exten => 997,2,NoOp,${CALLERID(rdnis)}
exten => 997,3,Playback(silence/1)
exten => 997,4,VoiceMail(u${CALLERID(rdnis)})
exten => 997,5,Hangup

Interoffice calling works with voicemail but when I call from an outside line and it rings on an extension and then goes to Asterisk I just get a busy signal.

Can someone recommend a way to handle the call so when CME transfers the call to Trixbox it knows which voicemail box to dump it into?

  1. I would learn asterisk properly and not using trixbox for a large install.
  2. It is not working because you are working it off their caller ID. You may want to have your CCM call the extension that it is trying to reach like

Exten => _X.,1,Voicemail(${EXTEN})

If you want to send a message to box 100 you should send the call to “extension” 100 and it will go to that mailbox.