Index: channels/chan_zap.c =================================================================== --- channels/chan_zap.c (revision 114164) +++ channels/chan_zap.c (working copy) @@ -11635,6 +11635,344 @@ #endif /* HAVE_PRI */ +#ifdef HAVE_SS7 +static int linkset_addsigchan(int sigchan) +{ + struct zt_ss7 *link; + int res; + int curfd; + ZT_PARAMS p; + ZT_BUFFERINFO bi; + struct zt_spaninfo si; + + + link = ss7_resolve_linkset(cur_linkset); + if (!link) { + ast_log(LOG_ERROR, "Invalid linkset number. Must be between 1 and %d\n", NUM_SPANS + 1); + return -1; + } + + if (cur_ss7type < 0) { + ast_log(LOG_ERROR, "Unspecified or invalid ss7type\n"); + return -1; + } + + if (!link->ss7) + link->ss7 = ss7_new(cur_ss7type); + + if (!link->ss7) { + ast_log(LOG_ERROR, "Can't create new SS7!\n"); + return -1; + } + + link->type = cur_ss7type; + + if (cur_pointcode < 0) { + ast_log(LOG_ERROR, "Unspecified pointcode!\n"); + return -1; + } else + ss7_set_pc(link->ss7, cur_pointcode); + + if (sigchan < 0) { + ast_log(LOG_ERROR, "Invalid sigchan!\n"); + return -1; + } else { + if (link->numsigchans >= NUM_DCHANS) { + ast_log(LOG_ERROR, "Too many sigchans on linkset %d\n", cur_linkset); + return -1; + } + curfd = link->numsigchans; + + link->fds[curfd] = open("/dev/zap/channel", O_RDWR, 0600); + if ((link->fds[curfd] < 0) || (ioctl(link->fds[curfd],ZT_SPECIFY,&sigchan) == -1)) { + ast_log(LOG_ERROR, "Unable to open SS7 sigchan %d (%s)\n", sigchan, strerror(errno)); + return -1; + } + res = ioctl(link->fds[curfd], ZT_GET_PARAMS, &p); + if (res) { + zt_close(link->fds[curfd]); + link->fds[curfd] = -1; + ast_log(LOG_ERROR, "Unable to get parameters for sigchan %d (%s)\n", sigchan, strerror(errno)); + return -1; + } + if ((p.sigtype != ZT_SIG_HDLCFCS) && (p.sigtype != ZT_SIG_HARDHDLC)) { + zt_close(link->fds[curfd]); + link->fds[curfd] = -1; + ast_log(LOG_ERROR, "sigchan %d is not in HDLC/FCS mode. See /etc/zaptel.conf\n", sigchan); + return -1; + } + + bi.txbufpolicy = ZT_POLICY_IMMEDIATE; + bi.rxbufpolicy = ZT_POLICY_IMMEDIATE; + bi.numbufs = 32; + bi.bufsize = 512; + + if (ioctl(link->fds[curfd], ZT_SET_BUFINFO, &bi)) { + ast_log(LOG_ERROR, "Unable to set appropriate buffering on channel %d\n", sigchan); + zt_close(link->fds[curfd]); + link->fds[curfd] = -1; + return -1; + } + + ss7_add_link(link->ss7, SS7_TRANSPORT_ZAP, link->fds[curfd]); + link->numsigchans++; + + memset(&si, 0, sizeof(si)); + res = ioctl(link->fds[curfd], ZT_SPANSTAT, &si); + if (res) { + zt_close(link->fds[curfd]); + link->fds[curfd] = -1; + ast_log(LOG_ERROR, "Unable to get span state for sigchan %d (%s)\n", sigchan, strerror(errno)); + } + + if (!si.alarms) { + link->linkstate[curfd] = LINKSTATE_DOWN; + ss7_link_noalarm(link->ss7, link->fds[curfd]); + } else { + link->linkstate[curfd] = LINKSTATE_DOWN | LINKSTATE_INALARM; + ss7_link_alarm(link->ss7, link->fds[curfd]); + } + } + + if (cur_adjpointcode < 0) { + ast_log(LOG_ERROR, "Unspecified adjpointcode!\n"); + return -1; + } else { + ss7_set_adjpc(link->ss7, link->fds[curfd], cur_adjpointcode); + } + + if (cur_defaultdpc < 0) { + ast_log(LOG_ERROR, "Unspecified defaultdpc!\n"); + return -1; + } + + if (cur_networkindicator < 0) { + ast_log(LOG_ERROR, "Invalid networkindicator!\n"); + return -1; + } else + ss7_set_network_ind(link->ss7, cur_networkindicator); + + return 0; +} + +static char *handle_ss7_no_debug(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) +{ + int span; + switch (cmd) { + case CLI_INIT: + e->command = "ss7 no debug linkset"; + e->usage = + "Usage: ss7 no debug linkset \n" + " Disables debugging on a given SS7 linkset\n"; + return NULL; + case CLI_GENERATE: + return NULL; + } + if (a->argc < 5) + return CLI_SHOWUSAGE; + span = atoi(a->argv[4]); + if ((span < 1) || (span > NUM_SPANS)) { + ast_cli(a->fd, "Invalid linkset %s. Should be a number from %d to %d\n", a->argv[4], 1, NUM_SPANS); + return CLI_SUCCESS; + } + if (!linksets[span-1].ss7) { + ast_cli(a->fd, "No SS7 running on linkset %d\n", span); + return CLI_SUCCESS; + } + if (linksets[span-1].ss7) + ss7_set_debug(linksets[span-1].ss7, 0); + + ast_cli(a->fd, "Disabled debugging on linkset %d\n", span); + return CLI_SUCCESS; +} + +static char *handle_ss7_debug(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) +{ + int span; + switch (cmd) { + case CLI_INIT: + e->command = "ss7 debug linkset"; + e->usage = + "Usage: ss7 debug linkset \n" + " Enables debugging on a given SS7 linkset\n"; + return NULL; + case CLI_GENERATE: + return NULL; + } + if (a->argc < 4) + return CLI_SHOWUSAGE; + span = atoi(a->argv[3]); + if ((span < 1) || (span > NUM_SPANS)) { + ast_cli(a->fd, "Invalid linkset %s. Should be a number from %d to %d\n", a->argv[3], 1, NUM_SPANS); + return CLI_SUCCESS; + } + if (!linksets[span-1].ss7) { + ast_cli(a->fd, "No SS7 running on linkset %d\n", span); + return CLI_SUCCESS; + } + if (linksets[span-1].ss7) + ss7_set_debug(linksets[span-1].ss7, SS7_DEBUG_MTP2 | SS7_DEBUG_MTP3 | SS7_DEBUG_ISUP); + + ast_cli(a->fd, "Enabled debugging on linkset %d\n", span); + return CLI_SUCCESS; +} + +static char *handle_ss7_block_cic(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) +{ + int linkset, cic; + int blocked = -1, i; + switch (cmd) { + case CLI_INIT: + e->command = "ss7 block cic"; + e->usage = + "Usage: ss7 block cic \n" + " Sends a remote blocking request for the given CIC on the specified linkset\n"; + return NULL; + case CLI_GENERATE: + return NULL; + } + if (a->argc == 5) + linkset = atoi(a->argv[3]); + else + return CLI_SHOWUSAGE; + + if ((linkset < 1) || (linkset > NUM_SPANS)) { + ast_cli(a->fd, "Invalid linkset %s. Should be a number %d to %d\n", a->argv[3], 1, NUM_SPANS); + return CLI_SUCCESS; + } + + if (!linksets[linkset-1].ss7) { + ast_cli(a->fd, "No SS7 running on linkset %d\n", linkset); + return CLI_SUCCESS; + } + + cic = atoi(a->argv[4]); + + if (cic < 1) { + ast_cli(a->fd, "Invalid CIC specified!\n"); + return CLI_SUCCESS; + } + + for (i = 0; i < linksets[linkset-1].numchans; i++) { + if (linksets[linkset-1].pvts[i]->cic == cic) { + blocked = linksets[linkset-1].pvts[i]->locallyblocked; + if (!blocked) { + ast_mutex_lock(&linksets[linkset-1].lock); + isup_blo(linksets[linkset-1].ss7, cic, linksets[linkset-1].pvts[i]->dpc); + ast_mutex_unlock(&linksets[linkset-1].lock); + } + } + } + + if (blocked < 0) { + ast_cli(a->fd, "Invalid CIC specified!\n"); + return CLI_SUCCESS; + } + + if (!blocked) + ast_cli(a->fd, "Sent blocking request for linkset %d on CIC %d\n", linkset, cic); + else + ast_cli(a->fd, "CIC %d already locally blocked\n", cic); + + return CLI_SUCCESS; +} + +static char *handle_ss7_unblock_cic(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) +{ + int linkset, cic; + int i, blocked = -1; + switch (cmd) { + case CLI_INIT: + e->command = "ss7 unblock cic"; + e->usage = + "Usage: ss7 unblock cic \n" + " Sends a remote unblocking request for the given CIC on the specified linkset\n"; + return NULL; + case CLI_GENERATE: + return NULL; + } + + if (a->argc == 5) + linkset = atoi(a->argv[3]); + else + return CLI_SHOWUSAGE; + + if ((linkset < 1) || (linkset > NUM_SPANS)) { + ast_cli(a->fd, "Invalid linkset %s. Should be a number %d to %d\n", a->argv[3], 1, NUM_SPANS); + return CLI_SUCCESS; + } + + if (!linksets[linkset-1].ss7) { + ast_cli(a->fd, "No SS7 running on linkset %d\n", linkset); + return CLI_SUCCESS; + } + + cic = atoi(a->argv[4]); + + if (cic < 1) { + ast_cli(a->fd, "Invalid CIC specified!\n"); + return CLI_SUCCESS; + } + + for (i = 0; i < linksets[linkset-1].numchans; i++) { + if (linksets[linkset-1].pvts[i]->cic == cic) { + blocked = linksets[linkset-1].pvts[i]->locallyblocked; + if (blocked) { + ast_mutex_lock(&linksets[linkset-1].lock); + isup_ubl(linksets[linkset-1].ss7, cic, linksets[linkset-1].pvts[i]->dpc); + ast_mutex_unlock(&linksets[linkset-1].lock); + } + } + } + + if (blocked > 0) + ast_cli(a->fd, "Sent unblocking request for linkset %d on CIC %d\n", linkset, cic); + return CLI_SUCCESS; +} + +static char *handle_ss7_show_linkset(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) +{ + int linkset; + struct zt_ss7 *ss7; + switch (cmd) { + case CLI_INIT: + e->command = "ss7 show linkset"; + e->usage = + "Usage: ss7 show linkset \n" + " Shows the status of an SS7 linkset.\n"; + return NULL; + case CLI_GENERATE: + return NULL; + } + + if (a->argc < 4) + return CLI_SHOWUSAGE; + linkset = atoi(a->argv[3]); + if ((linkset < 1) || (linkset > NUM_SPANS)) { + ast_cli(a->fd, "Invalid linkset %s. Should be a number %d to %d\n", a->argv[3], 1, NUM_SPANS); + return CLI_SUCCESS; + } + if (!linksets[linkset-1].ss7) { + ast_cli(a->fd, "No SS7 running on linkset %d\n", linkset); + return CLI_SUCCESS; + } + if (linksets[linkset-1].ss7) + ss7 = &linksets[linkset-1]; + + ast_cli(a->fd, "SS7 linkset %d status: %s\n", linkset, (ss7->state == LINKSET_STATE_UP) ? "Up" : "Down"); + + return CLI_SUCCESS; +} + +static struct ast_cli_entry zap_ss7_cli[] = { + AST_CLI_DEFINE(handle_ss7_debug, "Enables SS7 debugging on a linkset"), + AST_CLI_DEFINE(handle_ss7_no_debug, "Disables SS7 debugging on a linkset"), + AST_CLI_DEFINE(handle_ss7_block_cic, "Disables SS7 debugging on a linkset"), + AST_CLI_DEFINE(handle_ss7_unblock_cic, "Disables SS7 debugging on a linkset"), + AST_CLI_DEFINE(handle_ss7_show_linkset, "Shows the status of a linkset"), +}; +#endif /* HAVE_SS7 */ + static char *zap_destroy_channel(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) { int channel; @@ -12636,6 +12974,13 @@ ast_cli_unregister_multiple(zap_pri_cli, sizeof(zap_pri_cli) / sizeof(struct ast_cli_entry)); ast_unregister_application(zap_send_keypad_facility_app); #endif +#if defined(HAVE_SS7) + for (i = 0; i < NUM_SPANS; i++) { + if (linksets[i].master != AST_PTHREADT_NULL) + pthread_cancel(linksets[i].master); + } + ast_cli_unregister_multiple(zap_ss7_cli, sizeof(zap_ss7_cli) / sizeof(zap_ss7_cli[0])); +#endif ast_cli_unregister_multiple(zap_cli, sizeof(zap_cli) / sizeof(struct ast_cli_entry)); ast_manager_unregister( "ZapDialOffhook" ); @@ -12705,344 +13050,7 @@ return 0; } -#ifdef HAVE_SS7 -static int linkset_addsigchan(int sigchan) -{ - struct zt_ss7 *link; - int res; - int curfd; - ZT_PARAMS p; - ZT_BUFFERINFO bi; - struct zt_spaninfo si; - - link = ss7_resolve_linkset(cur_linkset); - if (!link) { - ast_log(LOG_ERROR, "Invalid linkset number. Must be between 1 and %d\n", NUM_SPANS + 1); - return -1; - } - - if (cur_ss7type < 0) { - ast_log(LOG_ERROR, "Unspecified or invalid ss7type\n"); - return -1; - } - - if (!link->ss7) - link->ss7 = ss7_new(cur_ss7type); - - if (!link->ss7) { - ast_log(LOG_ERROR, "Can't create new SS7!\n"); - return -1; - } - - link->type = cur_ss7type; - - if (cur_pointcode < 0) { - ast_log(LOG_ERROR, "Unspecified pointcode!\n"); - return -1; - } else - ss7_set_pc(link->ss7, cur_pointcode); - - if (sigchan < 0) { - ast_log(LOG_ERROR, "Invalid sigchan!\n"); - return -1; - } else { - if (link->numsigchans >= NUM_DCHANS) { - ast_log(LOG_ERROR, "Too many sigchans on linkset %d\n", cur_linkset); - return -1; - } - curfd = link->numsigchans; - - link->fds[curfd] = open("/dev/zap/channel", O_RDWR, 0600); - if ((link->fds[curfd] < 0) || (ioctl(link->fds[curfd],ZT_SPECIFY,&sigchan) == -1)) { - ast_log(LOG_ERROR, "Unable to open SS7 sigchan %d (%s)\n", sigchan, strerror(errno)); - return -1; - } - res = ioctl(link->fds[curfd], ZT_GET_PARAMS, &p); - if (res) { - zt_close(link->fds[curfd]); - link->fds[curfd] = -1; - ast_log(LOG_ERROR, "Unable to get parameters for sigchan %d (%s)\n", sigchan, strerror(errno)); - return -1; - } - if ((p.sigtype != ZT_SIG_HDLCFCS) && (p.sigtype != ZT_SIG_HARDHDLC)) { - zt_close(link->fds[curfd]); - link->fds[curfd] = -1; - ast_log(LOG_ERROR, "sigchan %d is not in HDLC/FCS mode. See /etc/zaptel.conf\n", sigchan); - return -1; - } - - bi.txbufpolicy = ZT_POLICY_IMMEDIATE; - bi.rxbufpolicy = ZT_POLICY_IMMEDIATE; - bi.numbufs = 32; - bi.bufsize = 512; - - if (ioctl(link->fds[curfd], ZT_SET_BUFINFO, &bi)) { - ast_log(LOG_ERROR, "Unable to set appropriate buffering on channel %d\n", sigchan); - zt_close(link->fds[curfd]); - link->fds[curfd] = -1; - return -1; - } - - ss7_add_link(link->ss7, SS7_TRANSPORT_ZAP, link->fds[curfd]); - link->numsigchans++; - - memset(&si, 0, sizeof(si)); - res = ioctl(link->fds[curfd], ZT_SPANSTAT, &si); - if (res) { - zt_close(link->fds[curfd]); - link->fds[curfd] = -1; - ast_log(LOG_ERROR, "Unable to get span state for sigchan %d (%s)\n", sigchan, strerror(errno)); - } - - if (!si.alarms) { - link->linkstate[curfd] = LINKSTATE_DOWN; - ss7_link_noalarm(link->ss7, link->fds[curfd]); - } else { - link->linkstate[curfd] = LINKSTATE_DOWN | LINKSTATE_INALARM; - ss7_link_alarm(link->ss7, link->fds[curfd]); - } - } - - if (cur_adjpointcode < 0) { - ast_log(LOG_ERROR, "Unspecified adjpointcode!\n"); - return -1; - } else { - ss7_set_adjpc(link->ss7, link->fds[curfd], cur_adjpointcode); - } - - if (cur_defaultdpc < 0) { - ast_log(LOG_ERROR, "Unspecified defaultdpc!\n"); - return -1; - } - - if (cur_networkindicator < 0) { - ast_log(LOG_ERROR, "Invalid networkindicator!\n"); - return -1; - } else - ss7_set_network_ind(link->ss7, cur_networkindicator); - - return 0; -} - -static char *handle_ss7_no_debug(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) -{ - int span; - switch (cmd) { - case CLI_INIT: - e->command = "ss7 no debug linkset"; - e->usage = - "Usage: ss7 no debug linkset \n" - " Disables debugging on a given SS7 linkset\n"; - return NULL; - case CLI_GENERATE: - return NULL; - } - if (a->argc < 5) - return CLI_SHOWUSAGE; - span = atoi(a->argv[4]); - if ((span < 1) || (span > NUM_SPANS)) { - ast_cli(a->fd, "Invalid linkset %s. Should be a number from %d to %d\n", a->argv[4], 1, NUM_SPANS); - return CLI_SUCCESS; - } - if (!linksets[span-1].ss7) { - ast_cli(a->fd, "No SS7 running on linkset %d\n", span); - return CLI_SUCCESS; - } - if (linksets[span-1].ss7) - ss7_set_debug(linksets[span-1].ss7, 0); - - ast_cli(a->fd, "Disabled debugging on linkset %d\n", span); - return CLI_SUCCESS; -} - -static char *handle_ss7_debug(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) -{ - int span; - switch (cmd) { - case CLI_INIT: - e->command = "ss7 debug linkset"; - e->usage = - "Usage: ss7 debug linkset \n" - " Enables debugging on a given SS7 linkset\n"; - return NULL; - case CLI_GENERATE: - return NULL; - } - if (a->argc < 4) - return CLI_SHOWUSAGE; - span = atoi(a->argv[3]); - if ((span < 1) || (span > NUM_SPANS)) { - ast_cli(a->fd, "Invalid linkset %s. Should be a number from %d to %d\n", a->argv[3], 1, NUM_SPANS); - return CLI_SUCCESS; - } - if (!linksets[span-1].ss7) { - ast_cli(a->fd, "No SS7 running on linkset %d\n", span); - return CLI_SUCCESS; - } - if (linksets[span-1].ss7) - ss7_set_debug(linksets[span-1].ss7, SS7_DEBUG_MTP2 | SS7_DEBUG_MTP3 | SS7_DEBUG_ISUP); - - ast_cli(a->fd, "Enabled debugging on linkset %d\n", span); - return CLI_SUCCESS; -} - -static char *handle_ss7_block_cic(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) -{ - int linkset, cic; - int blocked = -1, i; - switch (cmd) { - case CLI_INIT: - e->command = "ss7 block cic"; - e->usage = - "Usage: ss7 block cic \n" - " Sends a remote blocking request for the given CIC on the specified linkset\n"; - return NULL; - case CLI_GENERATE: - return NULL; - } - if (a->argc == 5) - linkset = atoi(a->argv[3]); - else - return CLI_SHOWUSAGE; - - if ((linkset < 1) || (linkset > NUM_SPANS)) { - ast_cli(a->fd, "Invalid linkset %s. Should be a number %d to %d\n", a->argv[3], 1, NUM_SPANS); - return CLI_SUCCESS; - } - - if (!linksets[linkset-1].ss7) { - ast_cli(a->fd, "No SS7 running on linkset %d\n", linkset); - return CLI_SUCCESS; - } - - cic = atoi(a->argv[4]); - - if (cic < 1) { - ast_cli(a->fd, "Invalid CIC specified!\n"); - return CLI_SUCCESS; - } - - for (i = 0; i < linksets[linkset-1].numchans; i++) { - if (linksets[linkset-1].pvts[i]->cic == cic) { - blocked = linksets[linkset-1].pvts[i]->locallyblocked; - if (!blocked) { - ast_mutex_lock(&linksets[linkset-1].lock); - isup_blo(linksets[linkset-1].ss7, cic, linksets[linkset-1].pvts[i]->dpc); - ast_mutex_unlock(&linksets[linkset-1].lock); - } - } - } - - if (blocked < 0) { - ast_cli(a->fd, "Invalid CIC specified!\n"); - return CLI_SUCCESS; - } - - if (!blocked) - ast_cli(a->fd, "Sent blocking request for linkset %d on CIC %d\n", linkset, cic); - else - ast_cli(a->fd, "CIC %d already locally blocked\n", cic); - - return CLI_SUCCESS; -} - -static char *handle_ss7_unblock_cic(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) -{ - int linkset, cic; - int i, blocked = -1; - switch (cmd) { - case CLI_INIT: - e->command = "ss7 unblock cic"; - e->usage = - "Usage: ss7 unblock cic \n" - " Sends a remote unblocking request for the given CIC on the specified linkset\n"; - return NULL; - case CLI_GENERATE: - return NULL; - } - - if (a->argc == 5) - linkset = atoi(a->argv[3]); - else - return CLI_SHOWUSAGE; - - if ((linkset < 1) || (linkset > NUM_SPANS)) { - ast_cli(a->fd, "Invalid linkset %s. Should be a number %d to %d\n", a->argv[3], 1, NUM_SPANS); - return CLI_SUCCESS; - } - - if (!linksets[linkset-1].ss7) { - ast_cli(a->fd, "No SS7 running on linkset %d\n", linkset); - return CLI_SUCCESS; - } - - cic = atoi(a->argv[4]); - - if (cic < 1) { - ast_cli(a->fd, "Invalid CIC specified!\n"); - return CLI_SUCCESS; - } - - for (i = 0; i < linksets[linkset-1].numchans; i++) { - if (linksets[linkset-1].pvts[i]->cic == cic) { - blocked = linksets[linkset-1].pvts[i]->locallyblocked; - if (blocked) { - ast_mutex_lock(&linksets[linkset-1].lock); - isup_ubl(linksets[linkset-1].ss7, cic, linksets[linkset-1].pvts[i]->dpc); - ast_mutex_unlock(&linksets[linkset-1].lock); - } - } - } - - if (blocked > 0) - ast_cli(a->fd, "Sent unblocking request for linkset %d on CIC %d\n", linkset, cic); - return CLI_SUCCESS; -} - -static char *handle_ss7_show_linkset(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) -{ - int linkset; - struct zt_ss7 *ss7; - switch (cmd) { - case CLI_INIT: - e->command = "ss7 show linkset"; - e->usage = - "Usage: ss7 show linkset \n" - " Shows the status of an SS7 linkset.\n"; - return NULL; - case CLI_GENERATE: - return NULL; - } - - if (a->argc < 4) - return CLI_SHOWUSAGE; - linkset = atoi(a->argv[3]); - if ((linkset < 1) || (linkset > NUM_SPANS)) { - ast_cli(a->fd, "Invalid linkset %s. Should be a number %d to %d\n", a->argv[3], 1, NUM_SPANS); - return CLI_SUCCESS; - } - if (!linksets[linkset-1].ss7) { - ast_cli(a->fd, "No SS7 running on linkset %d\n", linkset); - return CLI_SUCCESS; - } - if (linksets[linkset-1].ss7) - ss7 = &linksets[linkset-1]; - - ast_cli(a->fd, "SS7 linkset %d status: %s\n", linkset, (ss7->state == LINKSET_STATE_UP) ? "Up" : "Down"); - - return CLI_SUCCESS; -} - -static struct ast_cli_entry zap_ss7_cli[] = { - AST_CLI_DEFINE(handle_ss7_debug, "Enables SS7 debugging on a linkset"), - AST_CLI_DEFINE(handle_ss7_no_debug, "Disables SS7 debugging on a linkset"), - AST_CLI_DEFINE(handle_ss7_block_cic, "Disables SS7 debugging on a linkset"), - AST_CLI_DEFINE(handle_ss7_unblock_cic, "Disables SS7 debugging on a linkset"), - AST_CLI_DEFINE(handle_ss7_show_linkset, "Shows the status of a linkset"), -}; -#endif /* HAVE_SS7 */ - static int unload_module(void) { #if defined(HAVE_PRI) || defined(HAVE_SS7)