当前位置: 首页>>代码示例>>Java>>正文


Java MAPDialogMobility类代码示例

本文整理汇总了Java中org.mobicents.protocols.ss7.map.api.service.mobility.MAPDialogMobility的典型用法代码示例。如果您正苦于以下问题:Java MAPDialogMobility类的具体用法?Java MAPDialogMobility怎么用?Java MAPDialogMobility使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


MAPDialogMobility类属于org.mobicents.protocols.ss7.map.api.service.mobility包,在下文中一共展示了MAPDialogMobility类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: closeCurrentDialog

import org.mobicents.protocols.ss7.map.api.service.mobility.MAPDialogMobility; //导入依赖的package包/类
@Override
public String closeCurrentDialog() {
    if (!isStarted)
        return "The tester is not started";
    if (this.sender != null)
        return "The tester is not in a manual mode";

    MAPDialogMobility curDialog = currentDialog;
    if (curDialog != null) {
        try {
            MAPUserAbortChoice choice = new MAPUserAbortChoiceImpl();
            choice.setUserSpecificReason();
            curDialog.abort(choice);
            this.doRemoveDialog();
            return "The current dialog has been closed";
        } catch (MAPException e) {
            this.doRemoveDialog();
            return "Exception when closing the current dialog: " + e.toString();
        }
    } else {
        return "No current dialog";
    }
}
 
开发者ID:RestComm,项目名称:phone-simulator,代码行数:24,代码来源:TestCheckImeiClientMan.java

示例2: performCheckImeiRequest

import org.mobicents.protocols.ss7.map.api.service.mobility.MAPDialogMobility; //导入依赖的package包/类
@Override
public String performCheckImeiRequest(String imei) {
    if (!isStarted)
        return "The tester is not started";

    if (this.sender != null)
        return "The tester is not in manual mode";

    MAPDialogMobility curDialog = currentDialog;
    if (curDialog != null)
        return "The current dialog exists. Finish it previousely";

    if (imei == null || imei.equals(""))
        return "Imei is empty";

    currentRequestDef = "";

    return doCheckImeiRequest(imei, true);
}
 
开发者ID:RestComm,项目名称:phone-simulator,代码行数:20,代码来源:TestCheckImeiClientMan.java

示例3: getState

import org.mobicents.protocols.ss7.map.api.service.mobility.MAPDialogMobility; //导入依赖的package包/类
@Override
public String getState() {
    StringBuilder sb = new StringBuilder();
    sb.append("<html>");
    sb.append(SOURCE_NAME);
    sb.append(": CurDialog=");
    MAPDialogMobility curDialog = currentDialog;
    if (curDialog != null)
        sb.append(curDialog.getLocalDialogId());
    else
        sb.append("No");
    sb.append("<br>Count: countCheckImeiReq-");
    sb.append(countCheckImeiReq);
    sb.append(", countCheckImeiResp-");
    sb.append(countCheckImeiResp);
    sb.append("</html>");
    return sb.toString();
}
 
开发者ID:RestComm,项目名称:phone-simulator,代码行数:19,代码来源:TestCheckImeiClientMan.java

示例4: closeCurrentDialog

import org.mobicents.protocols.ss7.map.api.service.mobility.MAPDialogMobility; //导入依赖的package包/类
@Override
public String closeCurrentDialog() {
    if (!isStarted)
        return "The tester is not started";

    MAPDialogMobility curDialog = currentDialog;
    if (curDialog != null) {
        try {
            MAPUserAbortChoice choice = new MAPUserAbortChoiceImpl();
            choice.setUserSpecificReason();
            curDialog.abort(choice);
            this.doRemoveDialog();
            return "The current dialog has been closed";
        } catch (MAPException e) {
            this.doRemoveDialog();
            return "Exception when closing the current dialog: " + e.toString();
        }
    } else {
        return "No current dialog";
    }
}
 
开发者ID:RestComm,项目名称:phone-simulator,代码行数:22,代码来源:TestCheckImeiServerMan.java

示例5: createNewDialog

