From: Joshua C. Colp Date: Tue, 30 Apr 2024 17:14:39 +0000 (-0300) Subject: Revert "app_record: Add RECORD_TIME output variable." X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F726%2Fhead;p=thirdparty%2Fasterisk.git Revert "app_record: Add RECORD_TIME output variable." This reverts commit 6e8dccdbbf896bcc99046ae249db360698ede0b2. --- diff --git a/apps/app_record.c b/apps/app_record.c index 57a5297b09..93249e45b7 100644 --- a/apps/app_record.c +++ b/apps/app_record.c @@ -114,10 +114,6 @@ The channel was hung up. An unrecoverable error occurred, which resulted in a WARNING to the logs. - - Will be set to the duration of the recording, in milliseconds. - If the recording fails for whatever reason, this will still be set to 0. - @@ -255,9 +251,6 @@ static int record_exec(struct ast_channel *chan, const char *data) int ms; struct timeval start; const char *status_response = "ERROR"; - char durationbuf[20]; - - pbx_builtin_setvar_helper(chan, "RECORD_TIME", "0"); /* Reset, in case already set */ /* The next few lines of code parse out the filename and header from the input string */ if (ast_strlen_zero(data)) { /* no data implies no filename or anything is present */ @@ -521,9 +514,6 @@ static int record_exec(struct ast_channel *chan, const char *data) ast_channel_stop_silence_generator(chan, silgen); out: - snprintf(durationbuf, sizeof(durationbuf), "%ld", ast_tvdiff_ms(ast_tvnow(), start)); - pbx_builtin_setvar_helper(chan, "RECORD_TIME", durationbuf); - if ((silence > 0) && rfmt) { res = ast_set_read_format(chan, rfmt); if (res) {