[asterisk-users] How does IMAP notify Asterisk that I've read a message?

Tilghman Lesher tilghman at mail.jeffandtilghman.com
Sun Nov 23 14:14:09 CST 2008

On Saturday 22 November 2008 22:17:54 Barry L. Kline wrote:
> I have an Asterisk box sitting between the PSTN and a legacy PBX.  I
> have successfully configured Asterisk to use IMAP for voicemail and have
> written the necessary script to turn the MWI indicator (via a .call file
> to the PBX) on and off.  I have two issues still outstanding:
> 1) When the user listens to his voice mail via the phone, it will be
> announced that the caller is unknown, in spite of the fact that the
> email headers show the appropriate Callerid(num) information.  I can
> live with that, but I'll eventually need to get it fixed.
> 2) If I "listen" to the voicemail using my email client, the MWI on the
> phone is not turned off, which isn't surprising given that my script
> needs to be called to generate the .call file.  What I don't know is
> how, exactly, Asterisk is notified that I've listened to my voicemail
> via email.  Does Asterisk poll the server?  If so, where is the
> frequency of the poll set?  Can Asterisk be configured to call the
> script again when the messages are read and the MWI should be turned off?
> The docs don't say anything about this and I've not found anything in my
> googling that has given me any leads?
> I'm currently using Asterisk 1.4.22.
> Thanks for any information that you can provide.

In 1.4, use the "checkmwi" option in the [general] section of sip.conf to
specify how often the SIP channel should poll for message count.  In 1.6,
the message waiting has been changed to use a notification system by
default, which should spare most systems a great deal of extra work.
However, you will still be able to set the "pollmailboxes" option in
voicemail.conf to specify that external programs modify the mailboxes and that
Asterisk should poll the mailboxes (old behavior) to check whether the status
of voicemail has changed.


More information about the asterisk-users mailing list