org.mobicents.protocols.ss7.sccp.impl.SccpStackImpl Java Examples
The following examples show how to use
org.mobicents.protocols.ss7.sccp.impl.SccpStackImpl.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: Server.java From gmlc with GNU Affero General Public License v3.0 | 5 votes |
private void initSCCP() throws Exception { this.sccpStack = new SccpStackImpl("MapLoadServerSccpStack"); this.sccpStack.setMtp3UserPart(1, this.serverM3UAMgmt); this.sccpStack.start(); this.sccpStack.removeAllResourses(); this.sccpStack.getSccpResource().addRemoteSpc(0, CLIENT_SPC, 0, 0); this.sccpStack.getSccpResource().addRemoteSsn(0, CLIENT_SPC, CLIENT_SSN, 0, false); this.sccpStack.getRouter().addMtp3ServiceAccessPoint(1, 1, SERVER_SPC, NETWORK_INDICATOR, 0); this.sccpStack.getRouter().addMtp3Destination(1, 1, CLIENT_SPC, CLIENT_SPC, 0, 255, 255); ParameterFactoryImpl fact = new ParameterFactoryImpl(); EncodingScheme ec = new BCDEvenEncodingScheme(); GlobalTitle gt1 = fact.createGlobalTitle("-", 0, org.mobicents.protocols.ss7.indicator.NumberingPlan.ISDN_TELEPHONY, ec, NatureOfAddress.INTERNATIONAL); GlobalTitle gt2 = fact.createGlobalTitle("-", 0, org.mobicents.protocols.ss7.indicator.NumberingPlan.ISDN_TELEPHONY, ec, NatureOfAddress.INTERNATIONAL); SccpAddress localAddress = new SccpAddressImpl(RoutingIndicator.ROUTING_BASED_ON_GLOBAL_TITLE, gt1, SERVER_SPC, SERVER_SSN); this.sccpStack.getRouter().addRoutingAddress(1, localAddress); SccpAddress remoteAddress = new SccpAddressImpl(RoutingIndicator.ROUTING_BASED_ON_GLOBAL_TITLE, gt2, CLIENT_SPC, CLIENT_SSN); this.sccpStack.getRouter().addRoutingAddress(2, remoteAddress); GlobalTitle gt = fact.createGlobalTitle("*", 0, org.mobicents.protocols.ss7.indicator.NumberingPlan.ISDN_TELEPHONY, ec, NatureOfAddress.INTERNATIONAL); SccpAddress pattern = new SccpAddressImpl(RoutingIndicator.ROUTING_BASED_ON_GLOBAL_TITLE, gt, 0, 0); this.sccpStack.getRouter().addRule(1, RuleType.SOLITARY, LoadSharingAlgorithm.Bit0, OriginationType.REMOTE, pattern, "K", 1, -1, null, 0); this.sccpStack.getRouter().addRule(2, RuleType.SOLITARY, LoadSharingAlgorithm.Bit0, OriginationType.LOCAL, pattern, "K", 2, -1, null, 0); this.sccpStack.getRouter().addLongMessageRule(1, 1, 16384, LongMessageRuleType.XUDT_ENABLED); }
Example #2
Source File: Client.java From gmlc with GNU Affero General Public License v3.0 | 5 votes |
private void initSCCP() throws Exception { this.sccpStack = new SccpStackImpl("MapLoadClientSccpStack"); this.sccpStack.setMtp3UserPart(1, this.clientM3UAMgmt); // this.sccpStack.setCongControl_Algo(SccpCongestionControlAlgo.levelDepended); this.sccpStack.start(); this.sccpStack.removeAllResourses(); this.sccpStack.getSccpResource().addRemoteSpc(0, SERVER_SPC, 0, 0); this.sccpStack.getSccpResource().addRemoteSsn(0, SERVER_SPC, SERVER_SSN, 0, false); this.sccpStack.getRouter().addMtp3ServiceAccessPoint(1, 1, CLIENT_SPC, NETWORK_INDICATOR, 0); this.sccpStack.getRouter().addMtp3Destination(1, 1, SERVER_SPC, SERVER_SPC, 0, 255, 255); ParameterFactoryImpl fact = new ParameterFactoryImpl(); EncodingScheme ec = new BCDEvenEncodingScheme(); GlobalTitle gt1 = fact.createGlobalTitle("-", 0, org.mobicents.protocols.ss7.indicator.NumberingPlan.ISDN_TELEPHONY, ec, NatureOfAddress.INTERNATIONAL); GlobalTitle gt2 = fact.createGlobalTitle("-", 0, org.mobicents.protocols.ss7.indicator.NumberingPlan.ISDN_TELEPHONY, ec, NatureOfAddress.INTERNATIONAL); SccpAddress localAddress = new SccpAddressImpl(RoutingIndicator.ROUTING_BASED_ON_GLOBAL_TITLE, gt1, CLIENT_SPC, CLIENT_SSN); this.sccpStack.getRouter().addRoutingAddress(1, localAddress); SccpAddress remoteAddress = new SccpAddressImpl(RoutingIndicator.ROUTING_BASED_ON_GLOBAL_TITLE, gt2, SERVER_SPC, SERVER_SSN); this.sccpStack.getRouter().addRoutingAddress(2, remoteAddress); GlobalTitle gt = fact.createGlobalTitle("*", 0, org.mobicents.protocols.ss7.indicator.NumberingPlan.ISDN_TELEPHONY, ec, NatureOfAddress.INTERNATIONAL); SccpAddress pattern = new SccpAddressImpl(RoutingIndicator.ROUTING_BASED_ON_GLOBAL_TITLE, gt, 0, 0); this.sccpStack.getRouter().addRule(1, RuleType.SOLITARY, LoadSharingAlgorithm.Bit0, OriginationType.REMOTE, pattern, "K", 1, -1, null, 0); this.sccpStack.getRouter().addRule(2, RuleType.SOLITARY, LoadSharingAlgorithm.Bit0, OriginationType.LOCAL, pattern, "K", 2, -1, null, 0); this.sccpStack.getRouter().addLongMessageRule(1, 1, 16384, LongMessageRuleType.XUDT_ENABLED); }
Example #3
Source File: ClientServer.java From gmlc with GNU Affero General Public License v3.0 | 5 votes |
private void initServerSCCP() throws Exception { this.serverSccpStack = new SccpStackImpl("MapLoadServerSccpStack"); this.serverSccpStack.setMtp3UserPart(1, this.serverM3UAMgmt); this.serverSccpStack.start(); this.serverSccpStack.removeAllResourses(); this.serverSccpStack.getSccpResource().addRemoteSpc(0, CLIENT_SPC, 0, 0); this.serverSccpStack.getSccpResource().addRemoteSsn(0, CLIENT_SPC, CLIENT_SSN, 0, false); this.serverSccpStack.getRouter().addMtp3ServiceAccessPoint(1, 1, SERVER_SPC, NETWORK_INDICATOR, 0); this.serverSccpStack.getRouter().addMtp3Destination(1, 1, CLIENT_SPC, CLIENT_SPC, 0, 255, 255); ParameterFactoryImpl fact = new ParameterFactoryImpl(); EncodingScheme ec = new BCDEvenEncodingScheme(); GlobalTitle gt1 = fact.createGlobalTitle("-", 0, org.mobicents.protocols.ss7.indicator.NumberingPlan.ISDN_TELEPHONY, ec, NatureOfAddress.INTERNATIONAL); GlobalTitle gt2 = fact.createGlobalTitle("-", 0, org.mobicents.protocols.ss7.indicator.NumberingPlan.ISDN_TELEPHONY, ec, NatureOfAddress.INTERNATIONAL); SccpAddress localAddress = new SccpAddressImpl(RoutingIndicator.ROUTING_BASED_ON_GLOBAL_TITLE, gt1, SERVER_SPC, SERVER_SSN); this.serverSccpStack.getRouter().addRoutingAddress(1, localAddress); SccpAddress remoteAddress = new SccpAddressImpl(RoutingIndicator.ROUTING_BASED_ON_GLOBAL_TITLE, gt2, CLIENT_SPC, CLIENT_SSN); this.serverSccpStack.getRouter().addRoutingAddress(2, remoteAddress); GlobalTitle gt = fact.createGlobalTitle("*", 0, org.mobicents.protocols.ss7.indicator.NumberingPlan.ISDN_TELEPHONY, ec, NatureOfAddress.INTERNATIONAL); SccpAddress pattern = new SccpAddressImpl(RoutingIndicator.ROUTING_BASED_ON_GLOBAL_TITLE, gt, 0, 0); this.serverSccpStack.getRouter().addRule(1, RuleType.SOLITARY, LoadSharingAlgorithm.Bit0, OriginationType.REMOTE, pattern, "K", 1, -1, null, 0); this.serverSccpStack.getRouter().addRule(2, RuleType.SOLITARY, LoadSharingAlgorithm.Bit0, OriginationType.LOCAL, pattern, "K", 2, -1, null, 0); }
Example #4
Source File: ClientServer.java From gmlc with GNU Affero General Public License v3.0 | 5 votes |
private void initClientSCCP() throws Exception { this.clientSccpStack = new SccpStackImpl("MapLoadClientSccpStack"); this.clientSccpStack.setMtp3UserPart(1, this.clientM3UAMgmt); // this.clientSccpStack.setCongControl_Algo(SccpCongestionControlAlgo.levelDepended); this.clientSccpStack.start(); this.clientSccpStack.removeAllResourses(); this.clientSccpStack.getSccpResource().addRemoteSpc(0, SERVER_SPC, 0, 0); this.clientSccpStack.getSccpResource().addRemoteSsn(0, SERVER_SPC, SERVER_SSN, 0, false); this.clientSccpStack.getRouter().addMtp3ServiceAccessPoint(1, 1, CLIENT_SPC, NETWORK_INDICATOR, 0); this.clientSccpStack.getRouter().addMtp3Destination(1, 1, SERVER_SPC, SERVER_SPC, 0, 255, 255); ParameterFactoryImpl fact = new ParameterFactoryImpl(); EncodingScheme ec = new BCDEvenEncodingScheme(); GlobalTitle gt1 = fact.createGlobalTitle("-", 0, org.mobicents.protocols.ss7.indicator.NumberingPlan.ISDN_TELEPHONY, ec, NatureOfAddress.INTERNATIONAL); GlobalTitle gt2 = fact.createGlobalTitle("-", 0, org.mobicents.protocols.ss7.indicator.NumberingPlan.ISDN_TELEPHONY, ec, NatureOfAddress.INTERNATIONAL); SccpAddress localAddress = new SccpAddressImpl(RoutingIndicator.ROUTING_BASED_ON_GLOBAL_TITLE, gt1, CLIENT_SPC, CLIENT_SSN); this.clientSccpStack.getRouter().addRoutingAddress(1, localAddress); SccpAddress remoteAddress = new SccpAddressImpl(RoutingIndicator.ROUTING_BASED_ON_GLOBAL_TITLE, gt2, SERVER_SPC, SERVER_SSN); this.clientSccpStack.getRouter().addRoutingAddress(2, remoteAddress); GlobalTitle gt = fact.createGlobalTitle("*", 0, org.mobicents.protocols.ss7.indicator.NumberingPlan.ISDN_TELEPHONY, ec, NatureOfAddress.INTERNATIONAL); SccpAddress pattern = new SccpAddressImpl(RoutingIndicator.ROUTING_BASED_ON_GLOBAL_TITLE, gt, 0, 0); this.clientSccpStack.getRouter().addRule(1, RuleType.SOLITARY, LoadSharingAlgorithm.Bit0, OriginationType.REMOTE, pattern, "K", 1, -1, null, 0); this.clientSccpStack.getRouter().addRule(2, RuleType.SOLITARY, LoadSharingAlgorithm.Bit0, OriginationType.LOCAL, pattern, "K", 2, -1, null, 0); this.clientSccpStack.getRouter().addLongMessageRule(1, 1, 16384, LongMessageRuleType.XUDT_ENABLED); }
Example #5
Source File: SS7Honeypot.java From SigFW with GNU Affero General Public License v3.0 | 4 votes |
private void initSCCP() throws Exception { logger.debug("Initializing SCCP Stack ...."); this.sccpStack = new SccpStackImpl("SctpServerSCCP"); this.sccpStack.setMtp3UserPart(1, this.serverM3UAMgmt); this.sccpStack.setPersistDir(persistDir); this.sccpStack.start(); this.sccpStack.removeAllResourses(); this.sccpStack.getSccpResource().addRemoteSpc(0, CLIENT_SPC, 0, 0); this.sccpStack.getSccpResource().addRemoteSsn(0, CLIENT_SPC, 6, 0, false); this.sccpStack.getSccpResource().addRemoteSsn(1, CLIENT_SPC, 7, 0, false); this.sccpStack.getSccpResource().addRemoteSsn(2, CLIENT_SPC, 8, 0, false); this.sccpStack.getSccpResource().addRemoteSsn(3, CLIENT_SPC, 9, 0, false); this.sccpStack.getRouter().addMtp3ServiceAccessPoint(1, 1, SERVER_SPC, NETWORK_INDICATOR, 0); this.sccpStack.getRouter().addMtp3Destination(1, 1, CLIENT_SPC, CLIENT_SPC, 0, 255, 255); this.sccpProvider = this.sccpStack.getSccpProvider(); this.sccpProvider.registerSccpListener(6, this); this.sccpProvider.registerSccpListener(7, this); this.sccpProvider.registerSccpListener(8, this); this.sccpStack.getSccpResource().addRemoteSpc(1, SERVER_SPC, 0, 0); this.sccpStack.getSccpResource().addRemoteSsn(4, SERVER_SPC, 6, 0, false); this.sccpStack.getSccpResource().addRemoteSsn(5, SERVER_SPC, 7, 0, false); this.sccpStack.getSccpResource().addRemoteSsn(6, SERVER_SPC, 8, 0, false); this.sccpStack.getSccpResource().addRemoteSsn(7, SERVER_SPC, 9, 0, false); //this.sccpStack.setPreviewMode(true); // SCCP routing table GlobalTitle gt = this.sccpProvider.getParameterFactory().createGlobalTitle("", 0, org.mobicents.protocols.ss7.indicator.NumberingPlan.ISDN_TELEPHONY, null, NatureOfAddress.INTERNATIONAL); this.sccpStack.getRouter().addRoutingAddress(1, this.sccpProvider.getParameterFactory().createSccpAddress(RoutingIndicator.ROUTING_BASED_ON_GLOBAL_TITLE, gt, CLIENT_SPC, 0)); gt = this.sccpProvider.getParameterFactory().createGlobalTitle("", 0, org.mobicents.protocols.ss7.indicator.NumberingPlan.ISDN_TELEPHONY, null, NatureOfAddress.INTERNATIONAL); this.sccpStack.getRouter().addRoutingAddress(2, this.sccpProvider.getParameterFactory().createSccpAddress(RoutingIndicator.ROUTING_BASED_ON_GLOBAL_TITLE, gt, SERVER_SPC, SSN)); gt = this.sccpProvider.getParameterFactory().createGlobalTitle("*", 0, org.mobicents.protocols.ss7.indicator.NumberingPlan.ISDN_TELEPHONY, null, NatureOfAddress.INTERNATIONAL); SccpAddress pattern = this.sccpProvider.getParameterFactory().createSccpAddress(RoutingIndicator.ROUTING_BASED_ON_GLOBAL_TITLE, gt, 0, 0); String mask = "K"; ((RouterImpl) this.sccpStack.getRouter()).addRule(1, RuleType.SOLITARY, LoadSharingAlgorithm.Bit0, OriginationType.LOCAL, pattern, mask, 1, -1, null, 0, null); gt = this.sccpProvider.getParameterFactory().createGlobalTitle("*", 0, org.mobicents.protocols.ss7.indicator.NumberingPlan.ISDN_TELEPHONY, null, NatureOfAddress.INTERNATIONAL); pattern = this.sccpProvider.getParameterFactory().createSccpAddress(RoutingIndicator.ROUTING_BASED_ON_GLOBAL_TITLE, gt, 0, 0); mask = "K"; ((RouterImpl) this.sccpStack.getRouter()).addRule(2, RuleType.SOLITARY, LoadSharingAlgorithm.Bit0, OriginationType.REMOTE, pattern, mask, 2, -1, null, 0, null); logger.debug("Initialized SCCP Stack ...."); }
Example #6
Source File: SS7Firewall.java From SigFW with GNU Affero General Public License v3.0 | 4 votes |
/** * Initialize SCCP layer. SCCP stack is in preview mode, which means * the stack does not actively response or SCCP routing. All the the * SCCP logic is implemented in onMessage. * */ private void initSCCP() throws Exception { logger.debug("Initializing SCCP Stack ...."); this.sccpStack = new SccpStackImpl("SctpFirewallSCCP"); this.sccpStack.setMtp3UserPart(1, this.clientM3UAMgmt); this.sccpStack.setMtp3UserPart(2, this.serverM3UAMgmt); this.sccpStack.setPersistDir(persistDir); this.sccpStack.start(); this.sccpStack.removeAllResourses(); int j = 0; // Server remote point code for (int i = 0; i < SS7FirewallConfig.m3ua_server_remote_pc.size(); i++) { this.sccpStack.getSccpResource().addRemoteSpc(j, Integer.parseInt(SS7FirewallConfig.m3ua_server_remote_pc.get(i)), 0, 0); this.sccpStack.getRouter().addMtp3ServiceAccessPoint(j, 2, Integer.parseInt(SS7FirewallConfig.m3ua_server_remote_pc.get(i)), NETWORK_INDICATOR, 0); for (int k = 0; k < SS7FirewallConfig.m3ua_client_remote_pc.size(); k++) { //System.out.println("Server i " + i + " j " + j + " k " + k + " " + m3ua_client_remote_pc.get(k)); this.sccpStack.getRouter().addMtp3Destination(j, 1, Integer.parseInt(SS7FirewallConfig.m3ua_client_remote_pc.get(k)), Integer.parseInt(SS7FirewallConfig.m3ua_client_remote_pc.get(k)), 0, 255, 255); } j++; } // Client remote point code for (int i = 0; i < SS7FirewallConfig.m3ua_client_remote_pc.size(); i++) { this.sccpStack.getSccpResource().addRemoteSpc(j, Integer.parseInt(SS7FirewallConfig.m3ua_client_remote_pc.get(i)), 0, 0); this.sccpStack.getRouter().addMtp3ServiceAccessPoint(j, 1, Integer.parseInt(SS7FirewallConfig.m3ua_client_remote_pc.get(i)), NETWORK_INDICATOR, 0); for (int k = 0; k < SS7FirewallConfig.m3ua_server_remote_pc.size(); k++) { //System.out.println("Client i " + i + " j " + j + " k " + k + " " + m3ua_server_remote_pc.get(k)); this.sccpStack.getRouter().addMtp3Destination(j, 2, Integer.parseInt(SS7FirewallConfig.m3ua_server_remote_pc.get(k)), Integer.parseInt(SS7FirewallConfig.m3ua_server_remote_pc.get(k)), 0, 255, 255); } j++; } // TCAP encryption // Specify the SCCP message type used by TCAP encryption this.sccpStack.getRouter().addLongMessageRule(1, 1, 2, LongMessageRuleType.XUDT_ENABLED); this.sccpStack.setPreviewMode(true); this.sccpProvider = this.sccpStack.getSccpProvider(); this.sccpProvider.registerSccpListener(6, this); this.sccpMessageFactory = new MessageFactoryImpl(this.sccpStack); /* // SCCP routing table this.sccpProvider = this.sccpStack.getSccpProvider(); this.sccpProvider.registerSccpListener(6, this); this.sccpProvider.registerSccpListener(7, this); this.sccpProvider.registerSccpListener(8, this); GlobalTitle gt; String mask; // gt = this.sccpProvider.getParameterFactory().createGlobalTitle("", 0, org.mobicents.protocols.ss7.indicator.NumberingPlan.ISDN_MOBILE, null, NatureOfAddress.INTERNATIONAL); gt = this.sccpProvider.getParameterFactory().createGlobalTitle("11111111111", 0, org.mobicents.protocols.ss7.indicator.NumberingPlan.ISDN_TELEPHONY, null, NatureOfAddress.INTERNATIONAL); this.sccpStack.getRouter().addRoutingAddress(1, this.sccpProvider.getParameterFactory().createSccpAddress(RoutingIndicator.ROUTING_BASED_ON_GLOBAL_TITLE, gt, SERVER_SPC, 0)); this.sccpStack.getRouter().addRoutingAddress(2, this.sccpProvider.getParameterFactory().createSccpAddress(RoutingIndicator.ROUTING_BASED_ON_DPC_AND_SSN, gt, CLIENT_SPC, 6)); this.sccpStack.getRouter().addRoutingAddress(3, this.sccpProvider.getParameterFactory().createSccpAddress(RoutingIndicator.ROUTING_BASED_ON_DPC_AND_SSN, gt, CLIENT_SPC, 7)); this.sccpStack.getRouter().addRoutingAddress(4, this.sccpProvider.getParameterFactory().createSccpAddress(RoutingIndicator.ROUTING_BASED_ON_DPC_AND_SSN, gt, CLIENT_SPC, 8)); SccpAddress pattern; gt = this.sccpProvider.getParameterFactory().createGlobalTitle("11111111111", 0, org.mobicents.protocols.ss7.indicator.NumberingPlan.ISDN_TELEPHONY, null, NatureOfAddress.INTERNATIONAL); // mask = "*"; // pattern = this.sccpProvider.getParameterFactory().createSccpAddress(RoutingIndicator.ROUTING_BASED_ON_GLOBAL_TITLE, gt, 0, 8); // ((RouterImpl) this.sccpStack.getRouter()).addRule(1, RuleType.SOLITARY, null, OriginationType.ALL, pattern, mask, 1, -1, null, 0); // mask = "*"; pattern = this.sccpProvider.getParameterFactory().createSccpAddress(RoutingIndicator.ROUTING_BASED_ON_GLOBAL_TITLE, gt, 0, 8); ((RouterImpl) this.sccpStack.getRouter()).addRule(1, RuleType.SOLITARY, null, OriginationType.LOCAL, pattern, mask, 1, -1, null, 0); pattern = this.sccpProvider.getParameterFactory().createSccpAddress(RoutingIndicator.ROUTING_BASED_ON_GLOBAL_TITLE, gt, 0, 6); ((RouterImpl) this.sccpStack.getRouter()).addRule(2, RuleType.SOLITARY, null, OriginationType.LOCAL, pattern, mask, 1, -1, null, 0); pattern = this.sccpProvider.getParameterFactory().createSccpAddress(RoutingIndicator.ROUTING_BASED_ON_GLOBAL_TITLE, gt, 0, 7); ((RouterImpl) this.sccpStack.getRouter()).addRule(3, RuleType.SOLITARY, null, OriginationType.LOCAL, pattern, mask, 1, -1, null, 0); mask = "*"; pattern = this.sccpProvider.getParameterFactory().createSccpAddress(RoutingIndicator.ROUTING_BASED_ON_GLOBAL_TITLE, gt, 0, 6); ((RouterImpl) this.sccpStack.getRouter()).addRule(4, RuleType.SOLITARY, null, OriginationType.REMOTE, pattern, mask, 1, -1, null, 0); pattern = this.sccpProvider.getParameterFactory().createSccpAddress(RoutingIndicator.ROUTING_BASED_ON_GLOBAL_TITLE, gt, 0, 7); ((RouterImpl) this.sccpStack.getRouter()).addRule(5, RuleType.SOLITARY, null, OriginationType.REMOTE, pattern, mask, 1, -1, null, 0); pattern = this.sccpProvider.getParameterFactory().createSccpAddress(RoutingIndicator.ROUTING_BASED_ON_GLOBAL_TITLE, gt, 0, 8); ((RouterImpl) this.sccpStack.getRouter()).addRule(6, RuleType.SOLITARY, null, OriginationType.REMOTE, pattern, mask, 1, -1, null, 0); */ logger.debug("Initialized SCCP Stack ...."); }
Example #7
Source File: SS7Server.java From SigFW with GNU Affero General Public License v3.0 | 4 votes |
private void initSCCP() throws Exception { logger.debug("Initializing SCCP Stack ...."); this.sccpStack = new SccpStackImpl("SctpServerSCCP"); this.sccpStack.setMtp3UserPart(1, this.serverM3UAMgmt); this.sccpStack.setPersistDir(persistDir); this.sccpStack.start(); this.sccpStack.removeAllResourses(); this.sccpStack.getSccpResource().addRemoteSpc(0, CLIENT_SPC, 0, 0); this.sccpStack.getSccpResource().addRemoteSsn(0, CLIENT_SPC, SSN, 0, false); this.sccpStack.getRouter().addMtp3ServiceAccessPoint(1, 1, SERVER_SPC, NETWORK_INDICATOR, 0); this.sccpStack.getRouter().addMtp3Destination(1, 1, CLIENT_SPC, CLIENT_SPC, 0, 255, 255); this.sccpProvider = this.sccpStack.getSccpProvider(); this.sccpStack.getSccpResource().addRemoteSpc(1, SERVER_SPC, 0, 0); this.sccpStack.getSccpResource().addRemoteSsn(1, SERVER_SPC, SSN, 0, false); //this.sccpStack.setPreviewMode(true); // SCCP routing table GlobalTitle gt = this.sccpProvider.getParameterFactory().createGlobalTitle("", 0, org.mobicents.protocols.ss7.indicator.NumberingPlan.ISDN_TELEPHONY, null, NatureOfAddress.INTERNATIONAL); this.sccpStack.getRouter().addRoutingAddress(1, this.sccpProvider.getParameterFactory().createSccpAddress(RoutingIndicator.ROUTING_BASED_ON_GLOBAL_TITLE, gt, CLIENT_SPC, 0)); gt = this.sccpProvider.getParameterFactory().createGlobalTitle("", 0, org.mobicents.protocols.ss7.indicator.NumberingPlan.ISDN_TELEPHONY, null, NatureOfAddress.INTERNATIONAL); this.sccpStack.getRouter().addRoutingAddress(2, this.sccpProvider.getParameterFactory().createSccpAddress(RoutingIndicator.ROUTING_BASED_ON_GLOBAL_TITLE, gt, SERVER_SPC, SSN)); gt = this.sccpProvider.getParameterFactory().createGlobalTitle("*", 0, org.mobicents.protocols.ss7.indicator.NumberingPlan.ISDN_TELEPHONY, null, NatureOfAddress.INTERNATIONAL); SccpAddress pattern = this.sccpProvider.getParameterFactory().createSccpAddress(RoutingIndicator.ROUTING_BASED_ON_GLOBAL_TITLE, gt, 0, 0); String mask = "K"; ((RouterImpl) this.sccpStack.getRouter()).addRule(1, RuleType.SOLITARY, LoadSharingAlgorithm.Bit0, OriginationType.LOCAL, pattern, mask, 1, -1, null, 0, null); gt = this.sccpProvider.getParameterFactory().createGlobalTitle("*", 0, org.mobicents.protocols.ss7.indicator.NumberingPlan.ISDN_TELEPHONY, null, NatureOfAddress.INTERNATIONAL); pattern = this.sccpProvider.getParameterFactory().createSccpAddress(RoutingIndicator.ROUTING_BASED_ON_GLOBAL_TITLE, gt, 0, 0); mask = "R"; ((RouterImpl) this.sccpStack.getRouter()).addRule(2, RuleType.SOLITARY, LoadSharingAlgorithm.Bit0, OriginationType.REMOTE, pattern, mask, 2, -1, null, 0, null); logger.debug("Initialized SCCP Stack ...."); }
Example #8
Source File: SendRoutingInfoResp.java From SigPloit with MIT License | 4 votes |
private void initSCCP() throws Exception { logger.debug("Initializing SCCP Stack ...."); this.sccpStack = new SccpStackImpl("MapLoadServerSccpStack"); this.sccpStack.setMtp3UserPart(1, this.serverM3UAMgmt); this.sccpStack.start(); this.sccpStack.removeAllResourses(); this.sccpStack.getSccpResource().addRemoteSpc(1, CLIENT_SPC, 0, 0); this.sccpStack.getSccpResource().addRemoteSsn(1, CLIENT_SPC, SSN_Client, 0, false); this.sccpStack.getRouter().addMtp3ServiceAccessPoint(1, 1, SERVER_SPC, NETWORK_INDICATOR, 0); //addMtp3Destination(sapID, destID, firstDPC, lastDPC, firstSls, lastSls, slaMask) this.sccpStack.getRouter().addMtp3Destination(1, 1, CLIENT_SPC, CLIENT_SPC, 0, 255, 255); this.sccpProvider = this.sccpStack.getSccpProvider(); // SCCP routing table GlobalTitle0100 calling = this.sccpProvider.getParameterFactory().createGlobalTitle ("*", 0, org.mobicents.protocols.ss7.indicator.NumberingPlan.ISDN_TELEPHONY, null, NatureOfAddress.INTERNATIONAL); GlobalTitle0100 called = this.sccpProvider.getParameterFactory().createGlobalTitle ("201522222222", 0, org.mobicents.protocols.ss7.indicator.NumberingPlan.ISDN_TELEPHONY, null, NatureOfAddress.INTERNATIONAL); GlobalTitle0100 localHLR = this.sccpProvider.getParameterFactory().createGlobalTitle ("201500000000", 0, org.mobicents.protocols.ss7.indicator.NumberingPlan.ISDN_TELEPHONY, null, NatureOfAddress.INTERNATIONAL); this.sccpStack.getRouter().addRoutingAddress (1, this.sccpProvider.getParameterFactory().createSccpAddress (RoutingIndicator.ROUTING_BASED_ON_GLOBAL_TITLE, called, SERVER_SPC, SSN_Server)); this.sccpStack.getRouter().addRoutingAddress (2, this.sccpProvider.getParameterFactory().createSccpAddress( RoutingIndicator.ROUTING_BASED_ON_DPC_AND_SSN, calling, CLIENT_SPC, SSN_Client)); this.sccpStack.getRouter().addRoutingAddress (3, this.sccpProvider.getParameterFactory().createSccpAddress (RoutingIndicator.ROUTING_BASED_ON_GLOBAL_TITLE, localHLR, SERVER_SPC, SSN_Server)); SccpAddress patternLocal = this.sccpProvider.getParameterFactory().createSccpAddress( RoutingIndicator.ROUTING_BASED_ON_GLOBAL_TITLE, calling, CLIENT_SPC,SSN_Client ); SccpAddress patternRemote = this.sccpProvider.getParameterFactory().createSccpAddress (RoutingIndicator.ROUTING_BASED_ON_GLOBAL_TITLE, called, SERVER_SPC,SSN_Server); SccpAddress patternHLR = this.sccpProvider.getParameterFactory().createSccpAddress (RoutingIndicator.ROUTING_BASED_ON_GLOBAL_TITLE, localHLR, SERVER_SPC,SSN_Server); String maskLocal = "K"; String maskRemote = "R"; //translate local GT to its POC+SSN (local rule)GTT this.sccpStack.getRouter().addRule (1, RuleType.SOLITARY, null,OriginationType.LOCAL, patternLocal, maskLocal, 2, -1, null, 0); this.sccpStack.getRouter().addRule (2, RuleType.SOLITARY, null, OriginationType.REMOTE, patternRemote, maskRemote, 1, -1, null, 0); this.sccpStack.getRouter().addRule (3, RuleType.SOLITARY, null, OriginationType.REMOTE, patternHLR, maskRemote, 3, -1, null, 0); logger.debug("Initialized SCCP Stack ...."); }
Example #9
Source File: AnyTimeInterrogationResp.java From SigPloit with MIT License | 4 votes |
private void initSCCP() throws Exception { logger.debug("Initializing SCCP Stack ...."); this.sccpStack = new SccpStackImpl("MapLoadServerSccpStack"); this.sccpStack.setMtp3UserPart(1, this.serverM3UAMgmt); this.sccpStack.start(); this.sccpStack.removeAllResourses(); this.sccpStack.getSccpResource().addRemoteSpc(1, CLIENT_SPC, 0, 0); this.sccpStack.getSccpResource().addRemoteSsn(1, CLIENT_SPC, SSN_Client, 0, false); this.sccpStack.getRouter().addMtp3ServiceAccessPoint(1, 1, SERVER_SPC, NETWORK_INDICATOR, 0); //addMtp3Destination(sapID, destID, firstDPC, lastDPC, firstSls, lastSls, slaMask) this.sccpStack.getRouter().addMtp3Destination(1, 1, CLIENT_SPC, CLIENT_SPC, 0, 255, 255); this.sccpProvider = this.sccpStack.getSccpProvider(); // SCCP routing table //createGlobalTitle(gt, TranslationType, NP, encodingScheme(BCD_ODD || BCD_EVEN), natureofAddress) //used GlobalTitleIndicator(GTI) class for createGlobalTitle is GlobalTitle0100(used for MAP) GlobalTitle0100 calling = this.sccpProvider.getParameterFactory().createGlobalTitle ("*", 0, org.mobicents.protocols.ss7.indicator.NumberingPlan.ISDN_TELEPHONY, null, NatureOfAddress.INTERNATIONAL); GlobalTitle0100 called = this.sccpProvider.getParameterFactory().createGlobalTitle ("96599657765", 0, org.mobicents.protocols.ss7.indicator.NumberingPlan.ISDN_TELEPHONY, null, NatureOfAddress.INTERNATIONAL); GlobalTitle0100 localHlr = this.sccpProvider.getParameterFactory().createGlobalTitle ("96599657764", 0, org.mobicents.protocols.ss7.indicator.NumberingPlan.ISDN_TELEPHONY, null, NatureOfAddress.INTERNATIONAL); this.sccpStack.getRouter().addRoutingAddress (1, this.sccpProvider.getParameterFactory().createSccpAddress (RoutingIndicator.ROUTING_BASED_ON_GLOBAL_TITLE, called, SERVER_SPC, SSN_Server)); this.sccpStack.getRouter().addRoutingAddress (2, this.sccpProvider.getParameterFactory().createSccpAddress( RoutingIndicator.ROUTING_BASED_ON_DPC_AND_SSN, calling, 1, SSN_Client)); this.sccpStack.getRouter().addRoutingAddress (3, this.sccpProvider.getParameterFactory().createSccpAddress (RoutingIndicator.ROUTING_BASED_ON_GLOBAL_TITLE, localHlr, SERVER_SPC, SSN_Server)); SccpAddress patternLocal = this.sccpProvider.getParameterFactory().createSccpAddress( RoutingIndicator.ROUTING_BASED_ON_GLOBAL_TITLE, calling, 1,SSN_Client ); SccpAddress patternRemote = this.sccpProvider.getParameterFactory().createSccpAddress (RoutingIndicator.ROUTING_BASED_ON_GLOBAL_TITLE, called, SERVER_SPC,SSN_Server); SccpAddress patternHLR = this.sccpProvider.getParameterFactory().createSccpAddress (RoutingIndicator.ROUTING_BASED_ON_GLOBAL_TITLE, localHlr, SERVER_SPC,SSN_Server); String maskLocal = "K"; String maskRemote = "R"; //change mask to match on any digits after (2010) i.e 2010* //translate local GT to its POC+SSN (local rule)GTT this.sccpStack.getRouter().addRule (1, RuleType.SOLITARY, null,OriginationType.LOCAL, patternLocal, maskLocal, 2, -1, null, 0); this.sccpStack.getRouter().addRule (2, RuleType.SOLITARY, null, OriginationType.REMOTE, patternRemote, maskRemote, 1, -1, null, 0); this.sccpStack.getRouter().addRule (3, RuleType.SOLITARY, null, OriginationType.REMOTE, patternHLR, maskRemote, 3, -1, null, 0); logger.debug("Initialized SCCP Stack ...."); }
Example #10
Source File: SriSMResp.java From SigPloit with MIT License | 4 votes |
private void initSCCP() throws Exception { logger.debug("Initializing SCCP Stack ...."); this.sccpStack = new SccpStackImpl("MapLoadServerSccpStack"); this.sccpStack.setMtp3UserPart(1, this.serverM3UAMgmt); this.sccpStack.start(); this.sccpStack.removeAllResourses(); this.sccpStack.getSccpResource().addRemoteSpc(1, CLIENT_SPC, 0, 0); this.sccpStack.getSccpResource().addRemoteSsn(1, CLIENT_SPC, SSN_Client, 0, false); this.sccpStack.getRouter().addMtp3ServiceAccessPoint(1, 1, SERVER_SPC, NETWORK_INDICATOR, 0); this.sccpStack.getRouter().addMtp3Destination(1, 1, CLIENT_SPC, CLIENT_SPC, 0, 255, 255); this.sccpProvider = this.sccpStack.getSccpProvider(); // SCCP routing table GlobalTitle0100 calling = this.sccpProvider.getParameterFactory().createGlobalTitle ("*", 0, org.mobicents.protocols.ss7.indicator.NumberingPlan.ISDN_TELEPHONY, null, NatureOfAddress.INTERNATIONAL); //Enter the tested MSIDN that is being queried on, or a mask to represent all the ranges GlobalTitle0100 called = this.sccpProvider.getParameterFactory().createGlobalTitle ("201124683579", 0, org.mobicents.protocols.ss7.indicator.NumberingPlan.ISDN_TELEPHONY, null, NatureOfAddress.INTERNATIONAL); GlobalTitle0100 localHLR = this.sccpProvider.getParameterFactory().createGlobalTitle ("201179008244", 0, org.mobicents.protocols.ss7.indicator.NumberingPlan.ISDN_TELEPHONY, null, NatureOfAddress.INTERNATIONAL); this.sccpStack.getRouter().addRoutingAddress (1, this.sccpProvider.getParameterFactory().createSccpAddress (RoutingIndicator.ROUTING_BASED_ON_GLOBAL_TITLE, called, SERVER_SPC, SSN_Server)); this.sccpStack.getRouter().addRoutingAddress (2, this.sccpProvider.getParameterFactory().createSccpAddress( RoutingIndicator.ROUTING_BASED_ON_DPC_AND_SSN, calling, CLIENT_SPC, SSN_Client)); this.sccpStack.getRouter().addRoutingAddress (3, this.sccpProvider.getParameterFactory().createSccpAddress (RoutingIndicator.ROUTING_BASED_ON_GLOBAL_TITLE, localHLR, SERVER_SPC, SSN_Server)); SccpAddress patternLocal = this.sccpProvider.getParameterFactory().createSccpAddress( RoutingIndicator.ROUTING_BASED_ON_GLOBAL_TITLE, calling, CLIENT_SPC,SSN_Client ); SccpAddress patternRemote = this.sccpProvider.getParameterFactory().createSccpAddress (RoutingIndicator.ROUTING_BASED_ON_GLOBAL_TITLE, called, SERVER_SPC,SSN_Server); SccpAddress patternHLR = this.sccpProvider.getParameterFactory().createSccpAddress (RoutingIndicator.ROUTING_BASED_ON_GLOBAL_TITLE, localHLR, SERVER_SPC,SSN_Server); String maskLocal = "K"; String maskRemote = "R"; //translate local GT to its POC+SSN (local rule)GTT this.sccpStack.getRouter().addRule (1, RuleType.SOLITARY, null,OriginationType.LOCAL, patternLocal, maskLocal, 2, -1, null, 0); this.sccpStack.getRouter().addRule (2, RuleType.SOLITARY, null, OriginationType.REMOTE, patternRemote, maskRemote, 1, -1, null, 0); this.sccpStack.getRouter().addRule (3, RuleType.SOLITARY, null, OriginationType.REMOTE, patternHLR, maskRemote, 3, -1, null, 0); logger.debug("Initialized SCCP Stack ...."); }
Example #11
Source File: SendRoutingInfoForGPRS.java From SigPloit with MIT License | 4 votes |
private void initSCCP() throws Exception { logger.debug("Initializing SCCP Stack ...."); this.sccpStack = new SccpStackImpl("MapLoadServerSccpStack"); this.sccpStack.setMtp3UserPart(1, this.serverM3UAMgmt); this.sccpStack.start(); this.sccpStack.removeAllResourses(); this.sccpStack.getSccpResource().addRemoteSpc(1, CLIENT_SPC, 0, 0); this.sccpStack.getSccpResource().addRemoteSsn(1, CLIENT_SPC, SSN_Client, 0, false); this.sccpStack.getRouter().addMtp3ServiceAccessPoint(1, 1, SERVER_SPC, NETWORK_INDICATOR, 0); this.sccpStack.getRouter().addMtp3Destination(1, 1, CLIENT_SPC, CLIENT_SPC, 0, 255, 255); this.sccpProvider = this.sccpStack.getSccpProvider(); // SCCP routing table GlobalTitle0100 calling = this.sccpProvider.getParameterFactory().createGlobalTitle ("*", 0, org.mobicents.protocols.ss7.indicator.NumberingPlan.ISDN_TELEPHONY, null, NatureOfAddress.INTERNATIONAL); //Enter the tested HLR that is being queried on GlobalTitle0100 called = this.sccpProvider.getParameterFactory().createGlobalTitle ("441234567890", 0, org.mobicents.protocols.ss7.indicator.NumberingPlan.ISDN_TELEPHONY, null, NatureOfAddress.INTERNATIONAL); this.sccpStack.getRouter().addRoutingAddress (1, this.sccpProvider.getParameterFactory().createSccpAddress (RoutingIndicator.ROUTING_BASED_ON_GLOBAL_TITLE, called, SERVER_SPC, SSN_Server)); this.sccpStack.getRouter().addRoutingAddress (2, this.sccpProvider.getParameterFactory().createSccpAddress( RoutingIndicator.ROUTING_BASED_ON_DPC_AND_SSN, calling, CLIENT_SPC, SSN_Client)); SccpAddress patternLocal = this.sccpProvider.getParameterFactory().createSccpAddress( RoutingIndicator.ROUTING_BASED_ON_GLOBAL_TITLE, calling, CLIENT_SPC,SSN_Client ); SccpAddress patternRemote = this.sccpProvider.getParameterFactory().createSccpAddress (RoutingIndicator.ROUTING_BASED_ON_GLOBAL_TITLE, called, SERVER_SPC,SSN_Server); String maskLocal = "K"; String maskRemote = "R"; //translate local GT to its POC+SSN (local rule)GTT this.sccpStack.getRouter().addRule (1, RuleType.SOLITARY, null,OriginationType.LOCAL, patternLocal, maskLocal, 2, -1, null, 0); this.sccpStack.getRouter().addRule (2, RuleType.SOLITARY, null, OriginationType.REMOTE, patternRemote, maskRemote, 1, -1, null, 0); logger.debug("Initialized SCCP Stack ...."); }
Example #12
Source File: SendIMSIResp.java From SigPloit with MIT License | 4 votes |
private void initSCCP() throws Exception { logger.debug("Initializing SCCP Stack ...."); this.sccpStack = new SccpStackImpl("MapLoadServerSccpStack"); this.sccpStack.setMtp3UserPart(1, this.serverM3UAMgmt); this.sccpStack.start(); this.sccpStack.removeAllResourses(); this.sccpStack.getSccpResource().addRemoteSpc(1, CLIENT_SPC, 0, 0); this.sccpStack.getSccpResource().addRemoteSsn(1, CLIENT_SPC, SSN_Client, 0, false); this.sccpStack.getRouter().addMtp3ServiceAccessPoint(1, 1, SERVER_SPC, NETWORK_INDICATOR, 0); this.sccpStack.getRouter().addMtp3Destination(1, 1, CLIENT_SPC, CLIENT_SPC, 0, 255, 255); this.sccpProvider = this.sccpStack.getSccpProvider(); // SCCP routing table GlobalTitle0100 calling = this.sccpProvider.getParameterFactory().createGlobalTitle ("*", 0, org.mobicents.protocols.ss7.indicator.NumberingPlan.ISDN_TELEPHONY, null, NatureOfAddress.INTERNATIONAL); GlobalTitle0100 called = this.sccpProvider.getParameterFactory().createGlobalTitle ("201522222222", 0, org.mobicents.protocols.ss7.indicator.NumberingPlan.ISDN_TELEPHONY, null, NatureOfAddress.INTERNATIONAL); GlobalTitle0100 localHLR = this.sccpProvider.getParameterFactory().createGlobalTitle ("201500000000", 0, org.mobicents.protocols.ss7.indicator.NumberingPlan.ISDN_TELEPHONY, null, NatureOfAddress.INTERNATIONAL); this.sccpStack.getRouter().addRoutingAddress (1, this.sccpProvider.getParameterFactory().createSccpAddress (RoutingIndicator.ROUTING_BASED_ON_GLOBAL_TITLE, localHLR, SERVER_SPC, SSN_Server)); this.sccpStack.getRouter().addRoutingAddress (2, this.sccpProvider.getParameterFactory().createSccpAddress( RoutingIndicator.ROUTING_BASED_ON_DPC_AND_SSN, calling, CLIENT_SPC, SSN_Client)); this.sccpStack.getRouter().addRoutingAddress (3, this.sccpProvider.getParameterFactory().createSccpAddress (RoutingIndicator.ROUTING_BASED_ON_GLOBAL_TITLE, called, SERVER_SPC, SSN_Server)); SccpAddress patternLocal = this.sccpProvider.getParameterFactory().createSccpAddress( RoutingIndicator.ROUTING_BASED_ON_GLOBAL_TITLE, calling, CLIENT_SPC,SSN_Client ); SccpAddress patternHLR = this.sccpProvider.getParameterFactory().createSccpAddress (RoutingIndicator.ROUTING_BASED_ON_GLOBAL_TITLE, localHLR, SERVER_SPC,SSN_Server); SccpAddress patternRemote = this.sccpProvider.getParameterFactory().createSccpAddress (RoutingIndicator.ROUTING_BASED_ON_GLOBAL_TITLE, called, SERVER_SPC,SSN_Server); String maskLocal = "K"; String maskRemote = "R"; //translate local GT to its POC+SSN (local rule)GTT this.sccpStack.getRouter().addRule (1, RuleType.SOLITARY, null,OriginationType.LOCAL, patternLocal, maskLocal, 2, -1, null, 0); this.sccpStack.getRouter().addRule (2, RuleType.SOLITARY, null, OriginationType.REMOTE, patternHLR, maskRemote, 1, -1, null, 0); this.sccpStack.getRouter().addRule (3, RuleType.SOLITARY, null, OriginationType.REMOTE, patternRemote, maskRemote, 1, -1, null,0); logger.debug("Initialized SCCP Stack ...."); }
Example #13
Source File: UpdateLocationResp.java From SigPloit with MIT License | 4 votes |
private void initSCCP() throws Exception { logger.debug("Initializing SCCP Stack ...."); this.sccpStack = new SccpStackImpl("MapLoadServerSccpStack"); this.sccpStack.setMtp3UserPart(1, this.serverM3UAMgmt); this.sccpStack.start(); this.sccpStack.removeAllResourses(); this.sccpStack.getSccpResource().addRemoteSpc(1, CLIENT_SPC, 0, 0); this.sccpStack.getSccpResource().addRemoteSsn(1, CLIENT_SPC, SSN_Client, 0, false); this.sccpStack.getRouter().addMtp3ServiceAccessPoint(1, 1, SERVER_SPC, NETWORK_INDICATOR, 0); //addMtp3Destination(sapID, destID, firstDPC, lastDPC, firstSls, lastSls, slaMask) this.sccpStack.getRouter().addMtp3Destination(1, 1, CLIENT_SPC, CLIENT_SPC, 0, 255, 255); this.sccpProvider = this.sccpStack.getSccpProvider(); // SCCP routing table GlobalTitle0100 calling = this.sccpProvider.getParameterFactory().createGlobalTitle ("*", 0, org.mobicents.protocols.ss7.indicator.NumberingPlan.ISDN_TELEPHONY, null, NatureOfAddress.INTERNATIONAL); GlobalTitle0100 called = this.sccpProvider.getParameterFactory().createGlobalTitle ("20107891234567", 0, org.mobicents.protocols.ss7.indicator.NumberingPlan.ISDN_MOBILE, null, NatureOfAddress.INTERNATIONAL); GlobalTitle0100 localHlr = this.sccpProvider.getParameterFactory().createGlobalTitle ("201012345678", 0, org.mobicents.protocols.ss7.indicator.NumberingPlan.ISDN_TELEPHONY, null, NatureOfAddress.INTERNATIONAL); GlobalTitle0100 localmsc = this.sccpProvider.getParameterFactory().createGlobalTitle ("201012344321", 0, org.mobicents.protocols.ss7.indicator.NumberingPlan.ISDN_TELEPHONY, null, NatureOfAddress.INTERNATIONAL); this.sccpStack.getRouter().addRoutingAddress (1, this.sccpProvider.getParameterFactory().createSccpAddress (RoutingIndicator.ROUTING_BASED_ON_GLOBAL_TITLE, called, SERVER_SPC, SSN_Server)); this.sccpStack.getRouter().addRoutingAddress (2, this.sccpProvider.getParameterFactory().createSccpAddress( RoutingIndicator.ROUTING_BASED_ON_DPC_AND_SSN, calling, 1, SSN_Client)); this.sccpStack.getRouter().addRoutingAddress (3, this.sccpProvider.getParameterFactory().createSccpAddress (RoutingIndicator.ROUTING_BASED_ON_GLOBAL_TITLE, localHlr, SERVER_SPC, SSN_Server)); this.sccpStack.getRouter().addRoutingAddress (4, this.sccpProvider.getParameterFactory().createSccpAddress (RoutingIndicator.ROUTING_BASED_ON_GLOBAL_TITLE, localmsc, SERVER_SPC, SSN_MSC)); SccpAddress patternLocal = this.sccpProvider.getParameterFactory().createSccpAddress( RoutingIndicator.ROUTING_BASED_ON_GLOBAL_TITLE, calling, 1,SSN_Client ); SccpAddress patternRemote = this.sccpProvider.getParameterFactory().createSccpAddress (RoutingIndicator.ROUTING_BASED_ON_GLOBAL_TITLE, called, SERVER_SPC,SSN_Server); SccpAddress patternHLR = this.sccpProvider.getParameterFactory().createSccpAddress (RoutingIndicator.ROUTING_BASED_ON_GLOBAL_TITLE, localHlr, SERVER_SPC,SSN_Server); SccpAddress patternMSC = this.sccpProvider.getParameterFactory().createSccpAddress (RoutingIndicator.ROUTING_BASED_ON_GLOBAL_TITLE, localmsc, SERVER_SPC,SSN_MSC); String maskLocal = "K"; String maskRemote = "R"; //change mask to match on any digits after (2010) i.e 2010* //translate local GT to its POC+SSN (local rule)GTT this.sccpStack.getRouter().addRule (1, RuleType.SOLITARY, null,OriginationType.LOCAL, patternLocal, maskLocal, 2, -1, null, 0); this.sccpStack.getRouter().addRule (2, RuleType.SOLITARY, null, OriginationType.REMOTE, patternRemote, maskRemote, 1, -1, null, 0); this.sccpStack.getRouter().addRule (3, RuleType.SOLITARY, null, OriginationType.REMOTE, patternHLR, maskRemote, 3, -1, null, 0); this.sccpStack.getRouter().addRule (4, RuleType.SOLITARY, null, OriginationType.REMOTE, patternMSC, maskRemote, 3, -1, null, 0); logger.debug("Initialized SCCP Stack ...."); }
Example #14
Source File: SS7Client.java From SigFW with GNU Affero General Public License v3.0 | 2 votes |
private void initSCCP() throws Exception { logger.debug("Initializing SCCP Stack ...."); this.sccpStack = new SccpStackImpl("SctpClientSCCP"); this.clientM3UAMgmt.setPersistDir(persistDir); this.sccpStack.setMtp3UserPart(1, this.clientM3UAMgmt); this.sccpStack.start(); this.sccpStack.removeAllResourses(); this.sccpStack.getSccpResource().addRemoteSpc(0, SERVER_SPC, 0, 0); this.sccpStack.getSccpResource().addRemoteSsn(0, SERVER_SPC, SSN, 0, false); this.sccpStack.getRouter().addMtp3ServiceAccessPoint(1, 1, CLIENT_SPC, NETWORK_INDICATOR, 0); this.sccpStack.getRouter().addMtp3Destination(1, 1, SERVER_SPC, SERVER_SPC, 0, 255, 255); this.sccpProvider = this.sccpStack.getSccpProvider(); //this.sccpStack.getSccpResource().addRemoteSpc(1, SERVER_SPC, 0, 0); //this.sccpStack.getSccpResource().addRemoteSsn(1, SERVER_SPC, SSN, 0, false); // SCCP routing table GlobalTitle gt = this.sccpProvider.getParameterFactory().createGlobalTitle("", 0, org.mobicents.protocols.ss7.indicator.NumberingPlan.ISDN_TELEPHONY, null, NatureOfAddress.INTERNATIONAL); this.sccpStack.getRouter().addRoutingAddress(1, this.sccpProvider.getParameterFactory().createSccpAddress(RoutingIndicator.ROUTING_BASED_ON_GLOBAL_TITLE, gt, SERVER_SPC, 0)); //this.sccpStack.getRouter().addRoutingAddress(2, this.sccpProvider.getParameterFactory().createSccpAddress(RoutingIndicator.ROUTING_BASED_ON_DPC_AND_SSN, gt, SERVER_SPC, SSN)); gt = this.sccpProvider.getParameterFactory().createGlobalTitle("*", 0, org.mobicents.protocols.ss7.indicator.NumberingPlan.ISDN_TELEPHONY, null, NatureOfAddress.INTERNATIONAL); SccpAddress pattern = this.sccpProvider.getParameterFactory().createSccpAddress(RoutingIndicator.ROUTING_BASED_ON_GLOBAL_TITLE, gt, 0, 0); String mask = "K"; ((RouterImpl) this.sccpStack.getRouter()).addRule(1, RuleType.SOLITARY, LoadSharingAlgorithm.Bit0, OriginationType.LOCAL, pattern, mask, 1, -1, null, 0, null); pattern = this.sccpProvider.getParameterFactory().createSccpAddress(RoutingIndicator.ROUTING_BASED_ON_GLOBAL_TITLE, gt, 0, 0); mask = "R"; ((RouterImpl) this.sccpStack.getRouter()).addRule(2, RuleType.SOLITARY, LoadSharingAlgorithm.Bit0, OriginationType.REMOTE, pattern, mask, 1, -1, null, 0, null); logger.debug("Initialized SCCP Stack ...."); }
Example #15
Source File: SS7ClientLiveInput.java From SigFW with GNU Affero General Public License v3.0 | 2 votes |
private void initSCCP() throws Exception { logger.debug("Initializing SCCP Stack ...."); this.sccpStack = new SccpStackImpl("SctpClientLiveInputSCCP"); this.sccpStack.setPersistDir(persistDir); this.sccpStack.setMtp3UserPart(1, this.clientM3UAMgmt); this.sccpStack.start(); this.sccpStack.removeAllResourses(); this.sccpStack.getSccpResource().addRemoteSpc(0, SERVER_SPC, 0, 0); this.sccpStack.getSccpResource().addRemoteSsn(0, SERVER_SPC, SSN, 0, false); this.sccpStack.getRouter().addMtp3ServiceAccessPoint(1, 1, CLIENT_SPC, NETWORK_INDICATOR, 0); this.sccpStack.getRouter().addMtp3Destination(1, 1, SERVER_SPC, SERVER_SPC, 0, 255, 255); this.sccpProvider = this.sccpStack.getSccpProvider(); //this.sccpStack.getSccpResource().addRemoteSpc(1, SERVER_SPC, 0, 0); //this.sccpStack.getSccpResource().addRemoteSsn(1, SERVER_SPC, SSN, 0, false); // SCCP routing table GlobalTitle gt = this.sccpProvider.getParameterFactory().createGlobalTitle("", 0, org.mobicents.protocols.ss7.indicator.NumberingPlan.ISDN_TELEPHONY, null, NatureOfAddress.INTERNATIONAL); this.sccpStack.getRouter().addRoutingAddress(1, this.sccpProvider.getParameterFactory().createSccpAddress(RoutingIndicator.ROUTING_BASED_ON_GLOBAL_TITLE, gt, SERVER_SPC, 0)); //this.sccpStack.getRouter().addRoutingAddress(2, this.sccpProvider.getParameterFactory().createSccpAddress(RoutingIndicator.ROUTING_BASED_ON_DPC_AND_SSN, gt, SERVER_SPC, SSN)); gt = this.sccpProvider.getParameterFactory().createGlobalTitle("*", 0, org.mobicents.protocols.ss7.indicator.NumberingPlan.ISDN_TELEPHONY, null, NatureOfAddress.INTERNATIONAL); SccpAddress pattern = this.sccpProvider.getParameterFactory().createSccpAddress(RoutingIndicator.ROUTING_BASED_ON_GLOBAL_TITLE, gt, 0, 0); String mask = "K"; ((RouterImpl) this.sccpStack.getRouter()).addRule(1, RuleType.SOLITARY, LoadSharingAlgorithm.Bit0, OriginationType.LOCAL, pattern, mask, 1, -1, null, 0, null); pattern = this.sccpProvider.getParameterFactory().createSccpAddress(RoutingIndicator.ROUTING_BASED_ON_GLOBAL_TITLE, gt, 0, 0); mask = "R"; ((RouterImpl) this.sccpStack.getRouter()).addRule(2, RuleType.SOLITARY, LoadSharingAlgorithm.Bit0, OriginationType.REMOTE, pattern, mask, 1, -1, null, 0, null); logger.debug("Initialized SCCP Stack ...."); }
Example #16
Source File: ProvideSubscriberInformationResp.java From SigPloit with MIT License | 2 votes |
private void initSCCP() throws Exception { logger.debug("Initializing SCCP Stack ...."); this.sccpStack = new SccpStackImpl("MapLoadServerSccpStack"); this.sccpStack.setMtp3UserPart(1, this.serverM3UAMgmt); this.sccpStack.start(); this.sccpStack.removeAllResourses(); this.sccpStack.getSccpResource().addRemoteSpc(1, CLIENT_SPC, 0, 0); this.sccpStack.getSccpResource().addRemoteSsn(1, CLIENT_SPC, SSN_Client, 0, false); this.sccpStack.getRouter().addMtp3ServiceAccessPoint(1, 1, SERVER_SPC, NETWORK_INDICATOR, 0); //addMtp3Destination(sapID, destID, firstDPC, lastDPC, firstSls, lastSls, slaMask) this.sccpStack.getRouter().addMtp3Destination(1, 1, CLIENT_SPC, CLIENT_SPC, 0, 255, 255); this.sccpProvider = this.sccpStack.getSccpProvider(); // SCCP routing table //used GlobalTitleIndicator(GTI) class for createGlobalTitle is GlobalTitle0100(used for MAP) GlobalTitle0100 calling = this.sccpProvider.getParameterFactory().createGlobalTitle ("*", 0, org.mobicents.protocols.ss7.indicator.NumberingPlan.ISDN_TELEPHONY, null, NatureOfAddress.INTERNATIONAL); GlobalTitle0100 called = this.sccpProvider.getParameterFactory().createGlobalTitle ("201179008244", 0, org.mobicents.protocols.ss7.indicator.NumberingPlan.ISDN_TELEPHONY, null, NatureOfAddress.INTERNATIONAL); /* GlobalTitle0100 localVlr = this.sccpProvider.getParameterFactory().createGlobalTitle ("96599657765", 0, org.mobicents.protocols.ss7.indicator.NumberingPlan.ISDN_TELEPHONY, null, NatureOfAddress.INTERNATIONAL);*/ this.sccpStack.getRouter().addRoutingAddress (1, this.sccpProvider.getParameterFactory().createSccpAddress (RoutingIndicator.ROUTING_BASED_ON_GLOBAL_TITLE, called, SERVER_SPC, SSN_Server)); this.sccpStack.getRouter().addRoutingAddress (2, this.sccpProvider.getParameterFactory().createSccpAddress( RoutingIndicator.ROUTING_BASED_ON_DPC_AND_SSN, calling, 1, SSN_Client)); /*this.sccpStack.getRouter().addRoutingAddress (3, this.sccpProvider.getParameterFactory().createSccpAddress (RoutingIndicator.ROUTING_BASED_ON_GLOBAL_TITLE, localVlr, SERVER_SPC, SSN_Server));*/ SccpAddress patternLocal = this.sccpProvider.getParameterFactory().createSccpAddress( RoutingIndicator.ROUTING_BASED_ON_GLOBAL_TITLE, calling, 1,SSN_Client ); SccpAddress patternRemote = this.sccpProvider.getParameterFactory().createSccpAddress (RoutingIndicator.ROUTING_BASED_ON_GLOBAL_TITLE, called, SERVER_SPC,SSN_Server); /*SccpAddress patternHLR = this.sccpProvider.getParameterFactory().createSccpAddress (RoutingIndicator.ROUTING_BASED_ON_GLOBAL_TITLE, localVlr, SERVER_SPC,SSN_Server);*/ String maskLocal = "K"; String maskRemote = "R"; //change mask to match on any digits after (2010) i.e 2010* //translate local GT to its POC+SSN (local rule)GTT this.sccpStack.getRouter().addRule (1, RuleType.SOLITARY, null,OriginationType.LOCAL, patternLocal, maskLocal, 2, -1, null, 0); this.sccpStack.getRouter().addRule (2, RuleType.SOLITARY, null, OriginationType.REMOTE, patternRemote, maskRemote, 1, -1, null, 0); /*this.sccpStack.getRouter().addRule (3, RuleType.SOLITARY, null, OriginationType.REMOTE, patternHLR, maskRemote, 3, -1, null, 0);*/ logger.debug("Initialized SCCP Stack ...."); }