Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/351.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java JSS7路由问题_Java - Fatal编程技术网

Java JSS7路由问题

Java JSS7路由问题,java,Java,问题是我已将客户端配置为连接到mss MSS地址为(它是一个真正的生产MSS) 我的应用程序应该作为ussdgw(客户端关联)地址 protected final String CLIENT_IP = "10.2.39.11"; protected final int CLIENT_PORT= 9988; 问题是我可以接收到以下消息: 643477 [Mtp3-DeliveryExecutor-5-6-1] DEBUG org.mobicents.protocols.ss7.sccp.imp

问题是我已将客户端配置为连接到mss MSS地址为(它是一个真正的生产MSS)

我的应用程序应该作为ussdgw(客户端关联)地址

protected final String CLIENT_IP = "10.2.39.11";
protected final int  CLIENT_PORT= 9988;
问题是我可以接收到以下消息:

643477 [Mtp3-DeliveryExecutor-5-6-1] DEBUG org.mobicents.protocols.ss7.sccp.impl.SccpStackImpl-MapLoadServerSccpStack  - Rx : SCCP message from MTP Sccp Msg [Type=UDT networkId=0 sls=5 incomingOpc=13313 incomingDpc=13043 outgoingDpc=-1 CallingAddress(pc=0,ssn=7,AI=18,gt=GlobalTitle0100Impl [digits=998930150000, natureOfAddress=INTERNATIONAL, numberingPlan=ISDN_TELEPHONY, translationType=0, encodingScheme=BCDEvenEncodingScheme[type=BCD_EVEN, code=2]]) CalledParty(pc=0,ssn=5,AI=18,gt=GlobalTitle0100Impl [digits=998930195002, natureOfAddress=INTERNATIONAL, numberingPlan=ISDN_TELEPHONY, translationType=0, encodingScheme=BCDEvenEncodingScheme[type=BCD_EVEN, code=2]]) DataLen=122]

643477 [Mtp3-DeliveryExecutor-5-6-1] DEBUG org.mobicents.protocols.ss7.sccp.impl.SccpRoutingControl  - Matching rule found: [ruleId(2);ruleType(Solitary);originatingType(RemoteOriginated);patternSccpAddress(pc=13313,ssn=5,AI=83,gt=GlobalTitle0100Impl [digits=998930195002, natureOfAddress=INTERNATIONAL, numberingPlan=ISDN_TELEPHONY, translationType=0, encodingScheme=BCDEvenEncodingScheme[type=BCD_EVEN, code=2]]);paddress(2);saddress(-1);mask(R);networkId(0)] CalledPartyAddress after translation = pc=13043,ssn=7,AI=19,gt=GlobalTitle0100Impl [digits=998930195002, natureOfAddress=INTERNATIONAL, numberingPlan=ISDN_TELEPHONY, translationType=0, encodingScheme=BCDEvenEncodingScheme[type=BCD_EVEN, code=2]]

643477 [Mtp3-DeliveryExecutor-5-6-1] DEBUG org.mobicents.protocols.ss7.sccp.impl.SccpRoutingControl  - Local deliver : SCCP Data Message=Sccp Msg [Type=UDT networkId=0 sls=5 incomingOpc=13313 incomingDpc=13043 outgoingDpc=-1 CallingAddress(pc=0,ssn=7,AI=18,gt=GlobalTitle0100Impl [digits=998930150000, natureOfAddress=INTERNATIONAL, numberingPlan=ISDN_TELEPHONY, translationType=0, encodingScheme=BCDEvenEncodingScheme[type=BCD_EVEN, code=2]]) CalledParty(pc=13043,ssn=7,AI=19,gt=GlobalTitle0100Impl [digits=998930195002, natureOfAddress=INTERNATIONAL, numberingPlan=ISDN_TELEPHONY, translationType=0, encodingScheme=BCDEvenEncodingScheme[type=BCD_EVEN, code=2]]) DataLen=122]

