ftdm_status_t reconfig_all_ckts_for_relay(void) { #if 1 int x; int ret; x = (g_ftdm_sngss7_data.cfg.procId * 1000) + 1; while (g_ftdm_sngss7_data.cfg.isupCkt[x].id != 0) { if ( g_ftdm_sngss7_data.cfg.isupCkt[x].type == VOICE) { ret = ftmod_ss7_isup_ckt_config(x); if (ret) { SS7_CRITICAL("ISUP CKT %d configuration FAILED (%d)!\n", x, ret); return 1; } else { SS7_INFO("ISUP CKT %d configuration DONE!\n", x); } } /* if ( g_ftdm_sngss7_data.cfg.isupCkt[x].type == VOICE) */ /* set the SNGSS7_CONFIGURED flag */ g_ftdm_sngss7_data.cfg.isupCkt[x].flags |= SNGSS7_CONFIGURED; x++; } /* while (g_ftdm_sngss7_data.cfg.isupCkt[x].id != 0) */ #endif return FTDM_SUCCESS; }
/* FUNCTIONS ******************************************************************/ int ft_to_sngss7_activate_all(void) { int x; x = 1; while (x < (MAX_ISAPS)) { /* check if this link has already been actived */ if ((g_ftdm_sngss7_data.cfg.isap[x].id != 0) && (!(g_ftdm_sngss7_data.cfg.isap[x].flags & SNGSS7_ACTIVE))) { if (ftmod_ss7_enable_isap(x)) { SS7_CRITICAL("ISAP %d Enable: NOT OK\n", x); return 1; } else { SS7_INFO("ISAP %d Enable: OK\n", x); } /* set the SNGSS7_ACTIVE flag */ g_ftdm_sngss7_data.cfg.isap[x].flags |= SNGSS7_ACTIVE; } /* if !SNGSS7_ACTIVE */ x++; } /* while (x < (MAX_ISAPS)) */ if(SNG_SS7_OPR_MODE_M2UA_SG != g_ftdm_operating_mode){ x = 1; while (x < (MAX_NSAPS)) { /* check if this link has already been actived */ if ((g_ftdm_sngss7_data.cfg.nsap[x].id != 0) && (!(g_ftdm_sngss7_data.cfg.nsap[x].flags & SNGSS7_ACTIVE))) { if (ftmod_ss7_enable_nsap(x)) { SS7_CRITICAL("NSAP %d Enable: NOT OK\n", x); return 1; } else { SS7_INFO("NSAP %d Enable: OK\n", x); } /* set the SNGSS7_ACTIVE flag */ g_ftdm_sngss7_data.cfg.nsap[x].flags |= SNGSS7_ACTIVE; } /* if !SNGSS7_ACTIVE */ x++; } /* while (x < (MAX_NSAPS)) */ if (g_ftdm_sngss7_data.cfg.mtpRoute[1].id != 0) { x = 1; while (x < (MAX_MTP_LINKSETS+1)) { /* check if this link has already been actived */ if ((g_ftdm_sngss7_data.cfg.mtpLinkSet[x].id != 0) && (!(g_ftdm_sngss7_data.cfg.mtpLinkSet[x].flags & SNGSS7_ACTIVE))) { if (ftmod_ss7_enable_mtpLinkSet(x)) { SS7_CRITICAL("LinkSet \"%s\" Enable: NOT OK\n", g_ftdm_sngss7_data.cfg.mtpLinkSet[x].name); return 1; } else { SS7_INFO("LinkSet \"%s\" Enable: OK\n", g_ftdm_sngss7_data.cfg.mtpLinkSet[x].name); } /* set the SNGSS7_ACTIVE flag */ g_ftdm_sngss7_data.cfg.mtpLinkSet[x].flags |= SNGSS7_ACTIVE; } /* if !SNGSS7_ACTIVE */ x++; } /* while (x < (MAX_MTP_LINKSETS+1)) */ } } if(SNG_SS7_OPR_MODE_M2UA_SG == g_ftdm_operating_mode){ return ftmod_ss7_m2ua_start(); } return 0; }
/* FUNCTIONS ******************************************************************/ int ft_to_sngss7_activate_all(void) { int x; x = 1; while (g_ftdm_sngss7_data.cfg.isap[x].id != 0) { /* check if this link has already been actived */ if (!(g_ftdm_sngss7_data.cfg.isap[x].flags & SNGSS7_ACTIVE)) { if (ftmod_ss7_enable_isap(x)) { SS7_CRITICAL("ISAP %d Enable: NOT OK\n", x); return 1; } else { SS7_INFO("ISAP %d Enable: OK\n", x); } /* set the SNGSS7_ACTIVE flag */ g_ftdm_sngss7_data.cfg.isap[x].flags |= SNGSS7_ACTIVE; } /* if !SNGSS7_ACTIVE */ x++; } /* while (g_ftdm_sngss7_data.cfg.isap[x].id != 0) */ x = 1; while (g_ftdm_sngss7_data.cfg.nsap[x].id != 0) { /* check if this link has already been actived */ if (!(g_ftdm_sngss7_data.cfg.nsap[x].flags & SNGSS7_ACTIVE)) { if (ftmod_ss7_enable_nsap(x)) { SS7_CRITICAL("NSAP %d Enable: NOT OK\n", x); return 1; } else { SS7_INFO("NSAP %d Enable: OK\n", x); } /* set the SNGSS7_ACTIVE flag */ g_ftdm_sngss7_data.cfg.nsap[x].flags |= SNGSS7_ACTIVE; } /* if !SNGSS7_ACTIVE */ x++; } /* while (g_ftdm_sngss7_data.cfg.nsap[x].id != 0) */ if (g_ftdm_sngss7_data.cfg.mtpRoute[1].id != 0) { x = 1; while (g_ftdm_sngss7_data.cfg.mtpLinkSet[x].id != 0) { /* check if this link has already been actived */ if (!(g_ftdm_sngss7_data.cfg.mtpLinkSet[x].flags & SNGSS7_ACTIVE)) { if (ftmod_ss7_enable_mtpLinkSet(x)) { SS7_CRITICAL("LinkSet \"%s\" Enable: NOT OK\n", g_ftdm_sngss7_data.cfg.mtpLinkSet[x].name); return 1; } else { SS7_INFO("LinkSet \"%s\" Enable: OK\n", g_ftdm_sngss7_data.cfg.mtpLinkSet[x].name); } /* set the SNGSS7_ACTIVE flag */ g_ftdm_sngss7_data.cfg.mtpLinkSet[x].flags |= SNGSS7_ACTIVE; } /* if !SNGSS7_ACTIVE */ x++; } /* while (g_ftdm_sngss7_data.cfg.mtpLinkSet[x].id != 0) */ } return 0; }