Summary: | ASTERISK-24530: [patch] app_record stripping 1/4 second from recordings | ||
Reporter: | Ben Smithurst (bensmithurst) | Labels: | |
Date Opened: | 2014-11-17 10:12:40.000-0600 | Date Closed: | 2014-12-01 07:42:15.000-0600 |
Priority: | Minor | Regression? | |
Status: | Closed/Complete | Components: | Applications/app_record |
Versions: | 11.8.1 | Frequency of Occurrence | |
Related Issues: | |||
Environment: | Attachments: | ( 0) app_record_v2.diff ( 1) app_record.diff | |
Description: | For some reason app_record strips 1/4 of a second from the end of recorded files. This behaviour is not documented and there isn't even a comment in the code to explain why, so I wonder if it's a leftover of some older workaround for a problem?
This causes a problem for us as we have some real-time monitoring of our platforms which plays and records messages and we need to have reliably identical results. I have attached a patch to strip this behaviour, could this be considered? | ||
Comments: | By: Ben Smithurst (bensmithurst) 2014-11-18 03:25:24.990-0600 I had a thought on this, I wonder if the 1/4 second strip is designed to strip any partial DTMF tone used to end the recording? In our case we're ending the call by hanging up (using Record's {{k}} option) - so perhaps the patch should instead only strip if the recording was ended by DTMF. It looks like this behaviour wasn't changed when the {{k}} option was introduced - http://svnview.digium.com/svn/asterisk/trunk/apps/app_record.c?r1=165954&r2=175549&pathrev=175549 - but perhaps it should be. Would such a patch be preferable? By: Matt Jordan (mjordan) 2014-11-18 07:53:29.965-0600 You might be right - I was wondering why the 1/4 second stripping was being done as well when I first read your issue. Yes, such a patch would be preferable, if it resolves your issue but leaves the behaviour alone when the {{k}} option isn't used. By: Ben Smithurst (bensmithurst) 2014-11-18 08:42:35.541-0600 For reference the commit message doesn't help the riddle of why this is being done - but DTMF is about the only thing I can think of. {code} ------------------------------------------------------------------------ r848 | markster | 2003-04-14 20:03:52 +0100 (Mon, 14 Apr 2003) | 2 lines When recording, strip off last 1/4 second from recordings ------------------------------------------------------------------------ {code} I'm working on an improved patch now. By: Ben Smithurst (bensmithurst) 2014-11-18 09:17:53.561-0600 Attached [^app_record_v2.diff] should address the problem by only changing the behaviour when keeping a file after hangup using the {{k}} option. For a timeout the behaviour is unchanged because {{!gottimeout}} is still checked and for a DTMF done, the frame {{f}} will be non-NULL, and the strip will still happen. By: Matt Jordan (mjordan) 2014-11-18 09:23:29.641-0600 Heh - {{r848}} would generally considered "lost in the mists of time (and bad commit messages)". I'd recommend putting the patch up for code review on review board - you can find instructions on doing that here: https://wiki.asterisk.org/wiki/display/AST/Code+Review By: Ben Smithurst (bensmithurst) 2014-11-21 02:56:56.038-0600 Will try to get the patch on review board today, have been a bit busy for a few days By: Ben Smithurst (bensmithurst) 2014-11-21 03:45:33.032-0600 https://reviewboard.asterisk.org/r/4201/ |