當前位置: 首頁>>代碼示例>>Java>>正文


Java RuleType類代碼示例

本文整理匯總了Java中org.mobicents.protocols.ss7.sccp.RuleType的典型用法代碼示例。如果您正苦於以下問題:Java RuleType類的具體用法?Java RuleType怎麽用?Java RuleType使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


RuleType類屬於org.mobicents.protocols.ss7.sccp包,在下文中一共展示了RuleType類的9個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: initSccp

import org.mobicents.protocols.ss7.sccp.RuleType; //導入依賴的package包/類
private void initSccp(Mtp3UserPart mtp3UserPart, int remoteSsn, int localSsn, int dpc, int opc, int ni, String callingPartyAddressDigits, String persistDir, SccpProtocolVersion sccpProtocolVersion)
        throws Exception {

    this.sccpStack = new SccpStackImpl("TestingSccp");
    this.sccpStack.setPersistDir(persistDir);

    this.sccpStack.setMtp3UserPart(1, mtp3UserPart);
    this.sccpStack.start();
    this.sccpStack.removeAllResourses();

    this.sccpStack.setSccpProtocolVersion(sccpProtocolVersion);
    this.sccpStack.getRouter().addMtp3ServiceAccessPoint(1, 1, opc, ni, 0);
    this.sccpStack.getRouter().addMtp3Destination(1, 1, dpc, dpc, 0, 255, 255);

    this.sccpProvider = this.sccpStack.getSccpProvider();
    this.parameterFactory = this.sccpProvider.getParameterFactory();
    // router1 = sccpStack1.getRouter();

    this.resource = this.sccpStack.getSccpResource();

    this.resource.addRemoteSpc(1, dpc, 0, 0);
    this.resource.addRemoteSsn(1, dpc, remoteSsn, 0, false);

    if (this.testerHost.getConfigurationData().getSccpConfigurationData().isRouteOnGtMode()) {
        this.router = this.sccpStack.getRouter();

        this.router.addRoutingAddress(1,parameterFactory.createSccpAddress(RoutingIndicator.ROUTING_BASED_ON_GLOBAL_TITLE, this.createGlobalTitle(""), dpc, 0));
        this.router.addRoutingAddress(2,
                parameterFactory.createSccpAddress(RoutingIndicator.ROUTING_BASED_ON_DPC_AND_SSN, this.createGlobalTitle(""), opc, localSsn));

        SccpAddress pattern = parameterFactory.createSccpAddress(RoutingIndicator.ROUTING_BASED_ON_GLOBAL_TITLE, this.createGlobalTitle("*"), 0,
                0);
        String mask = "K";
        ((RouterImpl) this.router).addRule(1, RuleType.SOLITARY, null, OriginationType.LOCAL, pattern, mask, 1,
                -1, null, 0);
        pattern = parameterFactory.createSccpAddress(RoutingIndicator.ROUTING_BASED_ON_GLOBAL_TITLE, this.createGlobalTitle("*"), 0, 0);
        mask = "R";
        ((RouterImpl) this.router).addRule(2, RuleType.SOLITARY, null, OriginationType.REMOTE, pattern, mask, 2,
                -1, null, 0);
    }
}
 
開發者ID:RestComm,項目名稱:phone-simulator,代碼行數:42,代碼來源:SccpMan.java

示例2: initSCCP

import org.mobicents.protocols.ss7.sccp.RuleType; //導入依賴的package包/類
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 ....");
}
 
開發者ID:P1sec,項目名稱:SigFW,代碼行數:54,代碼來源:SS7Honeypot.java

示例3: initSCCP

import org.mobicents.protocols.ss7.sccp.RuleType; //導入依賴的package包/類
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 ....");
}
 
開發者ID:P1sec,項目名稱:SigFW,代碼行數:45,代碼來源:SS7Server.java

示例4: initSCCP

import org.mobicents.protocols.ss7.sccp.RuleType; //導入依賴的package包/類
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 ....");
}
 
開發者ID:SigPloiter,項目名稱:SigPloit,代碼行數:69,代碼來源:SendRoutingInfoResp.java

示例5: initSCCP

import org.mobicents.protocols.ss7.sccp.RuleType; //導入依賴的package包/類
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 ....");
}
 
開發者ID:SigPloiter,項目名稱:SigPloit,代碼行數:74,代碼來源:AnyTimeInterrogationResp.java

示例6: initSCCP

import org.mobicents.protocols.ss7.sccp.RuleType; //導入依賴的package包/類
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 ....");
}
 
開發者ID:P1sec,項目名稱:SigFW,代碼行數:42,代碼來源:SS7Client.java

示例7: initSCCP

import org.mobicents.protocols.ss7.sccp.RuleType; //導入依賴的package包/類
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 ....");
}
 
開發者ID:P1sec,項目名稱:SigFW,代碼行數:42,代碼來源:SS7ClientLiveInput.java

示例8: initSCCP

import org.mobicents.protocols.ss7.sccp.RuleType; //導入依賴的package包/類
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 ....");
}
 
開發者ID:SigPloiter,項目名稱:SigPloit,代碼行數:74,代碼來源:ProvideSubscriberInformationResp.java

示例9: initSCCP

import org.mobicents.protocols.ss7.sccp.RuleType; //導入依賴的package包/類
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 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));




    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);


    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);


    logger.debug("Initialized SCCP Stack ....");
}
 
開發者ID:SigPloiter,項目名稱:SigPloit,代碼行數:60,代碼來源:SendIMSIResp.java


注:本文中的org.mobicents.protocols.ss7.sccp.RuleType類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。