[svn-commits] rmudgett: branch rmudgett/bch_shift_v1.8 r311607 - /team/rmudgett/bch_shift_v...
SVN commits to the Digium repositories
svn-commits at lists.digium.com
Wed Mar 23 11:39:32 CDT 2011
Author: rmudgett
Date: Wed Mar 23 11:39:27 2011
New Revision: 311607
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=311607
Log:
Add conditional code around force restart code.
Modified:
team/rmudgett/bch_shift_v1.8/channels/sig_pri.c
Modified: team/rmudgett/bch_shift_v1.8/channels/sig_pri.c
URL: http://svnview.digium.com/svn/asterisk/team/rmudgett/bch_shift_v1.8/channels/sig_pri.c?view=diff&rev=311607&r1=311606&r2=311607
==============================================================================
--- team/rmudgett/bch_shift_v1.8/channels/sig_pri.c (original)
+++ team/rmudgett/bch_shift_v1.8/channels/sig_pri.c Wed Mar 23 11:39:27 2011
@@ -55,6 +55,23 @@
/* define this to send PRI user-user information elements */
#undef SUPPORT_USERUSER
+
+/*!
+ * Define to make always pick a channel if allowed. Useful for
+ * testing channel shifting.
+ */
+//#define ALWAYS_PICK_CHANNEL 1
+#define ALWAYS_PICK_CHANNEL 1 //BUGBUG
+
+/*!
+ * Define to force a RESTART on a channel that returns a cause
+ * code of PRI_CAUSE_REQUESTED_CHAN_UNAVAIL(44). If the cause
+ * is because of a stuck channel on the peer and the channel is
+ * always the next channel we pick for an outgoing call then
+ * this can help. However, on busy systems this could cause
+ * stuck channels on this side.
+ */
+#define FORCE_RESTART_UNAVAIL_CHANS 1
#if defined(HAVE_PRI_CCSS)
struct sig_pri_cc_agent_prv {
@@ -4941,12 +4958,6 @@
PRI_CHANNEL(e->ring.channel));
chanpos = -1;
}
-/*!
- * Define to make always pick a channel if allowed. Useful for
- * testing channel shifting.
- */
-//#define ALWAYS_PICK_CHANNEL 1
-#define ALWAYS_PICK_CHANNEL 1 //BUGBUG
#if defined(ALWAYS_PICK_CHANNEL)
if (e->ring.flexible) {
chanpos = -1;
@@ -5715,6 +5726,7 @@
pri_hangup(pri->pri, pri->pvts[chanpos]->call, e->hangup.cause);
pri->pvts[chanpos]->call = NULL;
}
+#if defined(FORCE_RESTART_UNAVAIL_CHANS)
if (e->hangup.cause == PRI_CAUSE_REQUESTED_CHAN_UNAVAIL
&& pri->sig != SIG_BRI_PTMP && !pri->resetting
&& !pri->pvts[chanpos]->resetting) {
@@ -5729,6 +5741,7 @@
pri->pvts[chanpos]->call = NULL;
}
}
+#endif /* defined(FORCE_RESTART_UNAVAIL_CHANS) */
if (e->hangup.aoc_units > -1)
ast_verb(3, "Channel %d/%d, span %d received AOC-E charging %d unit%s\n",
pri->pvts[chanpos]->logicalspan, pri->pvts[chanpos]->prioffset, pri->span, (int)e->hangup.aoc_units, (e->hangup.aoc_units == 1) ? "" : "s");
@@ -5854,6 +5867,7 @@
pri_hangup(pri->pri, pri->pvts[chanpos]->call, e->hangup.cause);
pri->pvts[chanpos]->call = NULL;
}
+#if defined(FORCE_RESTART_UNAVAIL_CHANS)
if (e->hangup.cause == PRI_CAUSE_REQUESTED_CHAN_UNAVAIL
&& pri->sig != SIG_BRI_PTMP && !pri->resetting
&& !pri->pvts[chanpos]->resetting) {
@@ -5868,6 +5882,7 @@
pri->pvts[chanpos]->call = NULL;
}
}
+#endif /* defined(FORCE_RESTART_UNAVAIL_CHANS) */
#ifdef SUPPORT_USERUSER
if (!ast_strlen_zero(e->hangup.useruserinfo)) {
More information about the svn-commits
mailing list