import org.mobicents.protocols.ss7.map.api.service.mobility.MAPDialogMobility; //导入依赖的package包/类
public MAPDialogMobility createNewDialog(MAPApplicationContext appCntx, SccpAddress origAddress, AddressString origReference, SccpAddress destAddress,
        AddressString destReference, Long localTrId) throws MAPException {

    // We cannot create a dialog if the service is not activated
    if (!this.isActivated())
        throw new MAPException("Cannot create MAPDialogMobility because MAPServiceMobility is not activated");

    Dialog tcapDialog = this.createNewTCAPDialog(origAddress, destAddress, localTrId);
    MAPDialogMobilityImpl dialog = new MAPDialogMobilityImpl(appCntx, tcapDialog, this.mapProviderImpl, this,
            origReference, destReference);

    this.putMAPDialogIntoCollection(dialog);

    return dialog;
}
 
开发者ID:RestComm,项目名称:phone-simulator,代码行数:16,代码来源:MAPServiceMobilityImpl.java

示例6: onCheckImeiResponse

import org.mobicents.protocols.ss7.map.api.service.mobility.MAPDialogMobility; //导入依赖的package包/类
@Override
public void onCheckImeiResponse(CheckImeiResponse response) {
    if (!isStarted)
        return;

    this.countCheckImeiResp++;

    if (this.sender == null) {
        MAPDialogMobility curDialog = currentDialog;
        if (curDialog != response.getMAPDialog())
            return;

        currentRequestDef += "Rsvd CheckImeiResp=\"" + "equipmentStatus=" + response.getEquipmentStatus() + "\";";
    }

    long invokeId = response.getMAPDialog().getLocalDialogId();

    if (CheckImeiClientAction.VAL_MANUAL_OPERATION == this.testerHost.getConfigurationData().getTestCheckImeiClientConfigurationData().getCheckImeiClientAction().intValue()
            || !this.testerHost.getConfigurationData().getTestCheckImeiClientConfigurationData().isOneNotificationFor100Dialogs()) {

        String uData = this.createCheckImeiRespData(invokeId, response);
        this.testerHost.sendNotif(SOURCE_NAME, "Rcvd: CheckImeiResp: " + "equipmentStatus=" + response.getEquipmentStatus(), uData, Level.DEBUG);

    } else if (CheckImeiClientAction.VAL_AUTO_SendCheckImeiRequest == this.testerHost.getConfigurationData().getTestCheckImeiClientConfigurationData().getCheckImeiClientAction().intValue()
            && this.testerHost.getConfigurationData().getTestCheckImeiClientConfigurationData().isOneNotificationFor100Dialogs()) {

        if (countCheckImeiReq %100 == 0) {
            currentRequestDef += "Rcvd: CheckImeiResp: " + countCheckImeiResp + " messages received ("+countCheckImeiReq+" requests sent);";
            this.testerHost.sendNotif(SOURCE_NAME, "Rcvd: CheckImeiResp: " + countCheckImeiResp + " messages received("+countCheckImeiReq+" requests sent)", "", Level.DEBUG);
        }
    }
    this.doRemoveDialog();
}
 
开发者ID:RestComm,项目名称:phone-simulator,代码行数:34,代码来源:TestCheckImeiClientMan.java

示例7: onAnyTimeInterrogationResponse

import org.mobicents.protocols.ss7.map.api.service.mobility.MAPDialogMobility; //导入依赖的package包/类
@Override
public void onAnyTimeInterrogationResponse(AnyTimeInterrogationResponse ind) {
    if (!isStarted)
        return;

    this.countAtiResp++;

    MAPDialogMobility curDialog = ind.getMAPDialog();
    long invokeId = curDialog.getLocalDialogId();

    currentRequestDef += "Rsvd AtiResp;";
    String uData = this.createAtiRespData(invokeId, ind);
    this.testerHost.sendNotif(SOURCE_NAME, "Rcvd: atiResp", uData, Level.DEBUG);
}
 
开发者ID:RestComm,项目名称:phone-simulator,代码行数:15,代码来源:TestAtiClientMan.java

示例8: getMAPDialog

import org.mobicents.protocols.ss7.map.api.service.mobility.MAPDialogMobility; //导入依赖的package包/类
public MAPDialogMobility getMAPDialog() {
    MAPDialog mapDialog = super.getMAPDialog();
    return (MAPDialogMobility) mapDialog;
}
 
