当前位置: 首页>>代码示例>>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;未经允许,请勿转载。