Summary: | ASTERISK-13515: [patch] Voicemail message recording file is shorter than duration reported in msg????.txt | ||
Reporter: | Seth Sargent (sasargen) | Labels: | |
Date Opened: | 2009-02-04 13:24:55.000-0600 | Date Closed: | 2009-03-02 17:12:16.000-0600 |
Priority: | Minor | Regression? | No |
Status: | Closed/Complete | Components: | Applications/app_voicemail |
Versions: | Frequency of Occurrence | ||
Related Issues: | |||
Environment: | Attachments: | ( 0) 20090226__bug14406.diff.txt | |
Description: | Voicemail says message duration is maxsilence seconds longer than the actual voicemail recording length. Error is occuring when maxsilence is exceeded. Silence is trimmed from the end of the recording file, but the duration reported for the message is not updated to match the recording saved. ****** ADDITIONAL INFORMATION ****** The recording is handled by __ast_play_and_record in app.c. The "duration" variable is set to match the length of the recording prior to silence removal and recording prepend. If silence removal or recording prepend takes place, "duration" should be updated to indicate the actual length of the recording. | ||
Comments: | By: Leif Madsen (lmadsen) 2009-02-26 17:37:08.000-0600 I've assigned this to Tilghman because it feels like something he might be able to fix reasonably quickly. By: Tilghman Lesher (tilghman) 2009-02-26 19:00:23.000-0600 Patch uploaded. By: Seth Sargent (sasargen) 2009-03-02 16:37:10.000-0600 Patch doesn't return correct duration. (totalsilence - 200) is in milliseconds but duration is in seconds, so they cannot be directly subtracted from eachother. It appears that the following line: *duration -= (totalsilence - 200); results in a negative value that the code then sets to 0. The following change to the patch seems to be a fix: *duration -= ((totalsilence - 200) / 1000); By: Digium Subversion (svnbot) 2009-03-02 17:09:02.000-0600 Repository: asterisk Revision: 179468 U branches/1.4/main/app.c ------------------------------------------------------------------------ r179468 | tilghman | 2009-03-02 17:09:01 -0600 (Mon, 02 Mar 2009) | 10 lines When ending a recording with silence detection, remember to reduce the duration. The end of the recording is correspondingly trimmed, but the duration was not trimmed by the number of seconds trimmed, so the saved duration was necessarily longer than the actual soundfile duration. (closes issue ASTERISK-13515) Reported by: sasargen Patches: 20090226__bug14406.diff.txt uploaded by tilghman (license 14) Tested by: sasargen ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=179468 By: Digium Subversion (svnbot) 2009-03-02 17:10:19.000-0600 Repository: asterisk Revision: 179469 _U trunk/ U trunk/main/app.c ------------------------------------------------------------------------ r179469 | tilghman | 2009-03-02 17:10:18 -0600 (Mon, 02 Mar 2009) | 17 lines Merged revisions 179468 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r179468 | tilghman | 2009-03-02 17:09:01 -0600 (Mon, 02 Mar 2009) | 10 lines When ending a recording with silence detection, remember to reduce the duration. The end of the recording is correspondingly trimmed, but the duration was not trimmed by the number of seconds trimmed, so the saved duration was necessarily longer than the actual soundfile duration. (closes issue ASTERISK-13515) Reported by: sasargen Patches: 20090226__bug14406.diff.txt uploaded by tilghman (license 14) Tested by: sasargen ........ ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=179469 By: Digium Subversion (svnbot) 2009-03-02 17:11:25.000-0600 Repository: asterisk Revision: 179470 _U branches/1.6.0/ U branches/1.6.0/main/app.c ------------------------------------------------------------------------ r179470 | tilghman | 2009-03-02 17:11:25 -0600 (Mon, 02 Mar 2009) | 24 lines Merged revisions 179469 via svnmerge from https://origsvn.digium.com/svn/asterisk/trunk ................ r179469 | tilghman | 2009-03-02 17:10:18 -0600 (Mon, 02 Mar 2009) | 17 lines Merged revisions 179468 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r179468 | tilghman | 2009-03-02 17:09:01 -0600 (Mon, 02 Mar 2009) | 10 lines When ending a recording with silence detection, remember to reduce the duration. The end of the recording is correspondingly trimmed, but the duration was not trimmed by the number of seconds trimmed, so the saved duration was necessarily longer than the actual soundfile duration. (closes issue ASTERISK-13515) Reported by: sasargen Patches: 20090226__bug14406.diff.txt uploaded by tilghman (license 14) Tested by: sasargen ........ ................ ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=179470 By: Digium Subversion (svnbot) 2009-03-02 17:12:15.000-0600 Repository: asterisk Revision: 179471 _U branches/1.6.1/ U branches/1.6.1/main/app.c ------------------------------------------------------------------------ r179471 | tilghman | 2009-03-02 17:12:15 -0600 (Mon, 02 Mar 2009) | 24 lines Merged revisions 179469 via svnmerge from https://origsvn.digium.com/svn/asterisk/trunk ................ r179469 | tilghman | 2009-03-02 17:10:18 -0600 (Mon, 02 Mar 2009) | 17 lines Merged revisions 179468 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r179468 | tilghman | 2009-03-02 17:09:01 -0600 (Mon, 02 Mar 2009) | 10 lines When ending a recording with silence detection, remember to reduce the duration. The end of the recording is correspondingly trimmed, but the duration was not trimmed by the number of seconds trimmed, so the saved duration was necessarily longer than the actual soundfile duration. (closes issue ASTERISK-13515) Reported by: sasargen Patches: 20090226__bug14406.diff.txt uploaded by tilghman (license 14) Tested by: sasargen ........ ................ ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=179471 |