开发者ID:RestComm,项目名称:phone-simulator,代码行数:5,代码来源:ActivateTraceModeRequestImpl_Mobility.java

示例9: getMAPDialog

import org.mobicents.protocols.ss7.map.api.service.mobility.MAPDialogMobility; //导入依赖的package包/类
public MAPDialogMobility getMAPDialog() {
    return (MAPDialogMobility) super.getMAPDialog();
}
 
开发者ID:RestComm,项目名称:phone-simulator,代码行数:4,代码来源:MobilityMessageImpl.java

示例10: doCheckImeiRequest

import org.mobicents.protocols.ss7.map.api.service.mobility.MAPDialogMobility; //导入依赖的package包/类
private String doCheckImeiRequest(String imeiString, boolean manualMode) {

        MAPApplicationContextVersion mapAppCtxVersion;
        switch (this.testerHost.getConfigurationData().getTestCheckImeiClientConfigurationData().getMapProtocolVersion().intValue()) {
        case MapProtocolVersion.VAL_MAP_V1:
            mapAppCtxVersion = MAPApplicationContextVersion.version1;
            break;
        case MapProtocolVersion.VAL_MAP_V2:
            mapAppCtxVersion = MAPApplicationContextVersion.version2;
            break;
        default:
            mapAppCtxVersion = MAPApplicationContextVersion.version3;
            break;
        }
        MAPApplicationContext mapAppContext = MAPApplicationContext.getInstance(MAPApplicationContextName.equipmentMngtContext, mapAppCtxVersion);

        try {
            MAPProvider mapProvider = this.mapMan.getMAPStack().getMAPProvider();

            MAPDialogMobility dialog = mapProvider.getMAPServiceMobility().createNewDialog(mapAppContext,
                    this.mapMan.createOrigAddress(), null,
                    this.mapMan.createDestAddress(), null);

            if (manualMode)
                currentDialog = dialog;

            MAPParameterFactory mapParameterFactory = mapProvider.getMAPParameterFactory();

            IMEI imei = mapParameterFactory.createIMEI(imeiString);
            RequestedEquipmentInfo requestedEquipmentInfo = mapParameterFactory.createRequestedEquipmentInfo(true, false);
            MAPExtensionContainer extensionContainer = null;
            //MAPExtensionContainer extensionContainer = MAPExtensionContainerTest.GetTestExtensionContainer();

            dialog.addCheckImeiRequest(imei, requestedEquipmentInfo, extensionContainer);

            dialog.send();

            this.countCheckImeiReq++;

            if (manualMode || !this.testerHost.getConfigurationData().getTestCheckImeiClientConfigurationData().isOneNotificationFor100Dialogs()) {

                currentRequestDef += "Sent CheckImeiRequest: " + imei + ";";
                String data = createCheckImeiReqData(dialog.getLocalDialogId(), imeiString);
                this.testerHost.sendNotif(SOURCE_NAME, "Sent: CheckImeiRequest: " + imei, data, Level.DEBUG);

            } else if (!manualMode && this.testerHost.getConfigurationData().getTestCheckImeiClientConfigurationData().isOneNotificationFor100Dialogs()) {

                if (countCheckImeiReq %100 == 0) {
                    currentRequestDef += "Sent: CheckImeiRequest: " + countCheckImeiReq + " messages sent;";
                    this.testerHost.sendNotif(SOURCE_NAME, "Sent: CheckImeiRequest: " + countCheckImeiReq + " messages sent", "", Level.DEBUG);
                }
            }
            return "checkImeiRequest has been sent";
        } catch (MAPException ex) {
            return "Exception when sending CheckImeiRequest: " + ex.toString();
        }
    }
 
开发者ID:RestComm,项目名称:phone-simulator,代码行数:58,代码来源:TestCheckImeiClientMan.java

示例11: doAtiRequest

