[Home]

Summary:ASTERISK-10678: Over quota errors ignored
Reporter:Matt Selsky (selsky)Labels:
Date Opened:2007-11-02 13:59:18Date Closed:2007-12-21 14:15:11.000-0600
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Applications/app_voicemail
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) 11152.patch
Description:My IMAP server says that my voicemail folder is over quota when Asterisk tries to append the new message, but the quota error is ignored and the caller is not told that the voicemail was not saved in the mailbox.

Asterisk logs:

[Nov  2 14:46:24] ERROR[25200] app_voicemail.c: IMAP Error: Over quota
[Nov  2 14:46:24] ERROR[25200] app_voicemail.c: Error while sending the message to {imaphost:993/imap/authuser=asterisk/notls/ssl/user=selsky}voicemail

Cyrus telemetry logs:

>1194028385>0000000d NO Over quota
>1194028969>0000001c NO Over quota

Asterisk is trying to append the message to the folder twice, but it fails both times.  This failure is never reported back to the caller with an over-quota message.
Comments:By: Mark Michelson (mmichelson) 2007-11-02 14:02:17

I have a feeling I caused this with a commit I made a few days ago. I'll fix it as soon as I can.

By: Mark Michelson (mmichelson) 2007-11-02 15:18:46

I've uploaded a patch which will hopefully fix your problem. Please test and let me know if the problem still occurs.

By: Matt Selsky (selsky) 2007-11-07 17:16:28.000-0600

Why aren't we just checking the server response after the APPEND?  With the patch, we now do a GETQUOTAROOT, but the error from that seems to be ignored.

<1194471780<0000000b GETQUOTAROOT "{imaphost:993/...}voicemail"
>1194471780>0000000b NO Mailbox does not exist

By: Mark Michelson (mmichelson) 2007-11-13 16:07:38.000-0600

There are a few reasons for not using the server response from the append:

1. We're using the imap c-client library for interfacing with IMAP servers and their function for appending mail only has two possible return values (T for success or NIL for failure). In other words, it is not possible to interpret why an append failed.

2. In most cases, there isn't a way to alert the caller after the append (because they hung up). In cases where the caller is still on the line, they may have to wait an unacceptably long amount of time to hear the server response if there is any latency between the Asterisk server and the IMAP server.

3. Alerting the caller that the mailbox is full before they leave a recording is the same behavior as non-IMAP methods of storage, plus it also saves the caller from possibly recording a long message if they hear beforehand that the mailbox is full.


Apparently the patch I provided is not doing the job, so I will rework it and post the update later.

By: Matt Selsky (selsky) 2007-12-14 15:22:13.000-0600

Have you had a chance to work on this patch?

By: Mark Michelson (mmichelson) 2007-12-14 15:29:10.000-0600

A month has passed already? I'm truly sorry. The issue with the GETQUOTAROOT is that Cyrus only expects the mailbox name (in your case "voicemail") instead of the full path of the mailbox.

There's a patch out right now (issue ASTERISK-10926) for better quota handling. It's much better than the patch I originally put on this bug, but the problem with it is that the hardcoded name "INBOX" is used, which I remember will break your setup. I will work to get the patch on 11415 fixed up and committed soon. Then I will be able to close both that issue and this one.

By: Digium Subversion (svnbot) 2007-12-21 14:08:18.000-0600

Repository: asterisk
Revision: 94540

U   branches/1.4/apps/app_voicemail.c

------------------------------------------------------------------------
r94540 | mmichelson | 2007-12-21 14:08:18 -0600 (Fri, 21 Dec 2007) | 8 lines

Better quota support for using IMAP storage voicemail

(closes issue ASTERISK-10926, reported by jaroth)
(closes issue ASTERISK-10678, reported by selsky)

Patch provided by jaroth


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

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

By: Digium Subversion (svnbot) 2007-12-21 14:15:11.000-0600

Repository: asterisk
Revision: 94542

_U  trunk/
U   trunk/apps/app_voicemail.c

------------------------------------------------------------------------
r94542 | mmichelson | 2007-12-21 14:15:10 -0600 (Fri, 21 Dec 2007) | 16 lines

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

........
r94540 | mmichelson | 2007-12-21 14:11:34 -0600 (Fri, 21 Dec 2007) | 8 lines

Better quota support for using IMAP storage voicemail

(closes issue ASTERISK-10926, reported by jaroth)
(closes issue ASTERISK-10678, reported by selsky)

Patch provided by jaroth


........

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

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