A recent change made interactive vm_states no longer get
added to the list of vm_states and instead get stored in
thread-local storage.
In trunk and all the 1.6.X branches, the problem is that
when we search for messages in a voicemail box, we would
attempt to update the appropriate vm_state struct by directly
searching in the list of vm_states instead of using the
get_vm_state_by_imap_user function. This meant we could not
find the interactive vm_state that we wanted.
(closes issue #14685)
Reported by: BlargMaN
Patches:
14685.patch uploaded by mmichelson (license 60)
Tested by: BlargMaN, qualleyiv, mmichelson
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@186286 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This code comes from svn/asterisk/team/russell/event_performance/.
Here is a summary of the changes that have been made, in order of both
invasiveness and performance impact, from smallest to largest.
1) Asterisk 1.6.1 introduces some additional logic to be able to handle
distributed device state. This functionality comes at a cost.
One relatively minor change in this patch is that the extra processing
required for distributed device state is now completely bypassed if
it's not needed.
2) One of the things that I noticed when profiling this code was that a
_lot_ of time was spent doing string comparisons. I changed the way
strings are represented in an event to include a hash value at the front.
So, before doing a string comparison, we do an integer comparison on the
hash.
3) Finally, the code that handles the event cache has been re-written.
I tried to do this in a such a way that it had minimal impact on the API.
I did have to change one API call, though - ast_event_queue_and_cache().
However, the way it works now is nicer, IMO. Each type of event that
can be cached (MWI, device state) has its own hash table and rules for
hashing and comparing objects. This by far made the biggest impact on
performance.
For additional details regarding this code and how it was tested, please see the
review request.
(closes issue #14738)
Reported by: russell
Review: http://reviewboard.digium.com/r/205/
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@184339 65c4cc65-6c06-0410-ace0-fbb531ad65f3
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r180464 | mmichelson | 2009-03-05 17:26:11 -0600 (Thu, 05 Mar 2009) | 16 lines
[IMAP] Fix message retrieval issues when identical mailbox names were defined in separate contexts.
There was a fix put in a while back so that an X-Asterisk-VM-Context message header was
added to stored IMAP voicemails. This would allow for us to differentiate if the same
mailbox name was used in multiple contexts. The problem still left was that not all places
where messages were retrieved actually attempted to use this header for information when
retrieving messages. This commit fixes that so that MWI and message retrieval from VoiceMailMain
work as expected.
(closes issue #13853)
Reported by: vicks1
Patches:
13853_v2.patch uploaded by mmichelson (license 60)
Tested by: lmadsen
........
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@180465 65c4cc65-6c06-0410-ace0-fbb531ad65f3
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r180380 | mmichelson | 2009-03-05 12:58:48 -0600 (Thu, 05 Mar 2009) | 25 lines
Fix broken mailbox parsing when searchcontexts option is enabled.
When using the searchcontexts option in voicemail.conf, the code
made the assumption that all mailbox names defined were unique across
all contexts. However, the code did nothing to actually enforce this
assumption, nor did it do anything to alert a user that he may have
created an ambiguity in his voicemail.conf file by defining the same
mailbox name in multiple contexts.
With this change, we now will issue a nice long warning if searchcontexts
is on and we encounter the same mailbox name in multiple contexts and ignore
any duplicates after the first box. Whether searchcontexts is enabled or not,
if we come across a duplicate mailbox in the same context, then we will issue
a warning and ignore the duplicated mailbox. I have also added a small note
to voicemail.conf.sample in the explanation for searchcontexts explaining
that you cannot define the same mailbox in multiple contexts if you have
enabled the option.
(closes issue #14599)
Reported by: lmadsen
Patches:
14599.patch uploaded by mmichelson (license 60) (with slight modification)
Tested by: lmadsen
........
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@180383 65c4cc65-6c06-0410-ace0-fbb531ad65f3
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r175590 | mmichelson | 2009-02-13 13:47:48 -0600 (Fri, 13 Feb 2009) | 16 lines
Fix a potential crash situation when using IMAP voicemail
If calling into VoiceMailMain when using IMAP storage, it was
possible to crash Asterisk by hanging up the phone when prompted
for a voicemail mailbox. This patch fixes the issue.
While it may appear that this patch is superficial, it allows code
execution to continue to the failure case just below the IMAP_STORAGE
code block where this patch has been applied
(closes issue #14473)
Reported by: dwpaul
Patches:
voicemail_imap_crash_no_mailbox.patch uploaded by dwpaul (license 689)
........
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@175591 65c4cc65-6c06-0410-ace0-fbb531ad65f3
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r173696 | jpeeler | 2009-02-05 14:47:51 -0600 (Thu, 05 Feb 2009) | 12 lines
Add new configuration option to make shared IMAP mailboxes function as expected.
The new option is "imapvmshareid" which is an ID to tag multiple mailboxes
using the same IMAP storage location to function as one mailbox. This allows
all messages to be retrieved for any user in the group. The patch alters the
'X-Asterisk-VM-Extension' header that is responsible for matching voicemails
for a given user.
(closes issue #13673)
Reported by: howardwilkinson
........
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@173697 65c4cc65-6c06-0410-ace0-fbb531ad65f3
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r165255 | mmichelson | 2008-12-17 14:51:38 -0600 (Wed, 17 Dec 2008) | 7 lines
Fix some memory leaks found while looking at how realtime
configs are handled.
Also cleaned up some coding guidelines violations in app_realtime.c,
mostly related to spacing
........
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@165318 65c4cc65-6c06-0410-ace0-fbb531ad65f3
it was not being used before. Also, I've moved the urgent
folder check in messagecount() up a bit so that the flow is
a bit better.
This was something I noticed while taking a look at issue
#13973, although I don't think this is the underlying cause
of the issue.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@165142 65c4cc65-6c06-0410-ace0-fbb531ad65f3
emailbody and pagerbody to CR-LF so that the IMAP server doesn't spit out an
error. This was informally reported on #asterisk-dev a few weeks ago. Reviewed
by Mark M. on IRC.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@161349 65c4cc65-6c06-0410-ace0-fbb531ad65f3
is in use so that the message is deleted from both
local and IMAP storage.
(closes issue #13642)
Reported by: jaroth
Patches:
deleteyes.patch uploaded by jaroth (license 50)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@157562 65c4cc65-6c06-0410-ace0-fbb531ad65f3
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r156816 | mmichelson | 2008-11-14 09:18:59 -0600 (Fri, 14 Nov 2008) | 10 lines
If the prompt to reenter a voicemail password timed out, it
resulted in the password not being saved, even if the input matched
what you gave when first prompted to enter a new password. This is
because the return value of ast_readstring was checked, but not checked
properly.
This bug was discovered by Jared Smith during an Asterisk training course.
Thanks for reporting it!
........
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@156817 65c4cc65-6c06-0410-ace0-fbb531ad65f3
along the way, change tags used in configure script, menuselect-deps and code for various dependencies to be consistently named
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@154151 65c4cc65-6c06-0410-ace0-fbb531ad65f3
'update2', which permits updates which match across multiple columns, instead
of requiring all tables to have a single unique identifier. All of the other
API calls with the exception of 'update' already had the ability to match on
multiple fields, so it was a missing and very desireable feature that an API
call implementing an update should have this, too.
This does not change any outward performance of Asterisk, but it should make
life easier for application developers who use the RealTime framework.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@148570 65c4cc65-6c06-0410-ace0-fbb531ad65f3