[Home]

Summary:ASTERISK-10917: New voicemail count incorrect when using IMAP storage and delete=yes flag
Reporter:James Rothenberger (jaroth)Labels:
Date Opened:2007-11-28 13:45:19.000-0600Date Closed:2008-02-14 18:23:20.000-0600
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Applications/app_voicemail
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) deleteflag_v2.patch
( 1) deleteflag.patch
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.
Comments:By: Mark Michelson (mmichelson) 2007-12-06 13:49:12.000-0600

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.

By: Mark Michelson (mmichelson) 2008-02-08 13:44:10.000-0600

Ping. Any new development here?

By: James Rothenberger (jaroth) 2008-02-08 13:57:39.000-0600

I'm working on this one, I should have something shortly.

By: James Rothenberger (jaroth) 2008-02-13 14:52:53.000-0600

I've uploaded a new patch containing the fixes proposed by putnopvut.

By: Digium Subversion (svnbot) 2008-02-14 14:52:36.000-0600

Repository: asterisk
Revision: 103688

U   branches/1.4/apps/app_voicemail.c

------------------------------------------------------------------------
r103688 | mmichelson | 2008-02-14 14:52:35 -0600 (Thu, 14 Feb 2008) | 9 lines

Fix the new message count if delete=yes when using IMAP storage.

(closes issue ASTERISK-10917)
Reported by: jaroth
Patches:
     deleteflag_v2.patch uploaded by jaroth (license 50)
 Tested by: jaroth


------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=103688

By: Digium Subversion (svnbot) 2008-02-14 14:55:11.000-0600

Repository: asterisk
Revision: 103689

_U  trunk/
U   trunk/apps/app_voicemail.c

------------------------------------------------------------------------
r103689 | mmichelson | 2008-02-14 14:55:11 -0600 (Thu, 14 Feb 2008) | 17 lines

Merged revisions 103688 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r103688 | mmichelson | 2008-02-14 14:55:48 -0600 (Thu, 14 Feb 2008) | 9 lines

Fix the new message count if delete=yes when using IMAP storage.

(closes issue ASTERISK-10917)
Reported by: jaroth
Patches:
     deleteflag_v2.patch uploaded by jaroth (license 50)
 Tested by: jaroth


........

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=103689

By: Digium Subversion (svnbot) 2008-02-14 18:23:20.000-0600

Repository: asterisk
Revision: 103708

_U  team/murf/bug11210/
U   team/murf/bug11210/UPGRADE.txt
U   team/murf/bug11210/apps/app_externalivr.c
U   team/murf/bug11210/apps/app_queue.c
U   team/murf/bug11210/apps/app_voicemail.c
U   team/murf/bug11210/channels/chan_iax2.c
U   team/murf/bug11210/configs/queues.conf.sample
U   team/murf/bug11210/configure
U   team/murf/bug11210/configure.ac
U   team/murf/bug11210/doc/tex/imapstorage.tex
U   team/murf/bug11210/funcs/func_cdr.c
U   team/murf/bug11210/include/asterisk/autoconfig.h.in
U   team/murf/bug11210/res/res_agi.c
U   team/murf/bug11210/res/res_musiconhold.c

------------------------------------------------------------------------
r103708 | murf | 2008-02-14 18:23:17 -0600 (Thu, 14 Feb 2008) | 187 lines

Merged revisions 103658,103662,103668,103677,103682,103685,103687,103689,103691,103694,103699-103700,103702,103704-103705 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
r103658 | mmichelson | 2008-02-13 08:47:25 -0700 (Wed, 13 Feb 2008) | 10 lines

1. Deprecate SetMusicOnHold and WaitMusicOnHold.
2. Add a duration parameter to MusicOnHold

(closes issue ASTERISK-11358)
Reported by: dimas
Patches:
     v2-moh.patch uploaded by dimas (license 88)
 Tested by: dimas


................
r103662 | jpeeler | 2008-02-13 14:04:31 -0700 (Wed, 13 Feb 2008) | 6 lines

(closes issue ASTERISK-11286)
Reported by: ctooley
Patches:
     additional_eivr_commands.patch uploaded by ctooley (license 136)
Tested by: ctooley

................
r103668 | oej | 2008-02-14 03:19:09 -0700 (Thu, 14 Feb 2008) | 2 lines

Formatting fixes

................
r103677 | qwell | 2008-02-14 11:39:51 -0700 (Thu, 14 Feb 2008) | 11 lines

Add periodic jitter stats to CLI and manager.

(closes issue ASTERISK-7968)
Reported by: stevedavies
Patches:
     jblogging-trunk.patch uploaded by stevedavies
     jblogging-trunk_wmgrevent.patch uploaded by johann8384
     updated_jbloggin-trunk_mgrevent.patch uploaded by johann8384 (license 190)
     (with additional changes by me)