2019-08-13 15:45:02.569  INFO 22973 --- [yExecutor-5-6-1] uz.rdu.ussd.servers.SS7Client            : On Dialog Request Recieved ...
2019-08-13 15:45:02.570  INFO 22973 --- [yExecutor-5-6-1] uz.rdu.ussd.servers.SS7Client            : On Dialog Request Recieved ... dest:434054305088581  orig:998930150000
onMAPMessage for DialogId=2. Ussd String=0
2019-08-13 15:45:02.571  INFO 22973 --- [yExecutor-5-6-1] uz.rdu.ussd.servers.SS7Client            : onProcessUnstructuredSSRequestIndication for DialogId=2. Ussd String=*1071#
2019-08-13 15:45:02.571  INFO 22973 --- [yExecutor-5-6-1] uz.rdu.ussd.servers.SS7Client            : On Dialog Delimeter
2019-08-13 15:45:02.571  INFO 22973 --- [yExecutor-5-6-1] uz.rdu.ussd.servers.SS7Client            : GlobalTitle0100Impl [digits=998930150000, natureOfAddress=INTERNATIONAL, numberingPlan=ISDN_TELEPHONY, translationType=0, encodingScheme=BCDEvenEncodingScheme[type=BCD_EVEN, code=2]]
但我无法回复,这是我的sccp路线

