[asterisk-bugs] [Asterisk 0015670]: [patch] Checking IMAP folder for voicemail only gets messages in the same context and extension

Asterisk Bug Tracker noreply at bugs.digium.com
Tue Jul 6 15:27:33 CDT 2010


The following issue has been ASSIGNED. 
====================================================================== 
https://issues.asterisk.org/view.php?id=15670 
====================================================================== 
Reported By:                noahisaac
Assigned To:                tilghman
====================================================================== 
Project:                    Asterisk
Issue ID:                   15670
Category:                   Applications/app_voicemail/IMAP
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     ready for testing
Target Version:             1.6.2.11
Asterisk Version:           SVN 
JIRA:                       SWP-1764 
Regression:                 No 
Reviewboard Link:            
SVN Branch (only for SVN checkouts, not tarball releases): N/A 
SVN Revision (number only!):  
Request Review:              
====================================================================== 
Date Submitted:             2009-08-06 12:46 CDT
Last Modified:              2010-07-06 15:27 CDT
====================================================================== 
Summary:                    [patch] Checking IMAP folder for voicemail only gets
messages in the same context and extension
Description: 
I believe the summary is the intended behavior, but I'm submitting this as
a bug because this behavior is (perhaps) inconsistent with the behavior of
file-based voicemail, and it artificially limits the possibilities of
accessing/relaying messages with a standard IMAP email client.

In file-based voicemail, if you put a msgXXXX.wav/msgXXXX.txt pair into
any voicemail folder, it will be accessible from the intended user's
VoicemailMain().  It does not matter what the msgXXXX.txt file says for the
extension or context.

In IMAP voicemail, though, messagecount() and open_mailbox() only get
messages in the target IMAP folder where the "X-Asterisk-VM-Context" and
"A-Asterisk-VM-Extension" match the current user's context and extension. 
If you drag and drop a message from one user to another in an IMAP email
client, the intended recipient will not be able to access the message from
his/her phone because the extension and/or context would be different.  The
c-client calls look like this:

hdr = mail_newsearchheader("X-Asterisk-VM-Extension",
(!ast_strlen_zero(vmu->imapvmshareid) ? vmu->imapvmshareid :
vmu->mailbox));
hdr->next = mail_newsearchheader("X-Asterisk-VM-Context", vmu->context);

I think it should be changed to just look for any asterisk voicemail
messages in the target IMAP folder.  This does the trick:

hdr = mail_newsearchheader("X-Asterisk-VM-Message-Type", "Message");

I know that file-based voicemails are in completely separate directories
for different contexts, so the context-specific check for IMAP voicemail is
maybe not entirely inconsistent.  Perhaps, if this behavior is really
desired, we could use the "searchcontexts" option from voicemail.conf to
specify whether to get messages from all contexts, or just the current
one.

Thoughts?

I'll post a patch.

====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2010-07-06 15:27 lmadsen        Asterisk Version         1.6.2.0-beta4 => SVN
2010-07-06 15:27 lmadsen        Assigned To               => tilghman        
2010-07-06 15:27 lmadsen        Target Version            => 1.6.2.11        
2010-07-06 15:27 lmadsen        Description Updated                          
======================================================================




More information about the asterisk-bugs mailing list