[asterisk-commits] russell: trunk r65591 - in /trunk: ./
channels/chan_zap.c
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Wed May 23 06:10:29 MST 2007
Author: russell
Date: Wed May 23 08:10:28 2007
New Revision: 65591
URL: http://svn.digium.com/view/asterisk?view=rev&rev=65591
Log:
Merged revisions 65589 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
................
r65589 | russell | 2007-05-23 08:07:13 -0500 (Wed, 23 May 2007) | 11 lines
Merged revisions 65588 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2
........
r65588 | russell | 2007-05-23 08:06:17 -0500 (Wed, 23 May 2007) | 3 lines
Revert revision 62417 as someone reported problems with it to Mark. This was
related to issue #9588.
........
................
Modified:
trunk/ (props changed)
trunk/channels/chan_zap.c
Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.
Modified: trunk/channels/chan_zap.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/chan_zap.c?view=diff&rev=65591&r1=65590&r2=65591
==============================================================================
--- trunk/channels/chan_zap.c (original)
+++ trunk/channels/chan_zap.c Wed May 23 08:10:28 2007
@@ -10091,17 +10091,25 @@
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(e->hangup.cause) {
+ case PRI_CAUSE_USER_BUSY:
+ pri->pvts[chanpos]->subs[SUB_REAL].needbusy =1;
+ break;
+ case PRI_CAUSE_CALL_REJECTED:
+ case PRI_CAUSE_NETWORK_OUT_OF_ORDER:
+ case PRI_CAUSE_NORMAL_CIRCUIT_CONGESTION:
+ case PRI_CAUSE_SWITCH_CONGESTION:
+ case PRI_CAUSE_DESTINATION_OUT_OF_ORDER:
+ case PRI_CAUSE_NORMAL_TEMPORARY_FAILURE:
+ pri->pvts[chanpos]->subs[SUB_REAL].needcongestion =1;
+ break;
+ default:
pri->pvts[chanpos]->owner->_softhangup |= AST_SOFTHANGUP_DEV;
- else if (pri->pvts[chanpos]->owner->hangupcause == PRI_CAUSE_USER_BUSY)
- pri->pvts[chanpos]->subs[SUB_REAL].needbusy = 1;
- else
- pri->pvts[chanpos]->subs[SUB_REAL].needcongestion = 1;
+ }
}
if (option_verbose > 2)
- ast_verbose(VERBOSE_PREFIX_3 "Channel %d/%d, span %d got hangup, cause %d\n",
- pri->pvts[chanpos]->logicalspan, pri->pvts[chanpos]->prioffset, pri->span, e->hangup.cause);
+ ast_verbose(VERBOSE_PREFIX_3 "Channel %d/%d, span %d got hangup\n",
+ pri->pvts[chanpos]->logicalspan, pri->pvts[chanpos]->prioffset, pri->span);
} else {
pri_hangup(pri->pri, pri->pvts[chanpos]->call, e->hangup.cause);
pri->pvts[chanpos]->call = NULL;
@@ -10147,16 +10155,23 @@
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(e->hangup.cause) {
+ case PRI_CAUSE_USER_BUSY:
+ pri->pvts[chanpos]->subs[SUB_REAL].needbusy =1;
+ break;
+ case PRI_CAUSE_CALL_REJECTED:
+ case PRI_CAUSE_NETWORK_OUT_OF_ORDER:
+ case PRI_CAUSE_NORMAL_CIRCUIT_CONGESTION:
+ case PRI_CAUSE_SWITCH_CONGESTION:
+ case PRI_CAUSE_DESTINATION_OUT_OF_ORDER:
+ case PRI_CAUSE_NORMAL_TEMPORARY_FAILURE:
+ pri->pvts[chanpos]->subs[SUB_REAL].needcongestion =1;
+ break;
+ default:
pri->pvts[chanpos]->owner->_softhangup |= AST_SOFTHANGUP_DEV;
- else if (pri->pvts[chanpos]->owner->hangupcause == PRI_CAUSE_USER_BUSY)
- pri->pvts[chanpos]->subs[SUB_REAL].needbusy = 1;
- else
- pri->pvts[chanpos]->subs[SUB_REAL].needcongestion = 1;
-
+ }
if (option_verbose > 2)
- ast_verbose(VERBOSE_PREFIX_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);
+ ast_verbose(VERBOSE_PREFIX_3 "Channel %d/%d, span %d got hangup request\n", PRI_SPAN(e->hangup.channel), PRI_CHANNEL(e->hangup.channel), pri->span);
if (e->hangup.aoc_units > -1)
if (option_verbose > 2)
ast_verbose(VERBOSE_PREFIX_3 "Channel %d/%d, span %d received AOC-E charging %d unit%s\n",
More information about the asterisk-commits
mailing list