aboutsummaryrefslogtreecommitdiffstats
path: root/channels/chan_dahdi.c
diff options
context:
space:
mode:
authordhubbard <dhubbard@f38db490-d61c-443f-a65b-d21fe96a405b>2010-04-16 19:25:30 +0000
committerdhubbard <dhubbard@f38db490-d61c-443f-a65b-d21fe96a405b>2010-04-16 19:25:30 +0000
commit87d54fb62d2571081e83e0f426a6d7573d6dd5ac (patch)
treeee5cabe3508c64a5dee9f7a6587605cf4abe155b /channels/chan_dahdi.c
parent72dd98e470dc6ce1e17937e41bc6302a525efe56 (diff)
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/ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@257642 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels/chan_dahdi.c')
-rw-r--r--channels/chan_dahdi.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/channels/chan_dahdi.c b/channels/chan_dahdi.c
index d9ae8a6f5..aae30d3da 100644
--- a/channels/chan_dahdi.c
+++ b/channels/chan_dahdi.c
@@ -14051,7 +14051,7 @@ static char *handle_pri_service_generic(struct ast_cli_entry *e, int cmd, struct
} 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 @@ static char *handle_pri_service_generic(struct ast_cli_entry *e, int cmd, struct
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 @@ static int process_dahdi(struct dahdi_chan_conf *confp, const char *cat, struct
#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")) {