]> 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:40:16 +0000 (07:40 -0600)
commit82f9f2db6b398c96dda87164a317685dfa838f1e
tree2fadfd5fbafca5b79fb0057f8b87afeb3b826258
parent5713fc0b492c4e4f12513c8cc7c5e07dee4d2d75
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