[Home]

Summary:ASTERISK-09500: [patch] Imap storage voicemail messages could not be played back from the phone except as gsm
Reporter:xmarksthespot (xmarksthespot)Labels:
Date Opened:2007-05-23 14:38:16Date Closed:2007-06-05 15:18:26
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Applications/app_voicemail
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) 9786revision-1.4.patch
( 1) app_voicemail_fixed_branch.c
( 2) app_voicemail_fixed_trunk.c
( 3) tobranchrev65501.diff
( 4) totrunkrev65659.diff
Description:On an Asterisk 1.4.4 machine with IMAP storage enabled, messages could not be heard on the phone except if saved as "gsm" file format. Other formats such as "wav" could not be played back properly.

This was due to the fact that the attachment file format was hardcoded as gsm in app_voicemail.c. That is to say that app_voicemail saved the third section of IMAP messages (in most cases did not even exist) and saved them as "gsm" files regardless of their actual format.

This happened 100% of the time (goes without saying but better be explicit).

****** ADDITIONAL INFORMATION ******

It uses a make_gsm_file function that, as far as I can tell, only creates a directory.

I have changed this so that app_voicemail checks the attachment format in the IMAP message, and saves the attached file with the correct name. There is also a variable that I use that carries the exact file name of the attachment, so that could be used in the function also.

I'm guessing whoever wrote this didn't really know how to extract the filename from the IMAP message, so I took it on myself to find out.

There's still a couple more bugs I found to report and we could be getting close to fixing IMAP storage for real.

I'm uploading fixed app_voicemail.c files for branch-1.4 and trunk-1.4, as well as patches to the aforementioned versions.

I'm not that great of a programmer so I did it as best I could, and I followed the coding guidelines as much as I could, and it works and doesn't seem to break anything.

I don't have a disclaimer on file yet. If that is necessary I'll send one ASAP.
Comments:By: xmarksthespot (xmarksthespot) 2007-05-23 14:40:47

Like I said if you need a disclaimer, ask me and I'll send it ASAP, but probably tomorrow at earliest.

By: Jason Parker (jparker) 2007-05-24 09:29:14

Yes, we need a disclaimer on file for this.

By: xmarksthespot (xmarksthespot) 2007-05-24 14:01:05

Disclaimer sent (Faxed)! You should have it soon enough.



By: xmarksthespot (xmarksthespot) 2007-06-04 13:51:47

I guess you now have the disclaimer since 9787 made it already.

By: Mark Michelson (mmichelson) 2007-06-05 11:41:05

I've revised the patch a bit to save some stack space and be a bit more efficient, although the general method is still the same as the original patch that xmarksthespot uploaded. Pending review of the patch, the issue should be closed soon.

By: Mark Michelson (mmichelson) 2007-06-05 11:45:05

I uploaded file 9786revision-1.4.patch. I will just merge these changes into trunk upon their approval since the changes to trunk were the same as the changes to branch.

By: Mark Michelson (mmichelson) 2007-06-05 15:16:22

Closing this issue. Thanks very much for the patch, xmarksthespot!

By: Mark Michelson (mmichelson) 2007-06-05 15:18:25

Fixed in 1.4 in SVN revision 67424.
Fixed in trunk in SVN revision 67486