import org.mobicents.protocols.ss7.map.api.service.mobility.MAPDialogMobility; //导入依赖的package包/类
private String doAtiRequest(String address) {

        MAPProvider mapProvider = this.mapMan.getMAPStack().getMAPProvider();

        MAPApplicationContextName acn = MAPApplicationContextName.anyTimeEnquiryContext;
        MAPApplicationContextVersion vers = MAPApplicationContextVersion.version3;
        MAPApplicationContext mapAppContext = MAPApplicationContext.getInstance(acn, vers);

        SubscriberIdentity subscriberIdentity;
        if (this.testerHost.getConfigurationData().getTestAtiClientConfigurationData().isSubscriberIdentityTypeIsImsi()) {
            IMSI imsi = mapProvider.getMAPParameterFactory().createIMSI(address);
            subscriberIdentity = mapProvider.getMAPParameterFactory().createSubscriberIdentity(imsi);
        } else {
            ISDNAddressString msisdn = mapProvider.getMAPParameterFactory().createISDNAddressString(
                    this.testerHost.getConfigurationData().getTestAtiClientConfigurationData().getAddressNature(),
                    this.testerHost.getConfigurationData().getTestAtiClientConfigurationData().getNumberingPlan(), address);
            subscriberIdentity = mapProvider.getMAPParameterFactory().createSubscriberIdentity(msisdn);
        }
        RequestedInfo requestedInfo = mapProvider.getMAPParameterFactory().createRequestedInfo(
                this.testerHost.getConfigurationData().getTestAtiClientConfigurationData().isGetLocationInformation(),
                this.testerHost.getConfigurationData().getTestAtiClientConfigurationData().isGetSubscriberState(), null,
                this.testerHost.getConfigurationData().getTestAtiClientConfigurationData().isGetCurrentLocation(),
                this.testerHost.getConfigurationData().getTestAtiClientConfigurationData().getGetRequestedDomain(),
                this.testerHost.getConfigurationData().getTestAtiClientConfigurationData().isGetImei(),
                this.testerHost.getConfigurationData().getTestAtiClientConfigurationData().isGetMsClassmark(),
                this.testerHost.getConfigurationData().getTestAtiClientConfigurationData().isGetMnpRequestedInfo());
        ISDNAddressString gsmSCFAddress = mapProvider.getMAPParameterFactory().createISDNAddressString(
                this.testerHost.getConfigurationData().getTestAtiClientConfigurationData().getAddressNature(),
                this.testerHost.getConfigurationData().getTestAtiClientConfigurationData().getNumberingPlan(),
                this.testerHost.getConfigurationData().getTestAtiClientConfigurationData().getGsmScfAddress());

        try {
            MAPDialogMobility curDialog = mapProvider.getMAPServiceMobility().createNewDialog(mapAppContext, this.mapMan.createOrigAddress(), null,
                    this.mapMan.createDestAddress(address, this.testerHost.getConfigurationData().getTestSmsServerConfigurationData().getHlrSsn()), null);

            curDialog.addAnyTimeInterrogationRequest(subscriberIdentity, requestedInfo, gsmSCFAddress, null);
            curDialog.send();

            String mtData = createAtiReqData(curDialog.getLocalDialogId(), address);
            currentRequestDef += "Sent AtiRequest;";
            this.countAtiReq++;
            this.testerHost.sendNotif(SOURCE_NAME, "Sent: AtiRequest: " + address, mtData, Level.DEBUG);

            return "AtiRequest has been sent";
        } catch (MAPException ex) {
            return "Exception when sending AtiRequest: " + ex.toString();
        }
    }
 
开发者ID:RestComm,项目名称:phone-simulator,代码行数:49,代码来源:TestAtiClientMan.java

示例12: onAnyTimeInterrogationRequest

