mirror of
https://github.com/asterisk/asterisk.git
synced 2026-06-27 02:44:13 -07:00
fbe92dce2b
Resequencing is a process that occurs when we open a voicemail folder and discover that there are gaps between messages (e.g. `msg0000.txt` is missing but `msg0001.txt` exists). Resequencing involves shifting the existing messages down so we end up with a sequential list of messages. Currently, this process stops after reaching a threshold based on the message limit (`maxmsg`) configured on the current folder. However, if `maxmsg` is lowered when a voicemail folder contains more than `maxmsg + 10` messages, resequencing will not run completely leaving the mailbox in an inconsistent state. We now resequence up to the maximum number of messages permitted by `app_voicemail` (currently hard-coded at 9999 messages). Fixes #86