[asterisk-commits] rmudgett: branch rmudgett/issue17104 r262512 - in /team/rmudgett/issue17104: ...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Tue May 11 15:59:33 CDT 2010
Author: rmudgett
Date: Tue May 11 15:59:30 2010
New Revision: 262512
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=262512
Log:
* Continue the hangup sequence even though we no longer know about a call.
* Use pri_hangup_fix_enable() to follow Q.931 Section 5.3.2 call hangup
better if libpri has it.
Modified:
team/rmudgett/issue17104/channels/sig_pri.c
team/rmudgett/issue17104/channels/sig_pri.h
team/rmudgett/issue17104/configure.ac
Modified: team/rmudgett/issue17104/channels/sig_pri.c
URL: http://svnview.digium.com/svn/asterisk/team/rmudgett/issue17104/channels/sig_pri.c?view=diff&rev=262512&r1=262511&r2=262512
==============================================================================
--- team/rmudgett/issue17104/channels/sig_pri.c (original)
+++ team/rmudgett/issue17104/channels/sig_pri.c Tue May 11 15:59:30 2010
@@ -1148,7 +1148,7 @@
return principle;
}
- ast_log(LOG_WARNING, "Call specified, but not found?\n");
+ ast_verb(3, "Call specified, but not found.\n");
return -1;
}
@@ -3801,6 +3801,11 @@
if (chanpos < 0) {
ast_log(LOG_WARNING, "Hangup requested on unconfigured channel %d/%d span %d\n",
PRI_SPAN(e->hangup.channel), PRI_CHANNEL(e->hangup.channel), pri->span);
+ /*
+ * Continue hanging up the call even though
+ * it is on an unconfigured channel.
+ */
+ pri_hangup(pri->pri, e->hangup.call, e->hangup.cause);
} else {
chanpos = pri_fixup_principle(pri, chanpos, e->hangup.call);
if (chanpos > -1) {
@@ -3845,10 +3850,18 @@
}
break;
}
+ } else {
+ /*
+ * Continue hanging up the call even though
+ * we do not have an owner.
+ */
+ pri_hangup(pri->pri, pri->pvts[chanpos]->call, e->hangup.cause);
+ pri->pvts[chanpos]->call = NULL;
}
ast_verb(3, "Channel %d/%d, span %d got hangup, cause %d\n",
pri->pvts[chanpos]->logicalspan, pri->pvts[chanpos]->prioffset, pri->span, e->hangup.cause);
} else {
+ /* Continue hanging up the call. */
pri_hangup(pri->pri, pri->pvts[chanpos]->call, e->hangup.cause);
pri->pvts[chanpos]->call = NULL;
}
@@ -3878,8 +3891,11 @@
sig_pri_unlock_private(pri->pvts[chanpos]);
} else {
- ast_log(LOG_WARNING, "Hangup on bad channel %d/%d on span %d\n",
- PRI_SPAN(e->hangup.channel), PRI_CHANNEL(e->hangup.channel), pri->span);
+ /*
+ * Continue hanging up the call even though
+ * we do not remember it (if we ever did).
+ */
+ pri_hangup(pri->pri, e->hangup.call, e->hangup.cause);
}
}
break;
@@ -3894,6 +3910,11 @@
if (chanpos < 0) {
ast_log(LOG_WARNING, "Hangup REQ requested on unconfigured channel %d/%d span %d\n",
PRI_SPAN(e->hangup.channel), PRI_CHANNEL(e->hangup.channel), pri->span);
+ /*
+ * Continue hanging up the call even though
+ * it is on an unconfigured channel.
+ */
+ pri_hangup(pri->pri, e->hangup.call, e->hangup.cause);
} else {
chanpos = pri_fixup_principle(pri, chanpos, e->hangup.call);
if (chanpos > -1) {
@@ -3951,6 +3972,10 @@
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");
} else {
+ /*
+ * Continue hanging up the call even though
+ * we do not have an owner.
+ */
pri_hangup(pri->pri, pri->pvts[chanpos]->call, e->hangup.cause);
pri->pvts[chanpos]->call = NULL;
}
@@ -3977,7 +4002,11 @@
sig_pri_unlock_private(pri->pvts[chanpos]);
} else {
- ast_log(LOG_WARNING, "Hangup REQ on bad channel %d/%d on span %d\n", PRI_SPAN(e->hangup.channel), PRI_CHANNEL(e->hangup.channel), pri->span);
+ /*
+ * Continue hanging up the call even though
+ * we do not remember it (if we ever did).
+ */
+ pri_hangup(pri->pri, e->hangup.call, e->hangup.cause);
}
}
break;
@@ -4000,7 +4029,6 @@
if (pri->pvts[chanpos]->owner) {
ast_verb(3, "Channel %d/%d, span %d got hangup ACK\n", PRI_SPAN(e->hangup.channel), PRI_CHANNEL(e->hangup.channel), pri->span);
}
-
#ifdef SUPPORT_USERUSER
if (!ast_strlen_zero(e->hangup.useruserinfo)) {
struct ast_channel *owner;
@@ -4014,7 +4042,6 @@
}
}
#endif
-
sig_pri_unlock_private(pri->pvts[chanpos]);
}
}
@@ -5126,6 +5153,9 @@
#if defined(HAVE_PRI_CALL_REROUTING)
pri_reroute_enable(pri->pri, 1);
#endif /* defined(HAVE_PRI_CALL_REROUTING) */
+#if defined(HAVE_PRI_HANGUP_FIX)
+ pri_hangup_fix_enable(pri->pri, 1);
+#endif /* defined(HAVE_PRI_HANGUP_FIX) */
#if defined(HAVE_PRI_CCSS)
pri_cc_enable(pri->pri, 1);
pri_cc_recall_mode(pri->pri, pri->cc_ptmp_recall_mode);
Modified: team/rmudgett/issue17104/channels/sig_pri.h
URL: http://svnview.digium.com/svn/asterisk/team/rmudgett/issue17104/channels/sig_pri.h?view=diff&rev=262512&r1=262511&r2=262512
==============================================================================
--- team/rmudgett/issue17104/channels/sig_pri.h (original)
+++ team/rmudgett/issue17104/channels/sig_pri.h Tue May 11 15:59:30 2010
@@ -34,6 +34,7 @@
/* BUGBUG the HAVE_PRI_CALL_WAITING line is to be removed when the call_waiting branch is merged to trunk and the configure script is updated. */
#define HAVE_PRI_CALL_WAITING 1
#endif /* defined(PRI_EVENT_CONNECT_ACK) */
+#define HAVE_PRI_HANGUP_FIX 1 /* BUGBUG delete this line when branch merged. */
#if defined(HAVE_PRI_CCSS)
/*! PRI debug message flags when normal PRI debugging is turned on at the command line. */
Modified: team/rmudgett/issue17104/configure.ac
URL: http://svnview.digium.com/svn/asterisk/team/rmudgett/issue17104/configure.ac?view=diff&rev=262512&r1=262511&r2=262512
==============================================================================
--- team/rmudgett/issue17104/configure.ac (original)
+++ team/rmudgett/issue17104/configure.ac Tue May 11 15:59:30 2010
@@ -339,6 +339,7 @@
AST_EXT_LIB_SETUP([PRI], [ISDN PRI], [pri])
AST_EXT_LIB_SETUP_DEPENDENT([PRI_CALL_WAITING], [ISDN PRI call waiting supplementary service], [PRI], [pri])
AST_EXT_LIB_SETUP_DEPENDENT([PRI_CCSS], [ISDN PRI call completion supplementary service], [PRI], [pri])
+AST_EXT_LIB_SETUP_DEPENDENT([PRI_HANGUP_FIX], [ISDN PRI hangup fix], [PRI], [pri])
AST_EXT_LIB_SETUP_DEPENDENT([PRI_SUBADDR], [ISDN PRI subaddressing], [PRI], [pri])
AST_EXT_LIB_SETUP_DEPENDENT([PRI_CALL_HOLD], [ISDN PRI call hold], [PRI], [pri])
AST_EXT_LIB_SETUP_DEPENDENT([PRI_CALL_REROUTING], [ISDN PRI call rerouting and call deflection], [PRI], [pri])
@@ -1558,6 +1559,7 @@
AST_EXT_LIB_CHECK([PRI], [pri], [pri_connected_line_update], [libpri.h])
AST_EXT_LIB_CHECK([PRI_CALL_WAITING], [pri], [pri_connect_ack_enable], [libpri.h])
AST_EXT_LIB_CHECK([PRI_CCSS], [pri], [pri_cc_enable], [libpri.h])
+AST_EXT_LIB_CHECK([PRI_HANGUP_FIX], [pri], [pri_hangup_fix_enable], [libpri.h])
AST_EXT_LIB_CHECK([PRI_SUBADDR], [pri], [pri_sr_set_called_subaddress], [libpri.h])
AST_EXT_LIB_CHECK([PRI_CALL_HOLD], [pri], [pri_hold_enable], [libpri.h])
AST_EXT_LIB_CHECK([PRI_CALL_REROUTING], [pri], [pri_reroute_enable], [libpri.h])
More information about the asterisk-commits
mailing list