Tested by: stevedavies, johann8384

................
r103682 | jpeeler | 2008-02-14 12:47:39 -0700 (Thu, 14 Feb 2008) | 1 line

a few syntax changes and safer code
................
r103685 | qwell | 2008-02-14 12:52:21 -0700 (Thu, 14 Feb 2008) | 13 lines

Merged revisions 103683 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r103683 | qwell | 2008-02-14 13:51:10 -0600 (Thu, 14 Feb 2008) | 5 lines

Document the 'l' option to the CDR() function.
(Thanks voipgate for pointing out the option, and Leif for providing text for it.)

Closes issue ASTERISK-11166.

........

................
r103687 | mmichelson | 2008-02-14 13:46:00 -0700 (Thu, 14 Feb 2008) | 10 lines

Change the queue holdtime announcement to happen at any interval (not just greater than two minutes). Remove
the saying of less-than for holdtime announcements since it can lead to awkward holdtime announcements. Using
'1' as a queue-round-seconds value is no longer valid.

(closes issue ASTERISK-9451)
Reported by: caio1982
Patches:
     queue_announce5.diff uploaded by caio1982 (license 22)
 Tested by: caio1982, putnopvut

................
r103689 | mmichelson | 2008-02-14 13:58:30 -0700 (Thu, 14 Feb 2008) | 17 lines

Merged revisions 103688 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r103688 | mmichelson | 2008-02-14 14:55:48 -0600 (Thu, 14 Feb 2008) | 9 lines

Fix the new message count if delete=yes when using IMAP storage.

(closes issue ASTERISK-10917)
Reported by: jaroth
Patches:
     deleteflag_v2.patch uploaded by jaroth (license 50)
 Tested by: jaroth


........

................
r103691 | mmichelson | 2008-02-14 14:04:37 -0700 (Thu, 14 Feb 2008) | 11 lines

Merged revisions 103690 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r103690 | mmichelson | 2008-02-14 15:03:02 -0600 (Thu, 14 Feb 2008) | 3 lines

Fix build for non-IMAP builds


........

................
r103694 | qwell | 2008-02-14 14:21:53 -0700 (Thu, 14 Feb 2008) | 8 lines

Modify ldap autoconf function, so that an incorrect ldap library is not found on Solaris (it is incompatible).
Also removes second check for awk, which causes Solaris to find an incompatible version of awk.

(closes issue ASTERISK-11290)
Reported by: snuffy
Patches:
     bug-11829.diff uploaded by snuffy (license 35)

................
r103699 | mmichelson | 2008-02-14 16:35:21 -0700 (Thu, 14 Feb 2008) | 20 lines

Blocked revisions 103698 via svnmerge

........
r103698 | mmichelson | 2008-02-14 17:30:17 -0600 (Thu, 14 Feb 2008) | 13 lines

Change to the configure logic regarding IMAP. Prior to this commit, if you wished to configure
Asterisk with IMAP support, you would use the --with-imap configure switch in one of the following
two ways:
--with-imap=/some/directory would look in the directory specified for a UW IMAP source installation
--with-imap would assume that you had imap-2004g installed in .. relative to the Asterisk source

With this set of changes the two above options still work the same, but there are two new behaviors, too.
--with-imap=system will assume that you have -libc-client.so where you store your shared objects and will
           attempt to find c-client headers in your include path either in the imap or c-client directory.
If either of the two original methods of specifying the imap option should fail, then the check for --with-imap
=system will be performed in addition. It is only after this "system" check that failure can happen.


........

................
r103700 | mmichelson | 2008-02-14 16:39:47 -0700 (Thu, 14 Feb 2008) | 5 lines

See commit message for svn revision 103698. This behavior is the same as what is described
there. The difference is that trunk already had the --with-imap=system option, but it only
checked the include path for headers in the imap directory and not also the c-client directory.


................
r103702 | mmichelson | 2008-02-14 16:48:12 -0700 (Thu, 14 Feb 2008) | 10 lines

Blocked revisions 103701 via svnmerge

........
r103701 | mmichelson | 2008-02-14 17:44:17 -0600 (Thu, 14 Feb 2008) | 3 lines

Update documentation regarding configuration of IMAP


........

................
r103704 | mmichelson | 2008-02-14 16:49:54 -0700 (Thu, 14 Feb 2008) | 10 lines

Blocked revisions 103703 via svnmerge

........
r103703 | mmichelson | 2008-02-14 17:49:24 -0600 (Thu, 14 Feb 2008) | 3 lines

Make a small clarification in the documentation


........

................
r103705 | mmichelson | 2008-02-14 16:51:49 -0700 (Thu, 14 Feb 2008) | 3 lines

Trunk version of 1.4's imap documentation updates


................

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=103708