[Asterisk-Users] Message-waiting-indicator thru ZAP interfaces - how to?

John Todd jtodd at loligo.com
Tue Sep 2 10:22:03 MST 2003


>On Tue, 2 Sep 2003, John Todd wrote:
>
>>  >I'm trying to make the MWI indicators on my client's Vodavi Starplus
>>  >DHS phones work. The actual signalling - in-band DTMF from the ZAP
>>  >interfaces directly to the PBX system - works fine. I can manually
>>  >tell asterisk to send "#9610" as DTMF and voila, the MWI on
>>  >extension 10 lights (or goes out.) The question is, how is this
>>  >integrated with voicemail, i.e. so that the MWI turns on and off
>>  >appropriately, when new messages arrive and after a user has
>>  >listened to their messages?
>>  >
>>  >I've checked the last two months of mailing-list messages but found
>>  >no mention of this situation. Any tips or pointers to online docs
>>  >would be appreciated.
>>  >
>>  >Thanks,
>>  >
>>  >Sam
>>  >
>>  >P.S. Thanks to Jsmith for the fast, simple answer to my last
>>  >question re: version number in CVS not updating.
>>
>>  I'm afraid that the answer to this, without programming some stuff
>>  inside of Asterisk, is uuuuuuugly.  I suspect it will involve using
>>  perl or shell scripts to actually peek inside of the
>>  /var/spool/asterisk/vm directories and check things manually, out of
>>  a cron job or out of the "h" context with a System call.  Then, a
>>  call would be created by the script (see sample.call)  - just
>>  thinking about this method gives me the willies.
>>
>>  The clean way would be to put a tiny call into the voicemail app (or
>>  would it be in app.c?) that triggers an outbound call with the
>>  appropriate parameters (see sample.call)
>
>I was working with someone over the weekend that is working on something
>like this, and it might even be the same type of system because the DTMF
>trigger looks similar.
>
>The easiest way to do this is with an external daemon that connects to the
>manager interface.  You just need to watch for MessageWaiting events and
>when you see a change of state trigger an Originate action to dial out and
>enter the required DTMF.
>
>James

Yes, that would work just as well.  However, you'd also still need to 
write a "harvester" that would check the status of each extension. 
You can never trust that your runtime daemon has "caught" all the 
messages that may have been created, and then there's also the 
problem of handling messages that are already in the system when your 
daemon is (re)launched.  Probably a combination: the daemon that 
listens to the manager events, and then every XX hours (and on 
startup) the harvester would check all possible mailboxes for 
statuses to ensure that things were "correct".  This is a typical 
configuration for stateful checks on semi-realtime systems like this.

JT



More information about the asterisk-users mailing list