|
|
@ -114,13 +114,13 @@ static int record_exec(struct ast_channel *chan, void *data)
|
|
|
|
ast_log(LOG_WARNING, "No extension specified to filename!\n");
|
|
|
|
ast_log(LOG_WARNING, "No extension specified to filename!\n");
|
|
|
|
return -1;
|
|
|
|
return -1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (silstr) {
|
|
|
|
if (silstr) {
|
|
|
|
if ((sscanf(silstr, "%d", &i) == 1) && (i > -1))
|
|
|
|
if ((sscanf(silstr, "%d", &i) == 1) && (i > -1)) {
|
|
|
|
silence = i;
|
|
|
|
silence = i * 1000;
|
|
|
|
else if (!ast_strlen_zero(silstr))
|
|
|
|
} else if (!ast_strlen_zero(silstr)) {
|
|
|
|
ast_log(LOG_WARNING, "'%s' is not a valid silence duration\n", silstr);
|
|
|
|
ast_log(LOG_WARNING, "'%s' is not a valid silence duration\n", silstr);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (maxstr) {
|
|
|
|
if (maxstr) {
|
|
|
|
if ((sscanf(maxstr, "%d", &i) == 1) && (i > -1))
|
|
|
|
if ((sscanf(maxstr, "%d", &i) == 1) && (i > -1))
|
|
|
@ -185,7 +185,6 @@ static int record_exec(struct ast_channel *chan, void *data)
|
|
|
|
|
|
|
|
|
|
|
|
/* The end of beep code. Now the recording starts */
|
|
|
|
/* The end of beep code. Now the recording starts */
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (silence > 0) {
|
|
|
|
if (silence > 0) {
|
|
|
|
rfmt = chan->readformat;
|
|
|
|
rfmt = chan->readformat;
|
|
|
|
res = ast_set_read_format(chan, AST_FORMAT_SLINEAR);
|
|
|
|
res = ast_set_read_format(chan, AST_FORMAT_SLINEAR);
|
|
|
|