login | register
Tue 02 of Dec, 2008 [14:10 UTC]

voip-info.org

Avaya or Lucent Magix Voicemail Integration

Created by: dano_nd,Last modification on Wed 19 of Nov, 2008 [03:39 UTC]

Integrating Asterisk with the Avaya Merlin Magix PBX



I recently needed to replace the voicemail server for a customer with a flexible alternative. We weren't in a position to remove the Avaya Magix PBX, so continued (and seamless) integration was still necessary. The only problem was the integration between the two systems. The connection was easy enough: 8 FXO ports in the Asterisk server using 2 4-port Digium TDM cards connected to the 8 analog or "single line" extensions from the 016 card in the Avaya. But, with different scenarios on call-in (voicemail check, roll-over to voicemail, inbound call, etc), Asterisk would need to behave differently, so how would this be accomplished?

In short, it's really simple. Avaya/Lucent use what some call "mode code", or DTMF digits used to "direct" the voicemail system as to the type of inbound call. The original server used analog lines as well, so determining those mode codes was simple as attaching a digit grabber and watching the digits come across as different voicemail calls were made.

The following was crafted in my dialplan to route the calls properly:

Mode Code Integration


Beware - the following syntax will probably need to be reviewed for compatibility with later versions of Asterisk. This stuff was used on a v1.0 box.

 ; The following extensions grab the mode code
 ; coming from the Avaya PBX and route the
 ; call appropriately via the Voicemail()
 ; and VoiceMailMain() apps.
 ;
 ; someone pressed vmail check
 exten => _#XX#XXXX##,1,VoicemailMain(${EXTEN:4:4})
 exten => _#XX#XXXX##,2,Hangup()
 ; inside call rolled over to vmail
 exten => _#XX#XXXX#XXXX#,1,Voicemail(u${EXTEN:9:4})
 exten => _#XX#XXXX#XXXX#,2,Hangup()
 ; inside group call rolled over to vmail
 exten => _#XX#XXXX#XXX#,1,Voicemail(u${EXTEN:9:3})
 exten => _#XX#XXXX#XXX#,2,Hangup()
 ; outside/PSTN call rolled over to vmail
 exten => _#XX##XXX.,1,Voicemail(u${EXTEN:5:4})
 exten => _#XX##XXX.,2,Goto(s,7)
 ; outside call went direct to Asterisk box (call from PSTN) 
 exten => _#XX#XXX#,1,Wait(1)
 exten => _#XX#XXX#,2,Goto(s,7)

The only additional step is to ensure you do a WaitExten(1) right after answering as this is the timeframe when the mode code digits are sent across.

From here, you can do what you wish as far as giving your users the ability to leave and check voicemail, not to mention build a very nice automated attendant. As a side note, the Magix analog lines expect calls to be transferred by using the Flash() application, then SendDTMF(XXXX).


Voicemail or MWI (Message Waiting Indicator) Light Integration


The only thing left is to operate the voicemail lights properly, which again is accomplished by the Magix PBX using DTMF codes: *53XXXX for on, and #*53XXXX for off. This is accomplished by adding the following directive in your voicemail.conf:

 externnotify=/usr/local/bin/vmnotify.pl

As well as adding the required script, the original listed here, and a backup listed here. Huge thanks to the original author, Mike Cathey.. Mike's website.

The script requires a few additional directories which are spelled out in the script's contents. Just browse through and make whatever changes you require. It also contains the ability to perform outbound calling when there's messages waiting, but I haven't needed it and thus haven't used or tested it.

See also




Comments

Comments Filter
222

333Merlin Legend/Magix VM

by mnowlin, Monday 09 of January, 2006 [07:45:34 UTC]
Several years ago, I wrote a voice mail/auto-attendant system for our Merlin Legend R3.1 system - I think the following applies to pretty much any Legend or Magix release. (I'm looking at replacing the VM/AA (and eventually the Legend) with Asterisk, which led me to this page.)

Had to figure out those pesky DTMF mode codes that the Merlin sends - here are some notes:

Code is #xx#yyy#zzz# - length of yyy and zzz will vary due to use, length of SDNs, etc.

    #xx#yyy#zzz# - mode xx, from SDN yyy, to SDN zzz

      xx=00 - extensions calling as subscribers into the voice mail system
        yyy = SDN of xtn calling voice mail
        zzz = null
      xx=01 - incoming calls going to the auto-attendant
        yyy = Merlin line number of incoming call (801, 802, etc.)
        zzz = null
      xx=02 - calls sent via DVM button to voice mail - possibly some other use?
        yyy = SDN sending call to VM
        zzz = mailbox number to receive message
      xx=03 - calls bounced from an extension to voice mail coverage
        yyy = null
        zzz = mailbox number to receive message
      xx=10 - night service off
        yyy = null
        zzz = null
      xx=11 - night service on
        yyy = null
        zzz = null

The system is set up with a "Night Service" button on the operator's phone - if night svc is turned on (almost all the time), incoming calls are routed to the VM/AA. If for some reason the VM/AA runs into problems, night service can be turned off and all incoming calls are routed to the operator. Of course, every month or two, the operator inadvertenly turns night service off, and I get a call soon after asking "why are we getting all these calls??" I usually sigh and respond with "see the button on your phone that says Night? Push it, watch the little green light turn on, and everything will be peachy." :)

If anyone has any more codes or corrections to the above, I'd love to know about them.