import org.mobicents.protocols.ss7.map.api.service.mobility.MAPDialogMobility; //导入依赖的package包/类
public void onAnyTimeInterrogationRequest(AnyTimeInterrogationRequest atir) {
    logger.debug("[[[[[[[[[[    onAnyTimeInterrogationRequest      ]]]]]]]]]]");
    
    try {
        
        MAPDialogMobility curDialog = atir.getMAPDialog();
        long invokeId = curDialog.getLocalDialogId();
        
        ISDNAddressString vlrNumber = mapProvider.getMAPParameterFactory().createISDNAddressString(AddressNature.international_number, NumberingPlan.ISDN, HP_VLR_NUMBER);
        LocationNumberMap locationNumber = null;
        LSAIdentity selectedLSAId = null;
        ISDNAddressString mscNumber = null;
        LocationInformationEPS locationInformationEPS = null;
        UserCSGInformation userCSGInformation = null;

        int mcc = HP_MCC;
        int mnc = HP_MNC;
        int lac = HP_LAC;
        int cellId = HP_CELLID;
        int ageOfLocationInformation = HP_AGE_OF_LOCATION;
        GeographicalInformation geographicalInformation = mapProvider.getMAPParameterFactory().createGeographicalInformation(HP_GEO_INFO_d, HP_GEO_INFO_d1, HP_GEO_INFO_d2);
        boolean saiPresent = false;
        GeodeticInformation geodeticInformation = null;
        boolean currentLocationRetrieved = false;
        
        CellGlobalIdOrServiceAreaIdFixedLength cellGlobalIdOrServiceAreaIdFixedLength = mapProvider.getMAPParameterFactory()
                .createCellGlobalIdOrServiceAreaIdFixedLength(mcc, mnc, lac, cellId);
        CellGlobalIdOrServiceAreaIdOrLAI cellGlobalIdOrServiceAreaIdOrLAI = mapProvider.getMAPParameterFactory().createCellGlobalIdOrServiceAreaIdOrLAI(
                cellGlobalIdOrServiceAreaIdFixedLength);
        LocationInformation li = mapProvider.getMAPParameterFactory().createLocationInformation(ageOfLocationInformation, geographicalInformation,
                vlrNumber, locationNumber, cellGlobalIdOrServiceAreaIdOrLAI, null, selectedLSAId, mscNumber, geodeticInformation,
                currentLocationRetrieved, saiPresent, locationInformationEPS, userCSGInformation);

        SubscriberState ss = this.mapProvider.getMAPParameterFactory().createSubscriberState(SubscriberStateChoice.netDetNotReachable, NotReachableReason.imsiDetached);
        
        SubscriberInfo si = this.mapProvider.getMAPParameterFactory().createSubscriberInfo(li, ss, null, null, null, null, null, null, null);
        
        // clamp InvokeID
        if (invokeId > 127) { invokeId = 127; }
        if (invokeId < -128) { invokeId = -128; }
        
        curDialog.addAnyTimeInterrogationResponse(invokeId, si, null);          
        
    } catch (MAPException e) {
        logger.error("Error while sending SendRoutingInfoForSMResponse ", e);
    }
}
 
开发者ID:P1sec,项目名称:SigFW,代码行数:48,代码来源:SS7Honeypot.java

示例13: onProvideSubscriberInfoRequest

import org.mobicents.protocols.ss7.map.api.service.mobility.MAPDialogMobility; //导入依赖的package包/类
public void onProvideSubscriberInfoRequest(ProvideSubscriberInfoRequest psir) {
    logger.debug("[[[[[[[[[[    onProvideSubscriberInfoRequest      ]]]]]]]]]]");
    
    try {
        
        MAPDialogMobility curDialog = psir.getMAPDialog();
        long invokeId = curDialog.getLocalDialogId();
        
        ISDNAddressString vlrNumber = mapProvider.getMAPParameterFactory().createISDNAddressString(AddressNature.international_number, NumberingPlan.ISDN, "5555555666");
        LocationNumberMap locationNumber = null;
        LSAIdentity selectedLSAId = null;
        ISDNAddressString mscNumber = null;
        LocationInformationEPS locationInformationEPS = null;
        UserCSGInformation userCSGInformation = null;

        int mcc = HP_MCC;
        int mnc = HP_MNC;
        int lac = HP_LAC;
        int cellId = HP_CELLID;
        int ageOfLocationInformation = HP_AGE_OF_LOCATION;
        GeographicalInformation geographicalInformation = mapProvider.getMAPParameterFactory().createGeographicalInformation(HP_GEO_INFO_d, HP_GEO_INFO_d1, HP_GEO_INFO_d2);
        boolean saiPresent = false;
        GeodeticInformation geodeticInformation = null;
        boolean currentLocationRetrieved = false;
        
        CellGlobalIdOrServiceAreaIdFixedLength cellGlobalIdOrServiceAreaIdFixedLength = mapProvider.getMAPParameterFactory()
                .createCellGlobalIdOrServiceAreaIdFixedLength(mcc, mnc, lac, cellId);
        CellGlobalIdOrServiceAreaIdOrLAI cellGlobalIdOrServiceAreaIdOrLAI = mapProvider.getMAPParameterFactory().createCellGlobalIdOrServiceAreaIdOrLAI(
                cellGlobalIdOrServiceAreaIdFixedLength);
        LocationInformation li = mapProvider.getMAPParameterFactory().createLocationInformation(ageOfLocationInformation, geographicalInformation,
                vlrNumber, locationNumber, cellGlobalIdOrServiceAreaIdOrLAI, null, selectedLSAId, mscNumber, geodeticInformation,
                currentLocationRetrieved, saiPresent, locationInformationEPS, userCSGInformation);

        SubscriberState ss = this.mapProvider.getMAPParameterFactory().createSubscriberState(SubscriberStateChoice.netDetNotReachable, NotReachableReason.imsiDetached);
        
        SubscriberInfo si = this.mapProvider.getMAPParameterFactory().createSubscriberInfo(li, ss, null, null, null, null, null, null, null);
        
        // clamp InvokeID
        if (invokeId > 127) { invokeId = 127; }
        if (invokeId < -128) { invokeId = -128; }
        
        curDialog.addProvideSubscriberInfoResponse(invokeId, si, null);          
        
    } catch (MAPException e) {
        logger.error("Error while sending SendRoutingInfoForSMResponse ", e);
    }
}
 
