aboutsummaryrefslogtreecommitdiffstats
path: root/channels
diff options
context:
space:
mode:
authorrmudgett <rmudgett@f38db490-d61c-443f-a65b-d21fe96a405b>2009-10-16 20:53:05 +0000
committerrmudgett <rmudgett@f38db490-d61c-443f-a65b-d21fe96a405b>2009-10-16 20:53:05 +0000
commit57fd1f3115377b08c4ea576222fd8a398d62bd17 (patch)
tree857ac97018943babdbf35a65eae1ab748d5956ed /channels
parentf8c9e702380221ddad02930fd4546ab4c39bab92 (diff)
Merged revisions 224261 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk ................ r224261 | rmudgett | 2009-10-16 15:40:57 -0500 (Fri, 16 Oct 2009) | 25 lines Merged revisions 224260 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r224260 | rmudgett | 2009-10-16 15:25:23 -0500 (Fri, 16 Oct 2009) | 18 lines Never released PRI channels when using Busy() or Congestion() dialplan apps. When the Busy() or Congestion() application is used towards ISDN (an ISDN progress is sent), the responding ISDN Disconnect or Release may contain the ISDN cause user busy or one of the congestion causes. In chan_dahdi.c these causes will only set the needbusy or needcongestion flags and not activate the softhangup procedure. Unfortunately only the latter can interrupt the endless wait loop of Busy()/Congestion(). Result: PRI channels staying in state busy for the rest of asterisk life or until the other end times out and forces the call to clear. (in issue 0014292) Reported by: tomaso Patches: disc_rel_userbusy.patch uploaded by tomaso (license 564) (This patch is unrelated to the issue.) ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.1@224263 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels')
-rw-r--r--channels/chan_dahdi.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/channels/chan_dahdi.c b/channels/chan_dahdi.c
index bbb883056..9811308a5 100644
--- a/channels/chan_dahdi.c
+++ b/channels/chan_dahdi.c
@@ -11735,9 +11735,12 @@ static void *pri_dchannel(void *vpri)
else if (pri->pvts[chanpos]->owner) {
/* Queue a BUSY instead of a hangup if our cause is appropriate */
pri->pvts[chanpos]->owner->hangupcause = e->hangup.cause;
- if (pri->pvts[chanpos]->owner->_state == AST_STATE_UP)
+ switch (pri->pvts[chanpos]->owner->_state) {
+ case AST_STATE_BUSY:
+ case AST_STATE_UP:
pri->pvts[chanpos]->owner->_softhangup |= AST_SOFTHANGUP_DEV;
- else {
+ break;
+ default:
switch (e->hangup.cause) {
case PRI_CAUSE_USER_BUSY:
pri->pvts[chanpos]->subs[SUB_REAL].needbusy =1;
@@ -11753,6 +11756,7 @@ static void *pri_dchannel(void *vpri)
default:
pri->pvts[chanpos]->owner->_softhangup |= AST_SOFTHANGUP_DEV;
}
+ break;
}
}
ast_verb(3, "Channel %d/%d, span %d got hangup, cause %d\n",
@@ -11803,9 +11807,12 @@ static void *pri_dchannel(void *vpri)
pri_hangup_all(pri->pvts[chanpos]->realcall, pri);
else if (pri->pvts[chanpos]->owner) {
pri->pvts[chanpos]->owner->hangupcause = e->hangup.cause;
- if (pri->pvts[chanpos]->owner->_state == AST_STATE_UP)
+ switch (pri->pvts[chanpos]->owner->_state) {
+ case AST_STATE_BUSY:
+ case AST_STATE_UP:
pri->pvts[chanpos]->owner->_softhangup |= AST_SOFTHANGUP_DEV;
- else {
+ break;
+ default:
switch (e->hangup.cause) {
case PRI_CAUSE_USER_BUSY:
pri->pvts[chanpos]->subs[SUB_REAL].needbusy =1;
@@ -11821,6 +11828,7 @@ static void *pri_dchannel(void *vpri)
default:
pri->pvts[chanpos]->owner->_softhangup |= AST_SOFTHANGUP_DEV;
}
+ break;
}
ast_verb(3, "Channel %d/%d, span %d got hangup request, cause %d\n", PRI_SPAN(e->hangup.channel), PRI_CHANNEL(e->hangup.channel), pri->span, e->hangup.cause);
if (e->hangup.aoc_units > -1)