]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
An outgoing call may not get hung up if a pre-connect incoming ISDN call is disconnected.
authorRichard Mudgett <rmudgett@digium.com>
Fri, 10 Sep 2010 20:33:16 +0000 (20:33 +0000)
committerRichard Mudgett <rmudgett@digium.com>
Fri, 10 Sep 2010 20:33:16 +0000 (20:33 +0000)
If the ISDN link a pre-connect incoming call is using fails or is reset,
the outgoing leg may not hang up or be delayed in hanging up.  (Causes:
PRI_CAUSE_NETWORK_OUT_OF_ORDER, PRI_CAUSE_DESTINATION_OUT_OF_ORDER, and
PRI_CAUSE_NORMAL_TEMPORARY_FAILURE.)

Just hang up the call if the incoming call leg hangs up before connecting
for any reason.  It makes no sense to send a BUSY or CONGESTION control
frame to the outgoing call leg under these circumstances.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@286113 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_dahdi.c

index 667ee0313db1631a4e07e8b660111b48395381e6..247ca048b2764259c5e11eee8cc58fa9da4734ad 100644 (file)
@@ -9911,6 +9911,14 @@ static void *pri_dchannel(void *vpri)
                                                                        pri->pvts[chanpos]->owner->_softhangup |= AST_SOFTHANGUP_DEV;
                                                                        break;
                                                                default:
+                                                                       if (!pri->pvts[chanpos]->outgoing) {
+                                                                               /*
+                                                                                * The incoming call leg hung up before getting
+                                                                                * connected so just hangup the call.
+                                                                                */
+                                                                               pri->pvts[chanpos]->owner->_softhangup |= AST_SOFTHANGUP_DEV;
+                                                                               break;
+                                                                       }
                                                                        switch (e->hangup.cause) {
                                                                                case PRI_CAUSE_USER_BUSY:
                                                                                        pri->pvts[chanpos]->subs[SUB_REAL].needbusy =1;
@@ -9986,6 +9994,14 @@ static void *pri_dchannel(void *vpri)
                                                                pri->pvts[chanpos]->owner->_softhangup |= AST_SOFTHANGUP_DEV;
                                                                break;
                                                        default:
+                                                               if (!pri->pvts[chanpos]->outgoing) {
+                                                                       /*
+                                                                        * The incoming call leg hung up before getting
+                                                                        * connected so just hangup the call.
+                                                                        */
+                                                                       pri->pvts[chanpos]->owner->_softhangup |= AST_SOFTHANGUP_DEV;
+                                                                       break;
+                                                               }
                                                                switch (e->hangup.cause) {
                                                                        case PRI_CAUSE_USER_BUSY:
                                                                                pri->pvts[chanpos]->subs[SUB_REAL].needbusy =1;