[asterisk-bugs] [Asterisk 0014599]: searchcontexts=yes causes voicemail boxes to be setup wrong

Asterisk Bug Tracker noreply at bugs.digium.com
Wed Mar 4 09:07:12 CST 2009


A NOTE has been added to this issue. 
====================================================================== 
http://bugs.digium.com/view.php?id=14599 
====================================================================== 
Reported By:                lmadsen
Assigned To:                mmichelson
====================================================================== 
Project:                    Asterisk
Issue ID:                   14599
Category:                   Applications/app_voicemail
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     assigned
Target Version:             1.4.24
Asterisk Version:           SVN 
Regression:                 No 
SVN Branch (only for SVN checkouts, not tarball releases):  1.4  
SVN Revision (number only!): 179056 
Request Review:              
====================================================================== 
Date Submitted:             2009-03-03 17:36 CST
Last Modified:              2009-03-04 09:07 CST
====================================================================== 
Summary:                    searchcontexts=yes causes voicemail boxes to be
setup wrong
Description: 
In issue 13853 I thought the following note was an issue with IMAP, but it
seems it is an issue regardless of whether you're using IMAP. The issue
comes from the searchcontext=yes option being enabled. The text in the note
I posted to issue http://bugs.digium.com/view.php?id=13853 is still relevant.
====================================================================== 

---------------------------------------------------------------------- 
 (0101186) mmichelson (administrator) - 2009-03-04 09:07
 http://bugs.digium.com/view.php?id=14599#c101186 
---------------------------------------------------------------------- 
So, I think the problem here isn't so much that the code is broken, but
that searchcontexts is not documented well/properly.

Here's a breakdown, first of all, of what searchcontexts accomplishes. If
you wrote a dialplan that called VoiceMailMain(2000), then you are going to
call into VoiceMailMain for mailbox 2000, but for what context? Without
searchcontexts on, we assume the "default" context. With searchcontexts on,
then we will search through the mailbox contexts defined in voicemail.conf
for mailbox 2000.

Now for searchcontexts to be able to work, it means that you can't
possibly define the same mailbox in two different contexts. Otherwise,
you're leaving things up to chance which mailbox you would be calling into
in the example VoiceMailMain call above. app_voicemail attempts to correct
for any ambiguities you may have in your config file by only allowing for a
single mailbox of any given number to exist, even if you have specified the
same mailbox in multiple voicemail contexts.

The problem with app_voicemail's actions is that it is not clear just from
"voicemail show users" output whether it is discarding an earlier mailbox
declaration when it comes across a duplicate or if it is ignoring the new
one when it is encountered. The output from the CLI command almost makes it
look as though it did some weird merge operation between the mailboxes.
This needs to be corrected. Furthermore, I think that there should be a big
fat warning issued if you attempt to define the same mailbox name in two
different contexts if using the searchcontexts option. 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2009-03-04 09:07 mmichelson     Note Added: 0101186                          
======================================================================




More information about the asterisk-bugs mailing list