Skip to content

[mod_voicemail] Skip unplayable message files instead of aborting playback - #3157

Open
jacky-w-j-li wants to merge 1 commit into
signalwire:masterfrom
jacky-w-j-li:fix-voicemail-skip-unplayable-message
Open

[mod_voicemail] Skip unplayable message files instead of aborting playback#3157
jacky-w-j-li wants to merge 1 commit into
signalwire:masterfrom
jacky-w-j-li:fix-voicemail-skip-unplayable-message

Conversation

@jacky-w-j-li

Copy link
Copy Markdown

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 with TRY_CODE(switch_ivr_play_file(...)). When switch_core_file_open() cannot open the file, switch_ivr_play_file() returns SWITCH_STATUS_NOTFOUND (src/switch_ivr_play_say.c:1494-1497), and TRY_CODE treats anything other than SUCCESS or BREAK as fatal and jumps to end. 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_MACRO prompt 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Voicemail Playback Hangs on Corrupted or 0 bytes Audio File, Blocking Navigation

1 participant