[asterisk-dev] Event based MWI

Russell Bryant russell at digium.com
Wed Mar 28 13:20:55 MST 2007


Bob Atkins wrote:
> I appreciate the idea you are trying to implement and the challenges 
> that you are faced with in dealing with external changes to the 
> voicemail box. You may still be able to use event based techniques with 
> an IMAP connection using the IDLE option in imap. The imap server should 
> notify you of changes to the box so that you don't have to keep polling 
> it. You would still need to figure out if the change notification from 
> the imap server involved the delivery of a new voice message since an 
> email box would likely be storing regular email as well.
> 
> That said, you may still be faced with using a polling technique. I 
> would definitely vote for having a configurable polling interval. 
> Currently polling every 10 seconds is far to frequent for the majority 
> of cases. Based on your event oriented approach it may be possible to 
> get the best of both worlds - event and polling based. To have fast MWI 
> indication it may be very reasonable for the voicemail system to 
> generate an event indicating that the voicemail box has been changed and 
> it may also be reasonable to also have a slower/longer configurable 
> polling interval in much the same way that an email client polls for new 
> messages. That way when the voicemail system changes the box the 
> indication will be pretty much immediate however, when the email system 
> changes the box, the indication could be updated at a much slower rate - 
> but most importantly a configurable one that will allow the system 
> managers to decide how frequently a box is polled for changes allowing 
> them to decide what is most ideal for their users.

Thanks for the feedback.  I think the right way to go forward here is to 
add a couple of configuration options; one to enable polling, and one to 
control the polling frequency.  That way, this behavior will only be 
used in the situations where it is necessary.

It would be nice to implement the usage of the IDLE option that you 
mentioned for IMAP.  However, I may just leave that for future 
enhancement and say that for now, polling will be required.

-- 
Russell Bryant
Software Engineer
Digium, Inc.


More information about the asterisk-dev mailing list