int ftmod_ss7_unblock_isup_ckt(uint32_t cktId) { SiMngmt cntrl; Pst pst; /* initalize the post structure */ smPstInit(&pst); /* insert the destination Entity */ pst.dstEnt = ENTSI; /* initalize the control structure */ memset(&cntrl, 0x0, sizeof(SiMngmt)); /* initalize the control header */ smHdrInit(&cntrl.hdr); cntrl.hdr.msgType = TCNTRL; /* this is a control request */ cntrl.hdr.entId.ent = ENTSI; cntrl.hdr.entId.inst = S_INST; cntrl.hdr.elmId.elmnt = STICIR; cntrl.t.cntrl.s.siElmnt.elmntId.circuit = cktId; cntrl.t.cntrl.s.siElmnt.elmntParam.cir.flag = LSI_CNTRL_CIR_FORCE; cntrl.t.cntrl.action = AENA; /* unblock via UBL */ cntrl.t.cntrl.subAction = SAELMNT; /* specificed element */ return (sng_cntrl_isup(&pst, &cntrl)); }
int ftmod_ss7_shutdown_mtp2(void) { SdMngmt cntrl; Pst pst; /* initalize the post structure */ smPstInit(&pst); /* insert the destination Entity */ pst.dstEnt = ENTSD; /* initalize the control structure */ memset(&cntrl, 0x0, sizeof(SdMngmt)); /* initalize the control header */ smHdrInit(&cntrl.hdr); cntrl.hdr.msgType = TCNTRL; /* this is a control request */ cntrl.hdr.entId.ent = ENTSD; cntrl.hdr.entId.inst = S_INST; cntrl.hdr.elmId.elmnt = STGEN; cntrl.t.cntrl.action = ASHUTDOWN; /* Activate */ cntrl.t.cntrl.subAction = SAELMNT; /* specificed element */ return (sng_cntrl_mtp2(&pst, &cntrl)); }
int ftmod_ss7_disable_grp_mtp2Link(uint32_t procId) { SdMngmt cntrl; Pst pst; /* initalize the post structure */ smPstInit(&pst); /* insert the destination Entity */ pst.dstEnt = ENTSD; /* initalize the control structure */ memset(&cntrl, 0x0, sizeof(cntrl)); /* initalize the control header */ smHdrInit(&cntrl.hdr); cntrl.hdr.msgType = TCNTRL; /* this is a control request */ cntrl.hdr.entId.ent = ENTSD; cntrl.hdr.entId.inst = S_INST; cntrl.hdr.elmId.elmnt = STGRNSAP; /* group NSAP */ cntrl.t.cntrl.par.dstProcId = procId; /* all SAPS to this ProcId */ cntrl.t.cntrl.action = AUBND_DIS; /* disable and unbind */ cntrl.t.cntrl.subAction = SAGR_DSTPROCID; /* specificed element */ return (sng_cntrl_mtp2(&pst, &cntrl)); }
int ftmod_ss7_disable_relay_channel(uint32_t chanId) { RyMngmt cntrl; Pst pst; /* initalize the post structure */ smPstInit(&pst); /* insert the destination Entity */ pst.dstEnt = ENTRY; /* initalize the control structure */ memset(&cntrl, 0x0, sizeof(RyMngmt)); /* initalize the control header */ smHdrInit(&cntrl.hdr); cntrl.hdr.msgType = TCNTRL; /* this is a control request */ cntrl.hdr.entId.ent = ENTRY; cntrl.hdr.entId.inst = S_INST; cntrl.hdr.elmId.elmnt = STGEN; cntrl.hdr.elmId.elmntInst1 = chanId; cntrl.t.cntrl.action = ADISIMM; /* Deactivate */ cntrl.t.cntrl.subAction = SAELMNT; /* specificed element */ return (sng_cntrl_relay(&pst, &cntrl)); }
int ftmod_ss7_lpr_mtp3link(uint32_t id) { SnMngmt cntrl; Pst pst; /* initalize the post structure */ smPstInit(&pst); /* insert the destination Entity */ pst.dstEnt = ENTSN; /* initalize the control structure */ memset(&cntrl, 0x0, sizeof(SnMngmt)); /* initalize the control header */ smHdrInit(&cntrl.hdr); cntrl.hdr.msgType = TCNTRL; /* this is a control request */ cntrl.hdr.entId.ent = ENTSN; cntrl.hdr.entId.inst = S_INST; cntrl.hdr.elmId.elmnt = STDLSAP; cntrl.hdr.elmId.elmntInst1 = g_ftdm_sngss7_data.cfg.mtp3Link[id].id; cntrl.t.cntrl.action = ACTION_LPR; /* Activate */ cntrl.t.cntrl.subAction = SAELMNT; /* specificed element */ return (sng_cntrl_mtp3(&pst, &cntrl)); }
int ftmod_ss7_uninhibit_mtp3link(uint32_t id) { SnMngmt cntrl; Pst pst; /* initalize the post structure */ smPstInit(&pst); /* insert the destination Entity */ pst.dstEnt = ENTSN; /* initalize the control structure */ memset(&cntrl, 0x0, sizeof(SnMngmt)); /* initalize the control header */ smHdrInit(&cntrl.hdr); cntrl.hdr.msgType = TCNTRL; /* this is a control request */ cntrl.hdr.entId.ent = ENTSN; cntrl.hdr.entId.inst = S_INST; cntrl.hdr.elmId.elmnt = STDLSAP; cntrl.hdr.elmId.elmntInst1 = id; /* the DSLAP to inhibit */ cntrl.t.cntrl.action = AUNINH; /* Inhibit */ cntrl.t.cntrl.subAction = SAELMNT; /* specificed element */ return (sng_cntrl_mtp3(&pst, &cntrl)); }
static int ftmod_ss7_enable_mtpLinkSet(int lnkSetId) { SnMngmt cntrl; Pst pst; /* initalize the post structure */ smPstInit(&pst); /* insert the destination Entity */ pst.dstEnt = ENTSN; /* initalize the control structure */ memset(&cntrl, 0x0, sizeof(SnMngmt)); /* initalize the control header */ smHdrInit(&cntrl.hdr); cntrl.hdr.msgType = TCNTRL; /* this is a control request */ cntrl.hdr.entId.ent = ENTSN; cntrl.hdr.entId.inst = S_INST; cntrl.hdr.elmId.elmnt = STLNKSET; cntrl.hdr.elmId.elmntInst1 = lnkSetId; /* this is the linkset to bind */ cntrl.t.cntrl.action = ABND_ENA; /* bind and activate */ cntrl.t.cntrl.subAction = SAELMNT; /* specificed element */ return (sng_cntrl_mtp3(&pst, &cntrl)); }
static int ftmod_ss7_enable_nsap(int suId) { SiMngmt cntrl; Pst pst; /* initalize the post structure */ smPstInit(&pst); /* insert the destination Entity */ pst.dstEnt = ENTSI; /* initalize the control structure */ memset(&cntrl, 0x0, sizeof(SiMngmt)); /* initalize the control header */ smHdrInit(&cntrl.hdr); cntrl.hdr.msgType = TCNTRL; /* this is a control request */ cntrl.hdr.entId.ent = ENTSI; cntrl.hdr.entId.inst = S_INST; cntrl.hdr.elmId.elmnt = STNSAP; cntrl.t.cntrl.s.siElmnt.elmntId.sapId = suId; cntrl.t.cntrl.s.siElmnt.elmntParam.nsap.nsapType = SAP_MTP; cntrl.t.cntrl.action = ABND_ENA; /* bind and activate */ cntrl.t.cntrl.subAction = SAELMNT; /* specificed element */ return (sng_cntrl_isup(&pst, &cntrl)); }
int ftmod_ss7_enable_grp_mtp3Link(uint32_t procId) { SnMngmt cntrl; Pst pst; /* initalize the post structure */ smPstInit(&pst); /* insert the destination Entity */ pst.dstEnt = ENTSN; /* initalize the control structure */ memset(&cntrl, 0x0, sizeof(SnMngmt)); /* initalize the control header */ smHdrInit(&cntrl.hdr); cntrl.hdr.msgType = TCNTRL; /* this is a control request */ cntrl.hdr.entId.ent = ENTSN; cntrl.hdr.entId.inst = S_INST; cntrl.hdr.elmId.elmnt = STGRDLSAP; /* group DLSAP */ cntrl.t.cntrl.ctlType.groupKey.dstProcId = procId; /* all SAPS to this ProcId */ cntrl.t.cntrl.action = ABND_ENA; /* bind and enable */ cntrl.t.cntrl.subAction = SAGR_DSTPROCID; /* specificed element */ return (sng_cntrl_mtp3(&pst, &cntrl)); }
int ftmod_ss7_enable_grp_mtp3Link(uint32_t procId) { SnMngmt cntrl; Pst pst; /* initalize the post structure */ smPstInit(&pst); /* insert the destination Entity */ pst.dstEnt = ENTSN; /* initalize the control structure */ memset(&cntrl, 0x0, sizeof(SnMngmt)); /* initalize the control header */ smHdrInit(&cntrl.hdr); cntrl.hdr.msgType = TCNTRL; /* this is a control request */ cntrl.hdr.entId.ent = ENTSN; cntrl.hdr.entId.inst = S_INST; cntrl.hdr.elmId.elmnt = STGRDLSAP; /* group DLSAP */ cntrl.t.cntrl.ctlType.groupKey.dstProcId = procId; /* all SAPS to this ProcId */ cntrl.t.cntrl.action = ABND_ENA; /* bind and enable */ cntrl.t.cntrl.subAction = SAGR_DSTPROCID; /* specificed element */ if (g_ftdm_sngss7_data.cfg.procId == procId) { SS7_DEBUG("Executing MTP3 cntrl command local pid =%i\n",procId); return (sng_cntrl_mtp3(&pst, &cntrl)); } else { SS7_WARN("Executing MTP3 cntrl command different local=%i target=%i\n", g_ftdm_sngss7_data.cfg.procId,procId); return (sng_cntrl_mtp3_nowait(&pst, &cntrl)); } }