[asterisk-commits] dhubbard: branch group/issue3450 r139214 - in /team/group/issue3450: ./ chann...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Wed Aug 20 17:16:05 CDT 2008
Author: dhubbard
Date: Wed Aug 20 17:16:05 2008
New Revision: 139214
URL: http://svn.digium.com/view/asterisk?view=rev&rev=139214
Log:
configure script checks libpri for SERVICE message support before defining HAVE_PRI_SERVICE_MESSAGES; wrap service message support in HAVE_PRI_SERVICE_MESSAGES definitions
Modified:
team/group/issue3450/channels/chan_dahdi.c
team/group/issue3450/configure
team/group/issue3450/configure.ac
team/group/issue3450/include/asterisk/autoconfig.h.in
Modified: team/group/issue3450/channels/chan_dahdi.c
URL: http://svn.digium.com/view/asterisk/team/group/issue3450/channels/chan_dahdi.c?view=diff&rev=139214&r1=139213&r2=139214
==============================================================================
--- team/group/issue3450/channels/chan_dahdi.c (original)
+++ team/group/issue3450/channels/chan_dahdi.c Wed Aug 20 17:16:05 2008
@@ -167,7 +167,7 @@
static const char config[] = "chan_dahdi.conf";
-#ifdef HAVE_PRI
+#ifdef HAVE_PRI_SERVICE_MESSAGES
/*! \brief Persistent Service State */
#define SRVST_DBKEY "service-state"
#define SRVST_TYPE_OOS "O"
@@ -8798,7 +8798,7 @@
tmp->locallyblocked = tmp->remotelyblocked = 0;
if ((chan_sig == SIG_PRI) || (chan_sig == SIG_BRI) || (chan_sig == SIG_BRI_PTMP) || (chan_sig == SIG_SS7)) {
tmp->inservice = 0;
-#ifdef HAVE_PRI
+#ifdef HAVE_PRI_SERVICE_MESSAGES
if (chan_sig == SIG_PRI) {
char db_chan_name[20];
char db_answer[5];
@@ -8898,6 +8898,7 @@
#ifdef HAVE_PRI
/* Trust PRI */
if (p->pri) {
+#ifdef HAVE_PRI_SERVICE_MESSAGES
char db_chan_name[20];
char db_answer[5];
char state;
@@ -8910,6 +8911,9 @@
if ((p->resetting || p->call) || (why)) {
if (why)
*reason = AST_CAUSE_REQUESTED_CHAN_UNAVAIL;
+#else
+ if (p->resetting || p->call) {
+#endif
return 0;
} else
return 1;
@@ -10715,6 +10719,7 @@
ast_log(LOG_WARNING, "Restart requested on odd/unavailable channel number %d/%d on span %d\n",
PRI_SPAN(e->restart.channel), PRI_CHANNEL(e->restart.channel), pri->span);
else {
+#ifdef HAVE_PRI_SERVICE_MESSAGES
char db_chan_name[20];
char db_answer[5];
char state;
@@ -10732,6 +10737,7 @@
}
}
if (!skipit) {
+#endif
ast_verb(3, "B-channel %d/%d restarted on span %d\n",
PRI_SPAN(e->restart.channel), PRI_CHANNEL(e->restart.channel), pri->span);
ast_mutex_lock(&pri->pvts[chanpos]->lock);
@@ -10745,7 +10751,9 @@
else if (pri->pvts[chanpos]->owner)
pri->pvts[chanpos]->owner->_softhangup |= AST_SOFTHANGUP_DEV;
ast_mutex_unlock(&pri->pvts[chanpos]->lock);
+#ifdef HAVE_PRI_SERVICE_MESSAGES
}
+#endif
}
} else {
ast_verb(3, "Restart on requested on entire span %d\n", pri->span);
@@ -10819,6 +10827,7 @@
}
}
break;
+#ifdef HAVE_PRI_SERVICE_MESSAGES
case PRI_EVENT_SERVICE:
chanpos = pri_find_principle(pri, e->service.channel);
if (chanpos < 0) {
@@ -10876,6 +10885,7 @@
PRI_SPAN(e->service_ack.channel), PRI_CHANNEL(e->service_ack.channel), pri->span, e->service_ack.changestatus);
}
break;
+#endif
case PRI_EVENT_RING:
crv = NULL;
if (e->ring.channel == -1)
@@ -11658,9 +11668,11 @@
break;
default:
pri->dchans[i] = pri_new(pri->fds[i], pri->nodetype, pri->switchtype);
+#ifdef HAVE_PRI_SERVICE_MESSAGES
if (!pri->disable_service_message_support) {
pri_set_service_message_support(pri->dchans[i], 1);
}
+#endif
}
/* Force overlap dial if we're doing GR-303! */
if (pri->switchtype == PRI_SWITCH_GR303_TMC)
@@ -11823,6 +11835,7 @@
return CLI_SUCCESS;
}
+#ifdef HAVE_PRI_SERVICE_MESSAGES
static char *handle_pri_service_generic(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a, int changestatus)
{
int why;
@@ -11984,6 +11997,7 @@
}
return handle_pri_service_generic(e, cmd, a, 2);
}
+#endif
static char *handle_pri_no_debug(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a)
{
@@ -12216,9 +12230,11 @@
AST_CLI_DEFINE(handle_pri_debug, "Enables PRI debugging on a span"),
AST_CLI_DEFINE(handle_pri_no_debug, "Disables PRI debugging on a span"),
AST_CLI_DEFINE(handle_pri_really_debug, "Enables REALLY INTENSE PRI debugging"),
+#ifdef HAVE_PRI_SERVICE_MESSAGES
AST_CLI_DEFINE(handle_pri_service_clear_states, "debug for clearing astdb"),
AST_CLI_DEFINE(handle_pri_service_enable_channel, "Return a channel to service"),
AST_CLI_DEFINE(handle_pri_service_disable_channel, "Remove a channel from service"),
+#endif
AST_CLI_DEFINE(handle_pri_show_spans, "Displays PRI Information"),
AST_CLI_DEFINE(handle_pri_show_span, "Displays PRI Information"),
AST_CLI_DEFINE(handle_pri_show_debug, "Displays current PRI debug settings"),
Modified: team/group/issue3450/configure.ac
URL: http://svn.digium.com/view/asterisk/team/group/issue3450/configure.ac?view=diff&rev=139214&r1=139213&r2=139214
==============================================================================
--- team/group/issue3450/configure.ac (original)
+++ team/group/issue3450/configure.ac Wed Aug 20 17:16:05 2008
@@ -1321,6 +1321,8 @@
AST_EXT_LIB_CHECK([PRI_INBANDDISCONNECT], [pri], [pri_set_inbanddisconnect], [libpri.h])
+AST_EXT_LIB_CHECK([PRI_SERVICE_MESSAGES], [pri], [pri_maintenance_service], [libpri.h])
+
AST_EXT_LIB_CHECK([RESAMPLE], [resample], [resample_open], [libresample.h], [-lm])
AST_C_COMPILE_CHECK([SPANDSP], [
Modified: team/group/issue3450/include/asterisk/autoconfig.h.in
URL: http://svn.digium.com/view/asterisk/team/group/issue3450/include/asterisk/autoconfig.h.in?view=diff&rev=139214&r1=139213&r2=139214
==============================================================================
--- team/group/issue3450/include/asterisk/autoconfig.h.in (original)
+++ team/group/issue3450/include/asterisk/autoconfig.h.in Wed Aug 20 17:16:05 2008
@@ -613,6 +613,12 @@
/* Define to indicate the ${PRI_INBANDDISCONNECT_DESCRIP} library version */
#undef HAVE_PRI_INBANDDISCONNECT_VERSION
+
+/* Define this to indicate the ${PRI_SERVICE_MESSAGES_DESCRIP} library */
+#undef HAVE_PRI_SERVICE_MESSAGES
+
+/* Define to indicate the ${PRI_SERVICE_MESSAGES_DESCRIP} library version */
+#undef HAVE_PRI_SERVICE_MESSAGES_VERSION
/* Define to indicate the ${PRI_DESCRIP} library version */
#undef HAVE_PRI_VERSION
More information about the asterisk-commits
mailing list