[Home]

Summary:ASTERISK-07222: [patch] voicemail odbc storage retrieve_file problem
Reporter:Daniel J. Laffin (dan42)Labels:
Date Opened:2006-06-22 12:18:11Date Closed:2011-06-07 14:07:57
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Applications/app_voicemail
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) app_voicemail.c-1.2.9.1.patch.txt
Description:If I boot asterisk, dial into a mailbox, listen to the "unavail" recording
from the database, and hang up before it completes and moves on to the
"vm-intro" recording, I can continue to call back in and hear the proper
"unavail" recording from the database.

If I let it proceed to the "vm-intro" recording (sometimes it takes 2 or 3
times), every time I dial into that mailbox after that, there are errors
retrieving the "unavail" recording, it rotates all the logs, and it directly to the "vm-intro" recording until I restart asterisk.

The console messages are as follows:

GOOD
-- Executing VoiceMail("SIP/24.148.96.142-006d6380", "u1234") in new stack
-- Playing '/var/spool/asterisk/voicemail/default/1234/unavail' (language 'en')
-- Playing 'vm-intro' (language 'en')

BAD
-- Executing VoiceMail("SIP/24.148.96.142-006d6380", "u1234") in new stack
Jun 21 16:01:07 WARNING[22971]: format_wav_gsm.c:120 check_header: Read
failed (type)
Asterisk Event Logger restarted
Asterisk Queue Logger restarted
Rotated Logs Per SIGXFSZ (Exceeded file size limit)
Jun 21 16:01:07 WARNING[22971]: file.c:436 ast_filehelper: Unable to open
file on /var/spool/asterisk/voicemail/default/1234/unavail.WAV
Jun 21 16:01:07 WARNING[22971]: format_wav_gsm.c:120 check_header: Read
failed (type)
Jun 21 16:01:07 WARNING[22971]: file.c:436 ast_filehelper: Unable to open
file on /var/spool/asterisk/voicemail/default/1234/unavail.WAV
Jun 21 16:01:07 WARNING[22971]: file.c:824 ast_streamfile: Unable to open
/var/spool/asterisk/voicemail/default/1234/unavail (format ulaw): No such
file or directory
-- Playing 'vm-intro' (language 'en')


I found that when things don't go as planned, the write() of retrieve_file
in app_voicemail.c results in errno 27 (File too large).

I also found that putting an fstat() before the write() causes the problem
to go away.

At someones suggestion, I tried using tmpfs and ext2 instead of reiserfs
v3 for the /var/spool/asterisk/voicemail directory, but that resulted in
"bus error" and crash instead of the console messages above.

I am using Debian with the following software:

  asterisk 1.2.9.1 (compiled)
  kernel 2.6.12-1-amd64-generic
  gcc-3.4.3-13
  unixodbc 2.2.4-11
  libmyodbc 3.5.1.09-1
  mysql 4.1.11a-4sarge4

The install was done as follows:

 #wget http://ftp.digium.com/pub/asterisk/releases/asterisk-1.2.9.1.tar.gz
 #tar zxf asterisk-1.2.9.1.tar.gz
 #ucomment: CFLAGS+=-DUSE_ODBC_STORAGE and CFLAGS+=-DEXTENDED_ODBC_STORAGE
    in apps/Makefile
 #make -s CC=gcc-3.4 HOST_CC=gcc-3.4
 #make -s install CC=gcc-3.4 HOST_CC=gcc-3.4
 #setup /etc/asterisk/res_odbc.conf:
    [voipodbc]
    dsn=vmstorage
    pre-connect=yes
 #setup /etc/odbc.ini
    [vmstorage]
    Description = Asterisk voicemail odbc storage
    Driver = MySQL
    Server = localhost
    User = vmuser
    Password = vmpass
    Database = voicemail
    Option = 3
 #odbcinst -i -s -f /etc/odbc.ini
Comments:By: Serge Vecher (serge-v) 2006-06-22 15:57:16

dan42: can you please submit your change as a patchfile and get a disclaimer on file? Bottom of http://bugs.digium.com/main_page.php

By: Daniel J. Laffin (dan42) 2006-06-23 08:14:23

I really wasnt suggesting that adding an fstat() before the write() was anything resembling a correct solution, it merely made the problem go away for some unknown reason to me.  I'll gladly submit it as a patch, but I would believe there is something else going on here that is beyond my scope of knowledge.  Disclaimer faxed, patch attached.



By: Daniel J. Laffin (dan42) 2006-06-23 11:38:09

I've come to find this problem only occurs when the call is hung up DURING the vm-into playback.  If I hang up during that playback, I can't get the greeting to play correctly until rebooting asterisk or letting vm-intro play through and hanging up during the recording of a new message.

While I am unable to reproduce this with my "patch", it doesn't seem like the right solution.

By: Serge Vecher (serge-v) 2006-06-28 12:57:35

dan42: can you please join the #asterisk-dev channel on IRC and talk to vechers about this patch? Thanks.



By: Jason Parker (jparker) 2006-07-27 18:27:30

Updated disclaimer status

By: jmls (jmls) 2006-10-31 12:45:19.000-0600

is this still an issue with 1.2.13 ?

By: jmls (jmls) 2006-11-20 11:51:31.000-0600

ping. housekeeping

By: Tilghman Lesher (tilghman) 2006-12-11 00:11:35.000-0600

No response from reporter.