[asterisk-bugs] [Asterisk 0011083]: [patch] Empty voicemail message file causes call into voicemail to disconnect

noreply at bugs.digium.com noreply at bugs.digium.com
Fri Nov 23 11:17:06 CST 2007


A NOTE has been added to this issue. 
====================================================================== 
http://bugs.digium.com/view.php?id=11083 
====================================================================== 
Reported By:                dtyoo
Assigned To:                Corydon76
====================================================================== 
Project:                    Asterisk
Issue ID:                   11083
Category:                   Applications/app_voicemail
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     ready for testing
Asterisk Version:           1.4.13  
SVN Branch (only for SVN checkouts, not tarball releases): N/A  
SVN Revision (number only!):  
Disclaimer on File?:        N/A 
Request Review:              
====================================================================== 
Date Submitted:             10-24-2007 20:44 CDT
Last Modified:              11-23-2007 11:17 CST
====================================================================== 
Summary:                    [patch] Empty voicemail message file causes call
into voicemail to disconnect
Description: 
After upgrading from 1.4.9 to 1.4.13 we are having the following problem
with voicemail.  We sometimes get voicemail messages left in mailboxes
where the wav / data file is 44 bytes long.  The file basically has a
header but no data.  Under 1.4.13 calls into voicemail will be disconnected
after listening to such a message.  1.4.9 did not have this issue.

In case you are curious, these 44 byte messages are being left despite
minmessage being set to 3 in the general section of voicemail.conf.  These
messages are accompanied by a console message "app.c: No audio available on
SIP/IP ADDRESS-b50d7b38??"

Nothing special in the console / log file.  Looks the same as when a
caller hangs up normally even though in this case they are being
disconnected.
====================================================================== 

---------------------------------------------------------------------- 
 gkloepfer - 11-23-07 11:17  
---------------------------------------------------------------------- 
I have submitted a patch for app_voicemail.c that handles corrupt or empty
voicemail messages and more gracefully deals with the issue.  I didn't
realize that I needed to resubmit a "disclaimer" so the patch is not yet
available.

Basically the fix assumes that, in play_message(), if the file being
played-back gets a negative (error) return from wait_file() (which is
really just a call to the Asterisk streaming playback API) the error is
from a corrupt or missing file.  Therefore the error is ignored and control
is returned as though the message played-back in its entirety and the
caller did not press any DTMF digit.

An error message like:
[Nov 23 10:54:28] WARNING[28595]: app_voicemail.c:4621 play_message:
Playback of voicemail message
/var/spool/asterisk/voicemail/default/200/INBOX/msg0000 failed (-1).

is also logged so that, if the error is due to something more critical,
that there is some indication that it is actually happening.

I normally would not recommend simply ignoring the error return like this,
but there is not a good way to inform the caller that there's a problem,
and simply bailing-out of the voicemail system entirely is not a helpful
action.

Of course, it is still a good idea to not create the corrupt VM files to
begin with... (so minmessage=1 and any other fixes to prevent this
condition are also needed). 

Issue History 
Date Modified   Username       Field                    Change               
====================================================================== 
11-23-07 11:17  gkloepfer      Note Added: 0074240                          
======================================================================




More information about the asterisk-bugs mailing list