[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 Sep 22 09:25:24 CDT 2009


The following issue is now READY FOR TESTING. 
====================================================================== 
https://issues.asterisk.org/view.php?id=15670 
====================================================================== 
Reported By:                noahisaac
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   15670
Category:                   Applications/app_voicemail/IMAP
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     ready for testing
Asterisk Version:           1.6.2.0-beta4 
JIRA:                        
Regression:                 No 
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:              2009-09-22 09:25 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.

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

---------------------------------------------------------------------- 
 (0111177) lmadsen (administrator) - 2009-09-22 09:25
 https://issues.asterisk.org/view.php?id=15670#c111177 
---------------------------------------------------------------------- 
Ideally this should probably be posted against trunk.

Could you round up some troops from the asterisk-dev and/or asterisk-users
mailing list to test this out? If anyone else has this issue and the patch
resolves the issue for them, that will go a long way to getting this
committed. Thanks! 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2009-09-22 09:25 lmadsen        Note Added: 0111177                          
2009-09-22 09:25 lmadsen        Status                   feedback => ready for
testing
======================================================================




More information about the asterisk-bugs mailing list