Summary:ASTERISK-09089: [patch] Voicemail may not play instructions for leaving a message
Reporter:David Chappell (chappell)Labels:
Date Opened:2007-03-23 12:35:36Date Closed:2007-06-21 11:50:15
Versions:Frequency of
Environment:Attachments:( 0) vm_patch.diff
Description:If there is no prefile, app_voicemail.c:leave_voicemail may not play vm-intro when it should, due to the fact that the variable res in uninitialized.


This bug can be reproduced by calling VoiceMail(XXXX).  The caller will hear only a beep before recording starts.
Comments:By: David Chappell (chappell) 2007-03-29 11:12:26

Though this patch is as trivial as a patch can possibly be, I have fax a disclaimer because I will be sending more patches soon.

By: Jason Parker (jparker) 2007-05-17 15:48:44

Closing, as res is now initialized in leave_voicemail().

By: David Chappell (chappell) 2007-05-31 11:45:39

I do not believe this bug has been fixed.  The file in question has not been altered in the stable branch in any way since the bug was reported.  Nor can I find any evidence that it has been fixed in trunk.

Yes, res is initialized in leave_voicemail(), at the start of the function.  I meant that it is not reinitialized before being reused.  It is first used to test for the existence of various prefiles.  If none is found, res will have a non zero value.  Since no prefile was found, prefile playback, which normally sets res to zero, is skipped.  The non-zero value causes later code to think that prefile playback has _failed_ or the caller has pressed # to skip the introductory messages and so playback of INTRO is skipped too.

By: Joshua C. Colp (jcolp) 2007-06-21 11:50:15

I've looked at this many different ways and am confident in the current code it works fine.