private void initSCCP() throws Exception {
                logger.info("Initializing SCCP Stack ....");
                logger.info("new changes");
                 logger.debug("Initializing SCCP Stack ....");
                this.sccpStack = new SccpStackImpl("MapLoadServerSccpStack");
                this.sccpStack.setMtp3UserPart(1, this.clientM3UAMgmt);

                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.getSccpResource().addRemoteSpc(1, SERVER_SPC, 0, 0);
                this.sccpStack.getSccpResource().addRemoteSsn(1, 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.sccpStack.getRouter().addMtp3ServiceAccessPoint(2, 1, SERVER_SPC, NETWORK_INDICATOR, 0);
                //this.sccpStack.getRouter().addMtp3Destination(2, 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)
                GlobalTitle called = this.sccpProvider.getParameterFactory().createGlobalTitle
                        ("998930195002", 0, org.mobicents.protocols.ss7.indicator.NumberingPlan.ISDN_TELEPHONY, null,
                                NatureOfAddress.INTERNATIONAL);
                GlobalTitle calling = this.sccpProvider.getParameterFactory().createGlobalTitle
                        ("998930150000", 0, org.mobicents.protocols.ss7.indicator.NumberingPlan.ISDN_TELEPHONY, null,
                                NatureOfAddress.INTERNATIONAL);

                //      -1-
                this.sccpStack.getRouter().addRoutingAddress
                        (1, this.sccpProvider.getParameterFactory().createSccpAddress
                                (RoutingIndicator.ROUTING_BASED_ON_GLOBAL_TITLE, calling, SERVER_SPC, 8));
                //      -2-
                this.sccpStack.getRouter().addRoutingAddress
                        (2, this.sccpProvider.getParameterFactory().createSccpAddress(
                                RoutingIndicator.ROUTING_BASED_ON_GLOBAL_TITLE, called, CLIENT_SPC, 7));

                called = this.sccpProvider.getParameterFactory().createGlobalTitle
                        ("998930195002", 0, org.mobicents.protocols.ss7.indicator.NumberingPlan.ISDN_TELEPHONY, null,
                                NatureOfAddress.INTERNATIONAL);
                calling = this.sccpProvider.getParameterFactory().createGlobalTitle
                        ("998930150000", 0, org.mobicents.protocols.ss7.indicator.NumberingPlan.ISDN_TELEPHONY, null,
                                NatureOfAddress.INTERNATIONAL);


                SccpAddress patternLocal = this.sccpProvider.getParameterFactory().createSccpAddress(
                        RoutingIndicator.ROUTING_BASED_ON_DPC_AND_SSN, called, SERVER_SPC,5);

                 SccpAddress patternRemote = this.sccpProvider.getParameterFactory().createSccpAddress
                        (RoutingIndicator.ROUTING_BASED_ON_DPC_AND_SSN, calling, SERVER_SPC,5);
}
这是我想发回的请求

@Override
        public void onProcessUnstructuredSSRequest(ProcessUnstructuredSSRequest procUnstrReqInd) {
                // TODO Auto-generated method stub
                try{
                        logger.info(String.format("onProcessUnstructuredSSRequestIndication for DialogId=%d. Ussd String=%s",
                        procUnstrReqInd.getMAPDialog().getLocalDialogId(), procUnstrReqInd.getUSSDString().getString(null)));
                        long invokeId = procUnstrReqInd.getInvokeId();

                        USSDString ussdStrObj = this.mapProvider.getMAPParameterFactory().createUSSDString(
                                        "USSD String : Hello World <CR> 1. Balance <CR> 2. Texts Remaining");
                        CBSDataCodingScheme ussdDataCodingScheme = new CBSDataCodingSchemeImpl(0x0F);
                        MAPDialogSupplementary dialog = procUnstrReqInd.getMAPDialog();

                        dialog.setUserObject(invokeId);

                        ISDNAddressString msisdn = this.mapProvider.getMAPParameterFactory().createISDNAddressString(
                                        AddressNature.international_number, NumberingPlan.ISDN, "998930150000");

                        dialog.addProcessUnstructuredSSRequest(ussdDataCodingScheme, ussdStrObj, null, msisdn);
                        dialog.send();
                } catch (MAPException e) {
                        logger.error("Error while sending UnstructuredSSRequest ", e);
                }
        }
@覆盖
ProcessUnstructuredSSRequest(ProcessUnstructuredSSRequest ProcUnstructureQind)上的公共无效{
//TODO自动生成的方法存根
试一试{
logger.info(String.format(“对话框ID=%d.Ussd String=%s的onProcessUnstructuredSSRequestIndication”),
prounstreqind.getMAPDialog().getLocalDialogId(),prounstreqind.getUSSDString().getString(null));
long invokeId=prounstreqind.getInvokeId();
USSDString ussdStrObj=此.mapProvider.getMAPParameterFactory().createUSSDString(
“USSD字符串:Hello World 1.余额2.剩余文本”);
CBSDataCodingScheme USSDatacodingScheme=新的CBSDataCodingSchemeImpl(0x0F);
MapDialogSupplemental dialog=procunReqind.getMAPDialog();
setUserObject(invokeId);
ISDNADDRESSTRING msisdn=此.mapProvider.getMAPParameterFactory().CreateISDNADDRESSTRING(
地址nature.international_number,NumberingPlan.ISDN,“9989301500000”);
addProcessUnstructuredSSRequest(ussdatacodingScheme,ussdStrObj,null,msisdn);
dialog.send();
}捕获(MAPE异常){
logger.error(“发送非结构化SSRequest时出错”,e);
}
}
@Override
        public void onProcessUnstructuredSSRequest(ProcessUnstructuredSSRequest procUnstrReqInd) {
                // TODO Auto-generated method stub
                try{
                        logger.info(String.format("onProcessUnstructuredSSRequestIndication for DialogId=%d. Ussd String=%s",
                        procUnstrReqInd.getMAPDialog().getLocalDialogId(), procUnstrReqInd.getUSSDString().getString(null)));
                        long invokeId = procUnstrReqInd.getInvokeId();

                        USSDString ussdStrObj = this.mapProvider.getMAPParameterFactory().createUSSDString(
                                        "USSD String : Hello World <CR> 1. Balance <CR> 2. Texts Remaining");
                        CBSDataCodingScheme ussdDataCodingScheme = new CBSDataCodingSchemeImpl(0x0F);
                        MAPDialogSupplementary dialog = procUnstrReqInd.getMAPDialog();

                        dialog.setUserObject(invokeId);

                        ISDNAddressString msisdn = this.mapProvider.getMAPParameterFactory().createISDNAddressString(
                                        AddressNature.international_number, NumberingPlan.ISDN, "998930150000");

                        dialog.addProcessUnstructuredSSRequest(ussdDataCodingScheme, ussdStrObj, null, msisdn);
                        dialog.send();
                } catch (MAPException e) {
                        logger.error("Error while sending UnstructuredSSRequest ", e);
                }
        }