Merged revisions 260434 via svnmerge from

https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r260434 | jpeeler | 2010-04-30 17:22:46 -0500 (Fri, 30 Apr 2010) | 11 lines
  
  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/trunk@260437 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Jeff Peeler
2010-04-30 22:36:49 +00:00
parent 00a1a96ff5
commit 6dd80de93d
3 changed files with 17 additions and 0 deletions

View File

@@ -519,6 +519,13 @@ static int analog_off_hook(struct analog_pvt *p)
return -1;
}
static void analog_set_needringing(struct analog_pvt *p, int value)
{
if (p->calls->set_needringing) {
return p->calls->set_needringing(p->chan_pvt, value);
}
}
static int analog_dsp_set_digitmode(struct analog_pvt *p, enum analog_dsp_digitmode mode)
{
if (p->calls->dsp_set_digitmode) {
@@ -2662,6 +2669,7 @@ static struct ast_frame *__analog_handle_event(struct analog_pvt *p, struct ast_
p->subs[index].f.frametype = AST_FRAME_CONTROL;
p->subs[index].f.subclass.integer = AST_CONTROL_ANSWER;
/* Make sure it stops ringing */
analog_set_needringing(p, 0);
analog_off_hook(p);
ast_debug(1, "channel %d answered\n", p->channel);
analog_cancel_cidspill(p);