[mod_voicemail] Skip unplayable message files instead of aborting playback - #3157
Open
jacky-w-j-li wants to merge 1 commit into
Open
[mod_voicemail] Skip unplayable message files instead of aborting playback#3157jacky-w-j-li wants to merge 1 commit into
jacky-w-j-li wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When a stored voicemail message file is empty or otherwise unreadable, playing it back fails and the caller is thrown back to the main voicemail menu on the same message, unable to reach the other messages.
listen_file()plays the message withTRY_CODE(switch_ivr_play_file(...)). Whenswitch_core_file_open()cannot open the file,switch_ivr_play_file()returnsSWITCH_STATUS_NOTFOUND(src/switch_ivr_play_say.c:1494-1497), andTRY_CODEtreats anything other than SUCCESS or BREAK as fatal and jumps toend.listen_file()returns that failure to its caller, which breaks out of the message loop (mod_voicemail.c:2162) and drops back to the main menu. The message is never marked read, so asking for unheard messages replays the same broken file and the caller stays stuck on it.Log the failure at WARNING and treat it as a normal end of playback, so the code falls through to the date announcement and the
VM_LISTEN_FILE_CHECK_MACROprompt and the caller can save, delete or move to the next message. Only a failed playback is affected: BREAK (caller pressed a key during playback) and successful playback keep their existing behaviour.Resolves: #2876