[asterisk-commits] dhubbard: trunk r257642 - /trunk/channels/chan_dahdi.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Apr 16 14:25:36 CDT 2010


Author: dhubbard
Date: Fri Apr 16 14:25:30 2010
New Revision: 257642

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=257642
Log:
Enable PRI SERVICE message support in chan_dahdi for the 'national' switchtype

Revision 1072 of libpri added SERVICE message support for the 'national' 
switchtype. The attached patch enables the use of 'pri service' CLI commands 
on dahdi channels that are configured for the 'national' switchtype.

(closes issue #17142)
Reported by: dhubbard
Patches:
      dw-ni2.patch uploaded by dhubbard (license 733)
Tested by: elguero, dhubbard

Review: https://reviewboard.asterisk.org/r/612/

Modified:
    trunk/channels/chan_dahdi.c

Modified: trunk/channels/chan_dahdi.c
URL: http://svnview.digium.com/svn/asterisk/trunk/channels/chan_dahdi.c?view=diff&rev=257642&r1=257641&r2=257642
==============================================================================
--- trunk/channels/chan_dahdi.c (original)
+++ trunk/channels/chan_dahdi.c Fri Apr 16 14:25:30 2010
@@ -14051,7 +14051,7 @@
 				} else {
 					ast_cli(fd,
 						"\n\tThis operation has not been enabled in chan_dahdi.conf, set 'service_message_support=yes' to use this operation.\n"
-						"\tNote only 4ESS and 5ESS switch types are supported.\n\n");
+						"\tNote only 4ESS, 5ESS, and NI2 switch types are supported.\n\n");
 				}
 				return CLI_SUCCESS;
 			}
@@ -14068,7 +14068,7 @@
 				ast_mutex_unlock(&tmp->pri->lock);
 				ast_cli(fd,
 					"\n\tThis operation has not been enabled in chan_dahdi.conf, set 'service_message_support=yes' to use this operation.\n"
-					"\tNote only 4ESS and 5ESS switch types are supported.\n\n");
+					"\tNote only 4ESS, 5ESS, and NI2 switch types are supported.\n\n");
 				return CLI_SUCCESS;
 			}
 			snprintf(db_chan_name, sizeof(db_chan_name), "%s/%d:%d", dahdi_db, tmp->span, channel);
@@ -17044,10 +17044,13 @@
 #if defined(HAVE_PRI_SERVICE_MESSAGES)
 			} else if (!strcasecmp(v->name, "service_message_support")) {
 				/* assuming switchtype for this channel group has been configured already */
-				if ((confp->pri.pri.switchtype == PRI_SWITCH_ATT4ESS || confp->pri.pri.switchtype == PRI_SWITCH_LUCENT5E) && ast_true(v->value))
+				if ((confp->pri.pri.switchtype == PRI_SWITCH_ATT4ESS 
+					|| confp->pri.pri.switchtype == PRI_SWITCH_LUCENT5E
+					|| confp->pri.pri.switchtype == PRI_SWITCH_NI2) && ast_true(v->value)) {
 					confp->pri.pri.enable_service_message_support = 1;
-				else
+				} else {
 					confp->pri.pri.enable_service_message_support = 0;
+				}
 #endif	/* defined(HAVE_PRI_SERVICE_MESSAGES) */
 #ifdef HAVE_PRI_INBANDDISCONNECT
 			} else if (!strcasecmp(v->name, "inbanddisconnect")) {




More information about the asterisk-commits mailing list