mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-20 12:20:12 +00:00
fix short message issue (bug #2723)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/v1-0@4104 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
7
app.c
7
app.c
@@ -706,10 +706,12 @@ int ast_play_and_record(struct ast_channel *chan, char *playfile, char *recordfi
|
|||||||
for (x=0;x<fmtcnt;x++) {
|
for (x=0;x<fmtcnt;x++) {
|
||||||
if (!others[x])
|
if (!others[x])
|
||||||
break;
|
break;
|
||||||
|
if (res > 0) {
|
||||||
if (totalsilence)
|
if (totalsilence)
|
||||||
ast_stream_rewind(others[x], totalsilence-200);
|
ast_stream_rewind(others[x], totalsilence-200);
|
||||||
else
|
else
|
||||||
ast_stream_rewind(others[x], 200);
|
ast_stream_rewind(others[x], 200);
|
||||||
|
}
|
||||||
ast_truncstream(others[x]);
|
ast_truncstream(others[x]);
|
||||||
ast_closestream(others[x]);
|
ast_closestream(others[x]);
|
||||||
}
|
}
|
||||||
@@ -718,14 +720,11 @@ int ast_play_and_record(struct ast_channel *chan, char *playfile, char *recordfi
|
|||||||
ast_log(LOG_WARNING, "Unable to restore format %s to channel '%s'\n", ast_getformatname(rfmt), chan->name);
|
ast_log(LOG_WARNING, "Unable to restore format %s to channel '%s'\n", ast_getformatname(rfmt), chan->name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (outmsg) {
|
|
||||||
if (outmsg > 1) {
|
if (outmsg > 1) {
|
||||||
/* Let them know recording is stopped */
|
/* Let them know recording is stopped */
|
||||||
ast_streamfile(chan, "auth-thankyou", chan->language);
|
if(!ast_streamfile(chan, "auth-thankyou", chan->language))
|
||||||
ast_waitstream(chan, "");
|
ast_waitstream(chan, "");
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -4657,7 +4657,7 @@ static int play_record_review(struct ast_channel *chan, char *playfile, char *re
|
|||||||
cmd = ast_play_and_record(chan, playfile, recordfile, maxtime, fmt, duration, silencethreshold, maxsilence);
|
cmd = ast_play_and_record(chan, playfile, recordfile, maxtime, fmt, duration, silencethreshold, maxsilence);
|
||||||
if (cmd == -1)
|
if (cmd == -1)
|
||||||
/* User has hung up, no options to give */
|
/* User has hung up, no options to give */
|
||||||
return res;
|
return cmd;
|
||||||
if (cmd == '0') {
|
if (cmd == '0') {
|
||||||
break;
|
break;
|
||||||
} else if (cmd == '*') {
|
} else if (cmd == '*') {
|
||||||
|
Reference in New Issue
Block a user