mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-02 03:02:04 +00:00
Revert "app_record: Add RECORD_TIME output variable."
This reverts commit 6e8dccdbbf
.
This commit is contained in:
@@ -114,10 +114,6 @@
|
|||||||
<value name="HANGUP">The channel was hung up.</value>
|
<value name="HANGUP">The channel was hung up.</value>
|
||||||
<value name="ERROR">An unrecoverable error occurred, which resulted in a WARNING to the logs.</value>
|
<value name="ERROR">An unrecoverable error occurred, which resulted in a WARNING to the logs.</value>
|
||||||
</variable>
|
</variable>
|
||||||
<variable name="RECORD_TIME">
|
|
||||||
<para>Will be set to the duration of the recording, in milliseconds.</para>
|
|
||||||
<para>If the recording fails for whatever reason, this will still be set to 0.</para>
|
|
||||||
</variable>
|
|
||||||
</variablelist>
|
</variablelist>
|
||||||
</description>
|
</description>
|
||||||
</application>
|
</application>
|
||||||
@@ -255,9 +251,6 @@ static int record_exec(struct ast_channel *chan, const char *data)
|
|||||||
int ms;
|
int ms;
|
||||||
struct timeval start;
|
struct timeval start;
|
||||||
const char *status_response = "ERROR";
|
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 */
|
/* 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 */
|
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);
|
ast_channel_stop_silence_generator(chan, silgen);
|
||||||
|
|
||||||
out:
|
out:
|
||||||
snprintf(durationbuf, sizeof(durationbuf), "%ld", ast_tvdiff_ms(ast_tvnow(), start));
|
|
||||||
pbx_builtin_setvar_helper(chan, "RECORD_TIME", durationbuf);
|
|
||||||
|
|
||||||
if ((silence > 0) && rfmt) {
|
if ((silence > 0) && rfmt) {
|
||||||
res = ast_set_read_format(chan, rfmt);
|
res = ast_set_read_format(chan, rfmt);
|
||||||
if (res) {
|
if (res) {
|
||||||
|
Reference in New Issue
Block a user