[svn-commits] dhubbard: branch group/issue3450 r138937 - /team/group/issue3450/channels/

SVN commits to the Digium repositories svn-commits at lists.digium.com
Tue Aug 19 16:02:57 CDT 2008


Author: dhubbard
Date: Tue Aug 19 16:02:56 2008
New Revision: 138937

URL: http://svn.digium.com/view/asterisk?view=rev&rev=138937
Log:
support of PRI SERVICE messages is supported in chan_dahdi by default, but it can be disabled by setting service_message_support=no

Modified:
    team/group/issue3450/channels/chan_dahdi.c

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=138937&r1=138936&r2=138937
==============================================================================
--- team/group/issue3450/channels/chan_dahdi.c (original)
+++ team/group/issue3450/channels/chan_dahdi.c Tue Aug 19 16:02:56 2008
@@ -438,6 +438,7 @@
 	int span;
 	int resetting;
 	int resetpos;
+	int disable_service_message_support;
 #ifdef HAVE_PRI_INBANDDISCONNECT
 	unsigned int inbanddisconnect:1;				/*!< Should we support inband audio after receiving DISCONNECT? */
 #endif
@@ -8535,6 +8536,7 @@
 						pris[span].inbanddisconnect = conf->pri.inbanddisconnect;
 #endif
 						pris[span].facilityenable = conf->pri.facilityenable;
+						pris[span].disable_service_message_support = conf->pri.disable_service_message_support;
 						ast_copy_string(pris[span].idledial, conf->pri.idledial, sizeof(pris[span].idledial));
 						ast_copy_string(pris[span].idleext, conf->pri.idleext, sizeof(pris[span].idleext));
 						ast_copy_string(pris[span].internationalprefix, conf->pri.internationalprefix, sizeof(pris[span].internationalprefix));
@@ -11656,6 +11658,9 @@
 				break;
 			default:
 				pri->dchans[i] = pri_new(pri->fds[i], pri->nodetype, pri->switchtype);
+				if (!pri->disable_service_message_support) {
+					pri_set_service_message_support(pri->dchans[i], 1);
+				}
 		}
 		/* Force overlap dial if we're doing GR-303! */
 		if (pri->switchtype == PRI_SWITCH_GR303_TMC)
@@ -11878,6 +11883,10 @@
 	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");
+				return CLI_SUCCESS;
+			}
 			why = -1;
 			snprintf(db_chan_name, sizeof(db_chan_name), "%s/%d", dahdi_db, channel);
 			if (!ast_db_get(db_chan_name, SRVST_DBKEY, db_answer, sizeof(db_answer))) {
@@ -14611,6 +14620,8 @@
 			} else if (!strcasecmp(v->name, "facilityenable")) {
 				confp->pri.facilityenable = ast_true(v->value);
 #endif /* PRI_GETSET_TIMERS */
+			} else if (!strcasecmp(v->name, "service_message_support")) {
+				confp->pri.disable_service_message_support = ast_false(v->value);
 #endif /* HAVE_PRI */
 #ifdef HAVE_SS7
 			} else if (!strcasecmp(v->name, "ss7type")) {




More information about the svn-commits mailing list