[asterisk-commits] file: branch 12 r428654 - in /branches/12: ./ apps/app_record.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Dec 1 07:40:33 CST 2014


Author: file
Date: Mon Dec  1 07:40:30 2014
New Revision: 428654

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=428654
Log:
app_record: Fix bug where using the 'k' option and hanging up would trim 1/4 of a second of the recording.

The Record dialplan function trims 1/4 of a second from the end of recordings in case
they are terminated because of DTMF. When hanging up, however, you don't want this to happen.
This change makes it so on hangup this does not occur.

ASTERISK-24530 #close
Reported by: Ben Smithurst
patches:
 app_record_v2.diff submitted by Ben Smithurst (license 6529)

Review: https://reviewboard.asterisk.org/r/4201/
........

Merged revisions 428653 from http://svn.asterisk.org/svn/asterisk/branches/11

Modified:
    branches/12/   (props changed)
    branches/12/apps/app_record.c

Propchange: branches/12/
------------------------------------------------------------------------------
Binary property 'branch-11-merged' - no diff available.

Modified: branches/12/apps/app_record.c
URL: http://svnview.digium.com/svn/asterisk/branches/12/apps/app_record.c?view=diff&rev=428654&r1=428653&r2=428654
==============================================================================
--- branches/12/apps/app_record.c (original)
+++ branches/12/apps/app_record.c Mon Dec  1 07:40:30 2014
@@ -411,8 +411,13 @@
 	if (gotsilence) {
 		ast_stream_rewind(s, silence - 1000);
 		ast_truncstream(s);
-	} else if (!gottimeout) {
-		/* Strip off the last 1/4 second of it */
+	} else if (!gottimeout && f) {
+		/*
+		 * Strip off the last 1/4 second of it, if we didn't end because of a timeout,
+		 * or a hangup.  This must mean we ended because of a DTMF tone and while this
+		 * 1/4 second stripping is very old code the most likely explanation is that it
+		 * relates to stripping a partial DTMF tone.
+		 */
 		ast_stream_rewind(s, 250);
 		ast_truncstream(s);
 	}




More information about the asterisk-commits mailing list