dect
/
asterisk
Archived
13
0
Fork 0

Merged revisions 54375 via svnmerge from

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

................
r54375 | mattf | 2007-02-14 10:56:40 -0600 (Wed, 14 Feb 2007) | 10 lines

Merged revisions 54373 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r54373 | mattf | 2007-02-14 10:25:49 -0600 (Wed, 14 Feb 2007) | 2 lines

When handling glare on a PRI, move the requested channel rather than hang up the old one. Fix for 8957 and 9011.

........

................


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@54404 f38db490-d61c-443f-a65b-d21fe96a405b
This commit is contained in:
mattf 2007-02-14 17:14:42 +00:00
parent 40ad6c100d
commit 21a2f91b3e
1 changed files with 13 additions and 7 deletions

View File

@ -9356,6 +9356,11 @@ static void *pri_dchannel(void *vpri)
pri_dump_event(pri->dchans[which], e);
if (e->e != PRI_EVENT_DCHAN_DOWN)
pri->dchanavail[which] |= DCHAN_UP;
if ((e->e != PRI_EVENT_DCHAN_UP) && (e->e != PRI_EVENT_DCHAN_DOWN) && (pri->pri != pri->dchans[which]))
/* Must be an NFAS group that has the secondary dchan active */
pri->pri = pri->dchans[which];
switch (e->e) {
case PRI_EVENT_DCHAN_UP:
if (option_verbose > 1)
@ -9522,12 +9527,9 @@ static void *pri_dchannel(void *vpri)
PRI_SPAN(e->ring.channel), PRI_CHANNEL(e->ring.channel), pri->span);
break;
} else {
ast_log(LOG_WARNING, "Ring requested on channel %d/%d already in use on span %d. Hanging up owner.\n",
/* This is where we handle initial glare */
ast_log(LOG_DEBUG, "Ring requested on channel %d/%d already in use or previously requested on span %d. Attempting to renegotiating channel.\n",
PRI_SPAN(e->ring.channel), PRI_CHANNEL(e->ring.channel), pri->span);
if (pri->pvts[chanpos]->realcall)
pri_hangup_all(pri->pvts[chanpos]->realcall, pri);
else
pri->pvts[chanpos]->owner->_softhangup |= AST_SOFTHANGUP_DEV;
ast_mutex_unlock(&pri->pvts[chanpos]->lock);
chanpos = -1;
}
@ -9739,8 +9741,12 @@ static void *pri_dchannel(void *vpri)
if (crv)
ast_mutex_unlock(&crv->lock);
ast_mutex_unlock(&pri->pvts[chanpos]->lock);
} else
pri_hangup(pri->pri, e->ring.call, PRI_CAUSE_REQUESTED_CHAN_UNAVAIL);
} else {
if (e->ring.flexible)
pri_hangup(pri->pri, e->ring.call, PRI_CAUSE_NORMAL_CIRCUIT_CONGESTION);
else
pri_hangup(pri->pri, e->ring.call, PRI_CAUSE_REQUESTED_CHAN_UNAVAIL);
}
break;
case PRI_EVENT_RINGING:
chanpos = pri_find_principle(pri, e->ringing.channel);