Summary:ASTERISK-17522: [patch] 'Silence' is truncated in Record()
Reporter:var (var)Labels:
Date Opened:2011-03-07 16:59:29.000-0600Date Closed:2011-07-26 14:25:55
Versions: Frequency of
Environment:Attachments:( 0) record-silence-truncate.diff
Description:When using Record with the silence detection feature, the stream is written out to the given file. However, if only 'silence' is detected, this file is then truncated to the first second of the recording (8016 bytes for alaw e1).

This causes a problem for IVR applications, even if only silence is detected it can still be of use in data collection as silence may not really be all silence (e.g. someone talking quietly) or this data is utilised for other verification reasons. Silence detection should not have right to remove any recorded data, at the very least it should be a configuration or argument option.
Comments:By: var (var) 2011-03-07 18:20:36.000-0600

Patch has been submitted, this patch gives the option 'u' to Record allowing no truncation when silence is detected. The default is to truncate, as this is the current functionality in

This has been tested and confirmed as working.

Edit: The patch is for apps/app_record.c

By: var (var) 2011-03-07 18:45:37.000-0600

This can be tested via the sample AEL code:

context mycontext {

   80000000 => {
     Set(count=$[${count} +1]);
     //TESTING, silence 10 - max 13//
     Set(rlength=$[${EPOCH} - ${start} - 1]);
     NoOP(RLENGTH IS: ${rlength});
     jump 80000000,testing@mycontext;

By: var (var) 2011-04-05 21:45:16

Over the month this ticket has been active, testing has been done on my end with simultaneous and singular user sessions producing over 240 recordings. Quality checking on the audio, and logging, has been completed and shows no problems when silence is not truncated (new patches flag in use).

Testing Environment

System: Debian 6.0 x86
Kernel: 2.6.32-5-686
Asterisk: through
Dahdi (tools and linux): 2.4.0 and 2.4.1

The patch was made to keep current functionality and to provide what may be considered the more appropriate behaviour of the Record feature, perhaps a more direct replacement can be made in the future.

By: Russell Bryant (russell) 2011-07-26 14:25:47.459-0500

Per the Asterisk maintenance timeline page at http://www.asterisk.org/asterisk-versions maintenance (bug) support for the 1.4 and 1.6.x branches has ended. For continued maintenance support please move to the 1.8 branch which is a long term support (LTS) branch. For more information about branch support, please see https://wiki.asterisk.org/wiki/display/AST/Asterisk+Versions

If this is still an issue, please open a new issue so it can be re-triaged appropriately. Thanks!

By: var (var) 2011-08-17 22:59:30.058-0500

See ticket ASTERISK-18286 for newer diff and application to asterisk