开发者ID:P1sec,项目名称:SigFW,代码行数:48,代码来源:SS7Honeypot.java

示例14: onProvideSubscriberInfoRequest

import org.mobicents.protocols.ss7.map.api.service.mobility.MAPDialogMobility; //导入依赖的package包/类
@Override
public void onProvideSubscriberInfoRequest(ProvideSubscriberInfoRequest provideSubscriberInfoRequest) {
    try{

        long invokeId = provideSubscriberInfoRequest.getInvokeId();

        //Creating Subscriber Information
        //cs domain info
        double Lat = 29.13;
        double Long = 31.56;
        double Uncertain = 10.123;

        //more accurate info from ps domain
        double Lat_ps = 28.113;
        double Long_ps = 32.568;
        double Uncertain_ps = 2.12;

        int mcc = 602;
        int mnc = 03;
        int LAC = 1234;
        int CI = 5678;

        GeographicalInformation geographicalInformation = this.mapProvider.getMAPParameterFactory()
                .createGeographicalInformation(Lat,Long,Uncertain);

        CellGlobalIdOrServiceAreaIdFixedLength cellGlobalIdOrServiceAreaIdFixedLength =
                this.mapProvider.getMAPParameterFactory().createCellGlobalIdOrServiceAreaIdFixedLength(mcc,mnc,LAC,CI);
        CellGlobalIdOrServiceAreaIdOrLAI cellGlobalIdOrServiceAreaIdOrLAI = this.mapProvider
                .getMAPParameterFactory().createCellGlobalIdOrServiceAreaIdOrLAI(cellGlobalIdOrServiceAreaIdFixedLength);

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

        LocationInformation locationInformation = this.mapProvider.getMAPParameterFactory()
                .createLocationInformation(30,geographicalInformation,Vmsc,null,cellGlobalIdOrServiceAreaIdOrLAI
                        ,null,null,null,null,false,false,null,null);

        IMEI imei = this.mapProvider.getMAPParameterFactory().createIMEI("35209900176148");

        SubscriberState subscriberState = this.mapProvider.getMAPParameterFactory()
                .createSubscriberState(SubscriberStateChoice.assumedIdle,null);

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

        GeographicalInformation geographicalInformation_ps = this.mapProvider.getMAPParameterFactory()
                .createGeographicalInformation(Lat_ps,Long_ps,Uncertain_ps);

        RAIdentity raIdentity = this.mapProvider.getMAPParameterFactory().createRAIdentity(new byte[] {(byte) 0x06,(byte)0x0020, (byte) 0x3, (byte) 0x40,
                (byte)0x2d, (byte) 0x21});

        LocationInformationGPRS locationInformationGPRS = this.mapProvider.getMAPParameterFactory().
                createLocationInformationGPRS(null,raIdentity,geographicalInformation_ps,sgsn,null,null,false,null,
                        true,30);

        SubscriberInfo subscriberInfo = this.mapProvider.getMAPParameterFactory()
                .createSubscriberInfo(locationInformation,subscriberState,null,locationInformationGPRS,null,imei,null,
                        null,null);

        MAPDialogMobility mapDialogMobility = provideSubscriberInfoRequest.getMAPDialog();

        mapDialogMobility.setUserObject(invokeId);
        mapDialogMobility.addProvideSubscriberInfoResponse(invokeId,subscriberInfo,null);

        mapDialogMobility.send();

        logger.info("Subscriber Information Sent.....");

    } catch (MAPException e){
        e.printStackTrace();
    }


}
 
