[asterisk-dev] Event based MWI
Steve Murphy
murf at digium.com
Wed Mar 28 13:54:58 MST 2007
On Wed, 2007-03-28 at 11:52 -0700, Bob Atkins wrote:
> Russell,
>
> 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.
>
> Russell Bryant wrote:
> > I have been working on a generic event system for Asterisk. As a
> > part of this project, I have converted the way that Asterisk handles
> > message waiting indication to be event based instead of polling
> > based.
> >
> > For example, instead of chan_sip checking each mailbox every 10
> > seconds to see if there has been a change, it now waits for
> > app_voicemail to generate an event to indicate that has a change has
> > been made.
> >
> > However, I just realized a pretty big problem with this approach.
> > app_voicemail does not know every time that a mailbox gets changed.
> > It only knows about the instances where it gets changed by a caller.
> > There are other ways voicemail can get modified, such as with a web
> > based voicemail interface, or an email client in the case of using
> > IMAP storage.
> >
> > If anyone has any thoughts on the subject, I would be interested to
> > hear them. I can probably still keep going with this and still get
> > MWI shared between servers. However, it may mean that the change
> > won't have the efficiency gain that I had hoped for. app_voicemail
> > may have to do its own polling of mailboxes that have been
> > subscribed to so that it knows about changes.
> >
What if you supply hooks to register an externally occurring event? Then
it would be the responsibility of whatever interface that mucks with
voicemail, to notify asterisk of the updates, so that it can proceed.
The price of non-compliance, would be unnoticed changes...
--
Steve Murphy
Software Developer
Digium
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3227 bytes
Desc: not available
Url : http://lists.digium.com/pipermail/asterisk-dev/attachments/20070328/5fb68f6f/smime.bin
More information about the asterisk-dev
mailing list