mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-19 19:52:48 +00:00
Merged revisions 59963 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r59963 | file | 2007-04-03 15:40:59 -0400 (Tue, 03 Apr 2007) | 2 lines Don't clash when a person both speaks and uses DTMF. ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@59969 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -590,7 +590,7 @@ static int speech_background(struct ast_channel *chan, void *data)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Do timeout check (shared between audio/dtmf) */
|
/* Do timeout check (shared between audio/dtmf) */
|
||||||
if (!quieted && started == 1) {
|
if ((!quieted || strlen(dtmf)) && started == 1) {
|
||||||
time(¤t);
|
time(¤t);
|
||||||
if ((current-start) >= timeout) {
|
if ((current-start) >= timeout) {
|
||||||
done = 1;
|
done = 1;
|
||||||
@@ -677,11 +677,13 @@ static int speech_background(struct ast_channel *chan, void *data)
|
|||||||
} else {
|
} else {
|
||||||
if (chan->stream != NULL) {
|
if (chan->stream != NULL) {
|
||||||
ast_stopstream(chan);
|
ast_stopstream(chan);
|
||||||
|
}
|
||||||
|
if (!started) {
|
||||||
/* Change timeout to be 5 seconds for DTMF input */
|
/* Change timeout to be 5 seconds for DTMF input */
|
||||||
timeout = (chan->pbx && chan->pbx->dtimeout) ? chan->pbx->dtimeout : 5;
|
timeout = (chan->pbx && chan->pbx->dtimeout) ? chan->pbx->dtimeout : 5;
|
||||||
time(&start);
|
|
||||||
started = 1;
|
started = 1;
|
||||||
}
|
}
|
||||||
|
time(&start);
|
||||||
snprintf(tmp, sizeof(tmp), "%c", f->subclass);
|
snprintf(tmp, sizeof(tmp), "%c", f->subclass);
|
||||||
strncat(dtmf, tmp, sizeof(dtmf));
|
strncat(dtmf, tmp, sizeof(dtmf));
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user