|
|
@ -740,11 +740,13 @@ static int __ast_play_and_record(struct ast_channel *chan, const char *playfile,
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
ast_log(LOG_WARNING, "Error creating writestream '%s', format '%s'\n", recordfile, sfmt[x]);
|
|
|
|
ast_log(LOG_WARNING, "Error creating writestream '%s', format '%s'\n", recordfile, sfmt[x]);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (!prepend) {
|
|
|
|
if (!prepend) {
|
|
|
|
if (silgen)
|
|
|
|
if (silgen)
|
|
|
|
ast_channel_stop_silence_generator(chan, silgen);
|
|
|
|
ast_channel_stop_silence_generator(chan, silgen);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
*duration = end - start;
|
|
|
|
*duration = end - start;
|
|
|
|
|
|
|
|
|
|
|
|
if (!prepend) {
|
|
|
|
if (!prepend) {
|
|
|
|
for (x = 0; x < fmtcnt; x++) {
|
|
|
|
for (x = 0; x < fmtcnt; x++) {
|
|
|
|
if (!others[x])
|
|
|
|
if (!others[x])
|
|
|
@ -755,9 +757,11 @@ static int __ast_play_and_record(struct ast_channel *chan, const char *playfile,
|
|
|
|
ast_closestream(others[x]);
|
|
|
|
ast_closestream(others[x]);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (prepend && outmsg) {
|
|
|
|
if (prepend && outmsg) {
|
|
|
|
struct ast_filestream *realfiles[MAX_OTHER_FORMATS];
|
|
|
|
struct ast_filestream *realfiles[MAX_OTHER_FORMATS];
|
|
|
|
struct ast_frame *fr;
|
|
|
|
struct ast_frame *fr;
|
|
|
|
|
|
|
|
|
|
|
|
for (x = 0; x < fmtcnt; x++) {
|
|
|
|
for (x = 0; x < fmtcnt; x++) {
|
|
|
|
snprintf(comment, sizeof(comment), "Opening the real file %s.%s\n", recordfile, sfmt[x]);
|
|
|
|
snprintf(comment, sizeof(comment), "Opening the real file %s.%s\n", recordfile, sfmt[x]);
|
|
|
|
realfiles[x] = ast_readfile(recordfile, sfmt[x], comment, O_RDONLY, 0, 0);
|
|
|
|
realfiles[x] = ast_readfile(recordfile, sfmt[x], comment, O_RDONLY, 0, 0);
|
|
|
|