|
|
@ -56,7 +56,7 @@ static int record_exec(struct ast_channel *chan, void *data)
|
|
|
|
struct localuser *u;
|
|
|
|
struct localuser *u;
|
|
|
|
struct ast_frame *f = NULL;
|
|
|
|
struct ast_frame *f = NULL;
|
|
|
|
|
|
|
|
|
|
|
|
struct ast_dsp *sildet; /* silence detector dsp */
|
|
|
|
struct ast_dsp *sildet = NULL; /* silence detector dsp */
|
|
|
|
int totalsilence = 0;
|
|
|
|
int totalsilence = 0;
|
|
|
|
int dspsilence = 0;
|
|
|
|
int dspsilence = 0;
|
|
|
|
int silence = 0; /* amount of silence to allow */
|
|
|
|
int silence = 0; /* amount of silence to allow */
|
|
|
@ -222,7 +222,8 @@ static int record_exec(struct ast_channel *chan, void *data)
|
|
|
|
res = ast_set_read_format(chan, rfmt);
|
|
|
|
res = ast_set_read_format(chan, rfmt);
|
|
|
|
if (res)
|
|
|
|
if (res)
|
|
|
|
ast_log(LOG_WARNING, "Unable to restore read format on '%s'\n", chan->name);
|
|
|
|
ast_log(LOG_WARNING, "Unable to restore read format on '%s'\n", chan->name);
|
|
|
|
ast_dsp_free(sildet);
|
|
|
|
if (sildet)
|
|
|
|
|
|
|
|
ast_dsp_free(sildet);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return res;
|
|
|
|
return res;
|
|
|
|
}
|
|
|
|
}
|
|
|
|