app_voicemail: Remove need to subscribe to stasis

app_voicemail was using the stasis cache to build and maintain a
list of mailboxes that had subscribers.  It then used this list
to determine if a mailbox should be polled for new messages if
polling was enabled.  For this to work, stasis had to cache every
subscription and unsubscription to the mailbox which caused a lot of
overhead, both cpu and memory related.

Since polling is only required when changes are being made to
mailboxes outside of app_voicemail and since the number of mailboxes
that don't have any subscribers is likely to be very low, all
mailboxes are now polled instead of just the ones with subscribers.

This paves the way for disabling the caching of stasis subscription
change messages.

Also fixed cleanup in some of the unit tests that not only left
test users in the users list but also caused segfaults if the tests
were run more than once.

ASTERISK-27121

Change-Id: I5cceb737246949f9782955c64425b8bd25a9e9ee
This commit is contained in:
George Joseph
2018-09-13 06:55:20 -06:00
parent 3d9deb35f0
commit cdece3b637
2 changed files with 241 additions and 280 deletions

View File

@@ -387,17 +387,6 @@ sendvoicemail=yes ; Allow the user to compose and send a voicemail while inside
; defaults to being off
; backupdeleted=100
; Asterisk Task Processor Queue Size
; On heavy loaded system you may need to increase 'app_voicemail' taskprocessor queue.
; If the taskprocessor queue size reached high water level, the alert is triggered.
; If the alert is set then some modules (for example pjsip) slow down its production
; until the alert is cleared.
; The alert is cleared when taskprocessor queue size drops to the low water clear level.
; The next options set taskprocessor queue levels for this module.
; tps_queue_high=500 ; Taskprocessor high water alert trigger level.
; tps_queue_low=450 ; Taskprocessor low water clear alert level.
; The default is -1 for 90% of high water level.
[zonemessages]
; Users may be located in different timezones, or may have different
; message announcements for their introductory message when they enter