If we discard a recording lets set a variable to let us know this took place

This commit is contained in:
Brian West 2010-10-14 12:18:40 -05:00
parent 0559cc50da
commit c465c435dc
1 changed files with 1 additions and 0 deletions

View File

@ -906,6 +906,7 @@ static switch_bool_t record_callback(switch_media_bug_t *bug, void *user_data, s
switch_core_file_close(rh->fh);
if (rh->fh->samples_out < rh->fh->samplerate * rh->min_sec) {
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "Discarding short file %s\n", rh->file);
switch_channel_set_variable(channel, "RECORD_DISCARDED", "true");
switch_file_remove(rh->file, switch_core_session_get_pool(session));
}
}