Fix "duplicate answer" issue (bug #2342)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3710 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Mark Spencer
2004-09-02 13:48:11 +00:00
parent 07166e63a3
commit d952c7ed71
2 changed files with 4 additions and 1 deletions

View File

@@ -1359,6 +1359,10 @@ struct ast_frame *ast_read(struct ast_channel *chan)
ast_log(LOG_WARNING, "Dropping deferred DTMF digits on %s\n", chan->name);
f = &null_frame;
} else if ((f->frametype == AST_FRAME_CONTROL) && (f->subclass == AST_CONTROL_ANSWER)) {
if (chan->_state == AST_STATE_UP) {
ast_log(LOG_DEBUG, "Dropping duplicate answer!\n");
f = &null_frame;
}
/* Answer the CDR */
ast_setstate(chan, AST_STATE_UP);
ast_cdr_answer(chan->cdr);