[asterisk-bugs] [Asterisk 0011406]: New voicemail count incorrect when using IMAP storage and delete=yes flag

noreply at bugs.digium.com noreply at bugs.digium.com
Thu Oct 30 11:01:08 CDT 2008


A NOTE has been added to this issue. 
====================================================================== 
http://bugs.digium.com/view.php?id=11406 
====================================================================== 
Reported By:                jaroth
Assigned To:                putnopvut
====================================================================== 
Project:                    Asterisk
Issue ID:                   11406
Category:                   Applications/app_voicemail
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     assigned
Asterisk Version:            SVN 
SVN Branch (only for SVN checkouts, not tarball releases):  trunk 
SVN Revision (number only!): 90000 
Disclaimer on File?:        N/A 
Request Review:              
====================================================================== 
Date Submitted:             11-28-2007 13:45 CST
Last Modified:              12-06-2007 13:49 CST
====================================================================== 
Summary:                    New voicemail count incorrect when using IMAP
storage and delete=yes flag
Description: 
When using IMAP storage, mail is always stored in the IMAP mailbox, even if
"delete=yes" is set in the voicemail configuration for a user.  This
creates erroneous MWI events since it saves the message even though it
shouldn't.  This patch checks if delete=yes before storing the message in
the IMAP folder.
====================================================================== 

---------------------------------------------------------------------- 
 putnopvut - 12-06-07 13:49  
---------------------------------------------------------------------- 
I understand the idea behind this patch, but I think the execution is a bit
flawed. The reason is that this will fail under the circumstance where
multiple recipients are specified in the call to Voicemail(). There may be
other failure cases as well, but that was the one that immediately jumped
out at me when reading through the code.

The way to implement this while minimizing failures would be to do this
the same way as the other storage methods. That is, in notify_new_message,
check the VM_DELETE flag, and if it is set, call IMAP_DELETE and decrement
the new message count. This does add some expense (storing a message and
then deleting it) but because the possibility exists for something to be
done with the message between storage and deletion, following this model is
safest. 

Issue History 
Date Modified   Username       Field                    Change               
====================================================================== 
12-06-07 13:49  putnopvut      Note Added: 0074937                          
======================================================================




More information about the asterisk-bugs mailing list