Java Code Examples for org.mobicents.protocols.ss7.map.api.service.mobility.MAPDialogMobility#send()
The following examples show how to use
org.mobicents.protocols.ss7.map.api.service.mobility.MAPDialogMobility#send() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ProvideSubscriberInformationResp.java From SigPloit with MIT License | 4 votes |
@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(); } }
Example 2
Source File: AnyTimeInterrogationResp.java From SigPloit with MIT License | 4 votes |
@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(); } }
Example 3
Source File: UpdateLocationResp.java From SigPloit with MIT License | 4 votes |
@Override public void onUpdateLocationRequest(UpdateLocationRequest updateLocationRequest) { try { long invokeIdU = updateLocationRequest.getInvokeId(); ISDNAddressString MscFake = updateLocationRequest.getMscNumber(); ISDNAddressString VlrFake = updateLocationRequest.getVlrNumber(); IMSI TargetImsi = updateLocationRequest.getImsi(); Category category = this.mapProvider.getMAPParameterFactory().createCategory(5); ArrayList<ExtBearerServiceCode> bearerServiceList = new ArrayList<ExtBearerServiceCode>(); ExtBearerServiceCode extBearerServiceCode = this.mapProvider.getMAPParameterFactory() .createExtBearerServiceCode(BearerServiceCodeValue.padAccessCA_9600bps); bearerServiceList.add(extBearerServiceCode); boolean roamingResttrictionDueToUnsupportedFeature = false; ISDNAddressString sgsnNumber = this.mapProvider.getMAPParameterFactory(). createISDNAddressString(AddressNature.international_number,NumberingPlan.ISDN,"201022222222"); SSCode ssCode = this.mapProvider.getMAPParameterFactory().createSSCode(SupplementaryCodeValue.allForwardingSS); //ArrayList<ExtSSInfo> provisionedSS = logger.info("New Fake MSC/VLR: "+ MscFake); logger.info("Victim IMSI: "+ TargetImsi); ISDNAddressString msisdn = this.mapProvider.getMAPParameterFactory().createISDNAddressString( AddressNature.international_number, NumberingPlan.ISDN, "2010789123456"); GlobalTitle0100 GtHlr = this.sccpProvider.getParameterFactory().createGlobalTitle( "201012345678",0, org.mobicents.protocols.ss7.indicator.NumberingPlan.ISDN_TELEPHONY,null, NatureOfAddress.INTERNATIONAL); GlobalTitle0100 GtMsc = this.sccpProvider.getParameterFactory(). createGlobalTitle("96512345678",0, org.mobicents.protocols.ss7.indicator.NumberingPlan.ISDN_TELEPHONY,null,NatureOfAddress.INTERNATIONAL); SccpAddress callingParty = this.sccpStack.getSccpProvider().getParameterFactory(). createSccpAddress(RoutingIndicator.ROUTING_BASED_ON_GLOBAL_TITLE,GtHlr,SERVER_SPC,SSN_Server); SccpAddress calledParty = this.sccpStack.getSccpProvider().getParameterFactory() .createSccpAddress(RoutingIndicator.ROUTING_BASED_ON_GLOBAL_TITLE,GtMsc,CLIENT_SPC,SSN_Client); MAPDialogMobility dialogMobility = this.mapProvider.getMAPServiceMobility().createNewDialog( MAPApplicationContext.getInstance(MAPApplicationContextName.subscriberDataMngtContext,MAPApplicationContextVersion.version3), callingParty,null,calledParty,null); dialogMobility.addInsertSubscriberDataRequest(TargetImsi,msisdn,category,SubscriberStatus.serviceGranted,null,null,null,null, false,null,null,null,null,null,null,null,false,null,null,false,null,15,null,null, null,null,null,null,false,null,null,false,sgsnNumber,null,null,false,false,null); dialogMobility.send(); logger.info("InsertSubscriberDataRequest Message Sent...."); } catch (MAPException e){ e.printStackTrace(); } }