[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
Wed Jul 21 16:11:33 CDT 2010


A NOTE has been added to this issue. 
====================================================================== 
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-21 16:11 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.

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

---------------------------------------------------------------------- 
 (0124828) tilghman (administrator) - 2010-07-21 16:11
 https://issues.asterisk.org/view.php?id=15670#c124828 
---------------------------------------------------------------------- 
I think what I'd prefer here would be to change the headers, if possible. 
I don't know how difficult that would be, and the API documents on
libc-client suck rather badly, but I'm looking into it. 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2010-07-21 16:11 tilghman       Note Added: 0124828                          
======================================================================




More information about the asterisk-bugs mailing list