开发者ID:SigPloiter,项目名称:SigPloit,代码行数:75,代码来源:ProvideSubscriberInformationResp.java

示例15: onAnyTimeInterrogationRequest

import org.mobicents.protocols.ss7.map.api.service.mobility.MAPDialogMobility; //导入依赖的package包/类
@Override
public void onAnyTimeInterrogationRequest(AnyTimeInterrogationRequest anyTimeInterrogationRequest) {
    try{

        long invokeId = anyTimeInterrogationRequest.getInvokeId();

        //Creating Subscriber Information
        //cs domain info
        double Lat = 29.13;
        double Long = 31.56;
        double Uncertain = 10.123;

        //more accurate info from ps domain
        double Lat_ps = 28.113;
        double Long_ps = 32.568;
        double Uncertain_ps = 2.12;

        int mcc = 419;
        int mnc = 02;
        int LAC = 1234;
        int CI = 5678;

        GeographicalInformation geographicalInformation = this.mapProvider.getMAPParameterFactory()
                .createGeographicalInformation(Lat,Long,Uncertain);

        CellGlobalIdOrServiceAreaIdFixedLength cellGlobalIdOrServiceAreaIdFixedLength =
                this.mapProvider.getMAPParameterFactory().createCellGlobalIdOrServiceAreaIdFixedLength(mcc,mnc,LAC,CI);
        CellGlobalIdOrServiceAreaIdOrLAI cellGlobalIdOrServiceAreaIdOrLAI = this.mapProvider
                .getMAPParameterFactory().createCellGlobalIdOrServiceAreaIdOrLAI(cellGlobalIdOrServiceAreaIdFixedLength);

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

        LocationInformation locationInformation = this.mapProvider.getMAPParameterFactory()
                .createLocationInformation(30,geographicalInformation,Vmsc,null,cellGlobalIdOrServiceAreaIdOrLAI
                        ,null,null,null,null,true,false,null,null);

        IMEI imei = this.mapProvider.getMAPParameterFactory().createIMEI("35209900176148");

        SubscriberState subscriberState = this.mapProvider.getMAPParameterFactory()
                .createSubscriberState(SubscriberStateChoice.assumedIdle,null);

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

        GeographicalInformation geographicalInformation_ps = this.mapProvider.getMAPParameterFactory()
                .createGeographicalInformation(Lat_ps,Long_ps,Uncertain_ps);


        LocationInformationGPRS locationInformationGPRS = this.mapProvider.getMAPParameterFactory().
                createLocationInformationGPRS(null,null,geographicalInformation_ps,sgsn,null,null,false,null,
                        true,30);

        SubscriberInfo subscriberInfo = this.mapProvider.getMAPParameterFactory()
                .createSubscriberInfo(locationInformation,subscriberState,null,locationInformationGPRS,null,imei,null,
                        null,null);

        MAPDialogMobility mapDialogMobility = anyTimeInterrogationRequest.getMAPDialog();

        mapDialogMobility.setUserObject(invokeId);
        mapDialogMobility.addAnyTimeInterrogationResponse(invokeId,subscriberInfo,null);

        mapDialogMobility.send();

        logger.info("Subscriber Information Sent.....");

    } catch (MAPException e){
        e.printStackTrace();
    }

}
 
开发者ID:SigPloiter,项目名称:SigPloit,代码行数:72,代码来源:AnyTimeInterrogationResp.java


注:本文中的org.mobicents.protocols.ss7.map.api.service.mobility.MAPDialogMobility类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。