mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-08 19:08:14 +00:00
When rejecting a call, free up the channel (bug #661)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@1922 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -1804,7 +1804,7 @@ static int zt_hangup(struct ast_channel *ast)
|
|||||||
if (!p->alreadyhungup) {
|
if (!p->alreadyhungup) {
|
||||||
res = pri_disconnect(p->pri->pri, p->call, PRI_CAUSE_NORMAL_CLEARING);
|
res = pri_disconnect(p->pri->pri, p->call, PRI_CAUSE_NORMAL_CLEARING);
|
||||||
} else {
|
} else {
|
||||||
pri_release(p->pri->pri, p->call, -1);
|
pri(p->pri->pri, p->call, -1);
|
||||||
p->call = NULL;
|
p->call = NULL;
|
||||||
p->alreadyhungup = 0;
|
p->alreadyhungup = 0;
|
||||||
}
|
}
|
||||||
@@ -6148,7 +6148,7 @@ static void *pri_dchannel(void *vpri)
|
|||||||
#else
|
#else
|
||||||
pri_release(pri->pri, e->ring.call, PRI_CAUSE_SWITCH_CONGESTION);
|
pri_release(pri->pri, e->ring.call, PRI_CAUSE_SWITCH_CONGESTION);
|
||||||
#endif
|
#endif
|
||||||
pri->pvt[chan]->call = 0;
|
pri->pvt[chan]->call = NULL;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if ((!strlen(pri->pvt[chan]->exten) || ast_matchmore_extension(NULL, pri->pvt[chan]->context, pri->pvt[chan]->exten, 1, pri->pvt[chan]->callerid)) && !e->ring.complete)
|
if ((!strlen(pri->pvt[chan]->exten) || ast_matchmore_extension(NULL, pri->pvt[chan]->context, pri->pvt[chan]->exten, 1, pri->pvt[chan]->callerid)) && !e->ring.complete)
|
||||||
@@ -6163,6 +6163,7 @@ static void *pri_dchannel(void *vpri)
|
|||||||
#else
|
#else
|
||||||
pri_release(pri->pri, e->ring.call, PRI_CAUSE_UNALLOCATED);
|
pri_release(pri->pri, e->ring.call, PRI_CAUSE_UNALLOCATED);
|
||||||
#endif
|
#endif
|
||||||
|
pri->pvt[chan]->call = NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else
|
} else
|
||||||
|
|||||||
Reference in New Issue
Block a user