Voicemail IMAP MWI - inaccurate SIP Notify

I am using FreePBX IMAP Voicemail. Exchange 2010 is my IMAP server. MWI is working for the most part but I have one lingering issue.

  1. Users listens to a new message

  2. Halfway through listening to the new message, the MWI turns off. I believe this is due to the pollmailboxes recognizing the message has been marked as read in Exchange. SIP Notify is accurate and reports 0 new messages.

  3. User hangs up after listening to the message without deleting it. MWI light immediately turns back on after hangup. Hangup trigger a SIP Notify about 1 new message waiting.

  4. MWI light remains on until the user logs into the voicemail through the phone again then it corrects itself.

What can I do to prevent this SIP NOTIFY by the hangup?

This message shows up in CLI when a user hangs up halfway through listening to their voicemail.

[2011-11-10 16:47:10] WARNING[5598]: app_voicemail.c:7802 play_message: Playback of message /var/spool/asterisk/voicemail/default/3533/Voicemail/msg0000 failed
[2011-11-10 16:47:10] WARNING[5598]: file.c:756 ast_readaudio_callback: Failed to write frame

This might be expected.

FreePBX version 2.9.0.7 (FreePBX Distro). Asterisk version 1.8.7.1.

Thanks,
Brendan

So the problems is that both pollmailboxes and unsolicited MWI from voicemail are both sending MWI and they both calculate it differently. Pollmailboxes sees that in the email folder, the message is marked as read so it goes to turn off the MWI. The traditional dial into VoicemailMain does not turn MWI off unless you move the voicemail message into a different folder or delete the message. This causes the MWI light to turn off when you are listening to the voicemail(from pollmailbox) and when you hangup this causes the MWI light to turn on (from TUI).

Anyone have any ideas on how I can get MWI to work reliably?

Regards,
Brendan