]> git.ipfire.org Git - thirdparty/asterisk.git/commit
app_voicemail: Remove need to subscribe to stasis
authorGeorge Joseph <gjoseph@digium.com>
Thu, 13 Sep 2018 12:55:20 +0000 (06:55 -0600)
committerGeorge Joseph <gjoseph@digium.com>
Tue, 18 Sep 2018 13:37:55 +0000 (07:37 -0600)
commit1843b0e2b52ba95df57f2f92a8c4669cbbb17bfa
treeacc5d6e38f4b319b1b1c75f13e8819a24fa6da08
parent926ac196af9f5dcdf2b1f021b34e1a2f3df64c8d
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
apps/app_voicemail.c
configs/samples/voicemail.conf.sample