Summary: | ASTERISK-15015: app_voicemail appending IMAPFOLDER to 'vm-' to create filename for prompt to play. | ||
Reporter: | Barry L. Kline (blkline) | Labels: | |
Date Opened: | 2009-10-20 13:32:45 | Date Closed: | 2011-05-23 10:07:01 |
Priority: | Minor | Regression? | No |
Status: | Closed/Complete | Components: | Applications/app_voicemail/IMAP |
Versions: | Frequency of Occurrence | ||
Related Issues: | |||
Environment: | Attachments: | ||
Description: | If I set IMAPFOLDER=#voicemail.INBOX, then press "2" to change to new folder, the app hangs up on the call. Looking at the console, I find the error: file.c:950 ast_streamfile: Unable to open vm-#voicemail.INBOX (format 0x4 (ulaw)): No such file or directory If I create a symlink from vm-INBOX.gsm to vm-#voicemail.INBOX.gsm things work correctly. Clearly, the app is using IMAPFOLDER to create a file name, which isn't going to work in all cases. ****** ADDITIONAL INFORMATION ****** I reported this on the mailing list, and Kevin Fleming replied: That's a bug; the IMAP folder prefix should not be used in construction of prompt names to be played back. Please open an issue on issues.asterisk.org reporting this problem (and while you are there, also mention that the 'imapfolder' configuration option is not documented in voicemail.conf.sample, and that the usage of imapfolder/imapparentfolder is confusing and should be clarified). Thanks! | ||
Comments: | By: Darrick Hartman (dhartman) 2009-11-03 23:39:45.000-0600 I can confirm this behavior on Asterisk 1.6.1.8 and will clarify. imapfolder MUST be set to INBOX imapparentfolder can be anything For example: imapparentfolder=AAINBOX imapfolder=INBOX New incoming messages are stored in INBOX Old, Work, Family, Friends messages are stored as subfolders under AAINBOX New incoming messages would be stored properly in imapfolder if specified as something other than INBOX, but app_voicemail is looking for a sound file called vm-$(imapfolder). Since vm-$(imapfolder).gsm|ulaw does not exist unless the $(imapfolder) is set to INBOX (or presumably another name which matches an existing vm- prompt), app_voicemail exits with a warning that could not find vm-$(imapfolder) (if imapfolder is set to AAINBOX the following is seen) [Nov 3 22:28:32] WARNING[4062]: file.c:650 ast_openstream_full: File vm-AAINBOX does not exist in any format [Nov 3 22:28:32] WARNING[4062]: file.c:933 ast_streamfile: Unable to open vm-AAINBOX (format 0x1000 (g722)): No such file or directory By: Russell Bryant (russell) 2011-05-05 11:04:24 This behavior is pretty bizarre. I propose this as the fix: 1) Document the current behavior for how it generates filenames to play. 2) Before playing back the dynamically generated filename, check to see if it exists. If it doesn't exist, fall back to the version of the filename without the custom IMAPFOLDER in the filename. By: Digium Subversion (svnbot) 2011-05-20 13:12:22 Repository: asterisk Revision: 320162 U branches/1.8/apps/app_voicemail.c ------------------------------------------------------------------------ r320162 | jrose | 2011-05-20 13:12:22 -0500 (Fri, 20 May 2011) | 15 lines Fixes an imapfolder related crash imapfolders being set in the general section of voicemail would cause the inbox folder name to change. Since sound file names are made based on the names of the folders, this would cause the audio related to that folder name to change and if Asterisk attempted to play it, the channel would instantly hang up when the audio file couldn't be found. This patch searches for the name of the folder first to leave existing behavior in tact and if that fails, it uses the normal inbox name to get the sound file instead. (closes issue ASTERISK-15015) Reported by: blkline Review: https://reviewboard.asterisk.org/r/1215/ ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=320162 By: Digium Subversion (svnbot) 2011-05-23 09:27:45 Repository: asterisk Revision: 320178 _U trunk/ U trunk/apps/app_voicemail.c ------------------------------------------------------------------------ r320178 | jrose | 2011-05-23 09:27:44 -0500 (Mon, 23 May 2011) | 22 lines Merged revisions 320162 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r320162 | jrose | 2011-05-20 13:12:21 -0500 (Fri, 20 May 2011) | 15 lines Fixes an imapfolder related crash imapfolders being set in the general section of voicemail would cause the inbox folder name to change. Since sound file names are made based on the names of the folders, this would cause the audio related to that folder name to change and if Asterisk attempted to play it, the channel would instantly hang up when the audio file couldn't be found. This patch searches for the name of the folder first to leave existing behavior in tact and if that fails, it uses the normal inbox name to get the sound file instead. (closes issue ASTERISK-15015) Reported by: blkline Review: https://reviewboard.asterisk.org/r/1215/ ........ ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=320178 |