From 87e8d0ec468e97536251adb6e5266915cd6715f6 Mon Sep 17 00:00:00 2001 From: Jeff Peeler Date: Fri, 30 Apr 2010 22:22:46 +0000 Subject: [PATCH] Ensure channel state is not incorrectly set in the case of a very early answer. The needringing bit was being read in dahdi_read after answering thereby setting the state to ringing from up. This clears needringing upon answering so that is no longer possible. (closes issue #17067) Reported by: tzafrir Patches: needringing.diff uploaded by tzafrir (license 46) git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@260434 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- channels/chan_dahdi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/channels/chan_dahdi.c b/channels/chan_dahdi.c index 7d5ec489b5..5582ae5ded 100644 --- a/channels/chan_dahdi.c +++ b/channels/chan_dahdi.c @@ -4445,7 +4445,7 @@ static struct ast_frame *dahdi_handle_event(struct ast_channel *ast) p->subs[index].f.frametype = AST_FRAME_CONTROL; p->subs[index].f.subclass = AST_CONTROL_ANSWER; /* Make sure it stops ringing */ - dahdi_set_hook(p->subs[index].dfd, DAHDI_OFFHOOK); + p->subs[SUB_REAL].needringing = 0; ast_log(LOG_DEBUG, "channel %d answered\n", p->channel); if (p->cidspill) { /* Cancel any running CallerID spill */ -- 2.47.3