[asterisk-commits] jpeeler: branch dhubbard/pinecowbell r188146 - /team/dhubbard/pinecowbell/cha...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Mon Apr 13 16:10:06 CDT 2009
Author: jpeeler
Date: Mon Apr 13 16:10:02 2009
New Revision: 188146
URL: http://svn.digium.com/svn-view/asterisk?view=rev&rev=188146
Log:
Disable service messages by default and also only allow them to be turned on for 4ess or 5ess switchtypes
Modified:
team/dhubbard/pinecowbell/channels/chan_dahdi.c
Modified: team/dhubbard/pinecowbell/channels/chan_dahdi.c
URL: http://svn.digium.com/svn-view/asterisk/team/dhubbard/pinecowbell/channels/chan_dahdi.c?view=diff&rev=188146&r1=188145&r2=188146
==============================================================================
--- team/dhubbard/pinecowbell/channels/chan_dahdi.c (original)
+++ team/dhubbard/pinecowbell/channels/chan_dahdi.c Mon Apr 13 16:10:02 2009
@@ -566,7 +566,7 @@
/*! \brief Current position during a reset (-1 if not started) */
int resetpos;
#ifdef HAVE_PRI_SERVICE_MESSAGES
- unsigned int disable_service_message_support:1; /*!< Disable SERVICE message support */
+ unsigned int enable_service_message_support:1; /*!< enable SERVICE message support */
#endif
#ifdef HAVE_PRI_INBANDDISCONNECT
unsigned int inbanddisconnect:1; /*!< Should we support inband audio after receiving DISCONNECT? */
@@ -10230,7 +10230,7 @@
pris[span].qsigchannelmapping = conf->pri.qsigchannelmapping;
pris[span].discardremoteholdretrieval = conf->pri.discardremoteholdretrieval;
#ifdef HAVE_PRI_SERVICE_MESSAGES
- pris[span].disable_service_message_support = conf->pri.disable_service_message_support;
+ pris[span].enable_service_message_support = conf->pri.enable_service_message_support;
#endif
#ifdef HAVE_PRI_INBANDDISCONNECT
pris[span].inbanddisconnect = conf->pri.inbanddisconnect;
@@ -13621,7 +13621,7 @@
default:
pri->dchans[i] = pri_new(pri->fds[i], pri->nodetype, pri->switchtype);
#ifdef HAVE_PRI_SERVICE_MESSAGES
- if (!pri->disable_service_message_support) {
+ if (pri->enable_service_message_support) {
pri_set_service_message_support(pri->dchans[i], 1);
}
#endif
@@ -13859,8 +13859,9 @@
tmp = start;
while (tmp) {
if (tmp->pri && tmp->channel == channel) {
- if (tmp->pri->disable_service_message_support) {
- ast_cli(fd, "\n\tThis operation is disabled in chan_dahdi.conf, set 'service_message_support=yes' to use this operation.\n\n");
+ if (!tmp->pri->enable_service_message_support) {
+ ast_cli(fd, "\n\tThis operation has not been enabled in chan_dahdi.conf, set 'service_message_support=yes' to use this operation.\n
+ Note that only 4ess and 5ess switch types are supported\n\n");
return CLI_SUCCESS;
}
why = -1;
@@ -16907,7 +16908,11 @@
confp->pri.discardremoteholdretrieval = ast_true(v->value);
#ifdef HAVE_PRI_SERVICE_MESSAGES
} else if (!strcasecmp(v->name, "service_message_support")) {
- confp->pri.disable_service_message_support = ast_false(v->value);
+ /* assuming switchtype for this channel group has been configured already */
+ if ((confp->pri.switchtype == PRI_SWITCH_ATT4ESS || confp->pri.switchtype == PRI_SWITCH_LUCENT5E) && ast_true(v->value))
+ confp->pri.enable_service_message_support = 1;
+ else
+ confp->pri.enable_service_message_support = 0;
#endif
#ifdef HAVE_PRI_INBANDDISCONNECT
} else if (!strcasecmp(v->name, "inbanddisconnect")) {
More information about the asterisk-commits
mailing list