org.mobicents.protocols.ss7.map.api.primitives.ISDNAddressString Java Examples

The following examples show how to use org.mobicents.protocols.ss7.map.api.primitives.ISDNAddressString. 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: SS7Honeypot.java    From SigFW with GNU Affero General Public License v3.0 5 votes vote down vote up
private void initiateUSSD() throws MAPException {
    logger.debug("[[[[[[[[[[    initiateUSSD      ]]]]]]]]]]");

    //SccpAddress callingParty = this.sccpStack.getSccpProvider().getParameterFactory().createSccpAddress(RoutingIndicator.ROUTING_BASED_ON_GLOBAL_TITLE, null, 1, SSN);
    //SccpAddress calledParty = this.sccpStack.getSccpProvider().getParameterFactory().createSccpAddress(RoutingIndicator.ROUTING_BASED_ON_GLOBAL_TITLE, null, 2, SSN);
    
    GlobalTitle callingGT = this.sccpProvider.getParameterFactory().createGlobalTitle("111111111111", 0, org.mobicents.protocols.ss7.indicator.NumberingPlan.ISDN_TELEPHONY, null, NatureOfAddress.INTERNATIONAL);
    GlobalTitle calledGT = this.sccpProvider.getParameterFactory().createGlobalTitle("222222222222", 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, callingGT, SERVER_SPC, 8);
    SccpAddress calledParty = this.sccpStack.getSccpProvider().getParameterFactory().createSccpAddress(RoutingIndicator.ROUTING_BASED_ON_GLOBAL_TITLE, calledGT, CLIENT_SPC, 8);
        
    
    ISDNAddressString origReference = this.mapProvider.getMAPParameterFactory().createISDNAddressString(AddressNature.international_number, NumberingPlan.land_mobile, "11111111111");
    ISDNAddressString destReference = this.mapProvider.getMAPParameterFactory().createISDNAddressString(AddressNature.international_number, NumberingPlan.land_mobile, "111111111111111");
    
    // First create Dialog
    MAPDialogSupplementary mapDialog = this.mapProvider.getMAPServiceSupplementary().createNewDialog(
            MAPApplicationContext.getInstance(MAPApplicationContextName.networkUnstructuredSsContext,
                    MAPApplicationContextVersion.version2), callingParty, origReference, calledParty, destReference);

    CBSDataCodingSchemeImpl ussdDataCodingScheme = new CBSDataCodingSchemeImpl(0x0F);

    // USSD String: *111*+11111111111#
    // The Charset is null, here we let system use default Charset (UTF-7 as
    // explained in GSM 03.38. However if MAP User wants, it can set its own
    // impl of Charset
    USSDString ussdString = this.mapProvider.getMAPParameterFactory().createUSSDString("*111*+11111111111#", ussdDataCodingScheme, null);

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

    mapDialog.addProcessUnstructuredSSRequest(ussdDataCodingScheme, ussdString, null, msisdn);

    // This will initiate the TC-BEGIN with INVOKE component
    mapDialog.send();
}
 
Example #2
Source File: SS7Honeypot.java    From SigFW with GNU Affero General Public License v3.0 5 votes vote down vote up
public void onSendRoutingInfoForSMRequest(SendRoutingInfoForSMRequest srfsmr) {
    logger.debug("[[[[[[[[[[    onSendRoutingInfoForSMRequest      ]]]]]]]]]]");
    
    try {
        
        MAPDialogSms curDialog = srfsmr.getMAPDialog();
        long invokeId = curDialog.getLocalDialogId();
        
        IMSI imsi = this.mapProvider.getMAPParameterFactory().createIMSI("123499900000001");
        
        /*ArrayList<MAPPrivateExtension> al = new ArrayList<MAPPrivateExtension>();
        al.add(this.mapProvider.getMAPParameterFactory().createMAPPrivateExtension(new long[] { 1, 2, 3, 4 }, new byte[] { 11, 12, 13, 14, 15 }));
        al.add(this.mapProvider.getMAPParameterFactory().createMAPPrivateExtension(new long[] { 1, 2, 3, 6 }, null));
        al.add(this.mapProvider.getMAPParameterFactory().createMAPPrivateExtension(new long[] { 1, 2, 3, 5 }, new byte[] { 21, 22, 23, 24, 25, 26 }));
        MAPExtensionContainer cnt = this.mapProvider.getMAPParameterFactory().createMAPExtensionContainer(al, new byte[] { 31, 32, 33 });
        */
        ISDNAddressString networkNodeNumber = this.mapProvider.getMAPParameterFactory().createISDNAddressString(AddressNature.international_number, NumberingPlan.ISDN, "11111111111");
        LocationInfoWithLMSI lwlms = this.mapProvider.getMAPParameterFactory().createLocationInfoWithLMSI(networkNodeNumber, null, null, false, null);
        
        // clamp InvokeID
        if (invokeId > 127) { invokeId = 127; }
        if (invokeId < -128) { invokeId = -128; }
        
        curDialog.addSendRoutingInfoForSMResponse(invokeId, imsi, lwlms, null /*cnt*/, Boolean.FALSE, null);

    } catch (MAPException e) {
        logger.error("Error while sending SendRoutingInfoForSMResponse ", e);
    }
    
}
 
Example #3
Source File: SS7Client.java    From SigFW with GNU Affero General Public License v3.0 5 votes vote down vote up
private void initiateUSSD() throws MAPException {

        //SccpAddress callingParty = this.sccpStack.getSccpProvider().getParameterFactory().createSccpAddress(RoutingIndicator.ROUTING_BASED_ON_GLOBAL_TITLE, null, 1, SSN);
        //SccpAddress calledParty = this.sccpStack.getSccpProvider().getParameterFactory().createSccpAddress(RoutingIndicator.ROUTING_BASED_ON_GLOBAL_TITLE, null, 2, SSN);
        
        GlobalTitle callingGT = this.sccpProvider.getParameterFactory().createGlobalTitle("111111111111", 0, org.mobicents.protocols.ss7.indicator.NumberingPlan.ISDN_TELEPHONY, null, NatureOfAddress.INTERNATIONAL);
        GlobalTitle calledGT = this.sccpProvider.getParameterFactory().createGlobalTitle("222222222222", 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, callingGT, CLIENT_SPC, 8);
        SccpAddress calledParty = this.sccpStack.getSccpProvider().getParameterFactory().createSccpAddress(RoutingIndicator.ROUTING_BASED_ON_GLOBAL_TITLE, calledGT, SERVER_SPC, 8);
            
        
        ISDNAddressString origReference = this.mapProvider.getMAPParameterFactory().createISDNAddressString(AddressNature.international_number, NumberingPlan.land_mobile, "11111111111");
        ISDNAddressString destReference = this.mapProvider.getMAPParameterFactory().createISDNAddressString(AddressNature.international_number, NumberingPlan.land_mobile, "111111111111111");
        
        // First create Dialog
        MAPDialogSupplementary mapDialog = this.mapProvider.getMAPServiceSupplementary().createNewDialog(
                MAPApplicationContext.getInstance(MAPApplicationContextName.networkUnstructuredSsContext,
                        MAPApplicationContextVersion.version2), callingParty, origReference, calledParty, destReference);

        CBSDataCodingSchemeImpl ussdDataCodingScheme = new CBSDataCodingSchemeImpl(0x0F);

        // USSD String: *111*+11111111111#
        // The Charset is null, here we let system use default Charset (UTF-7 as
        // explained in GSM 03.38. However if MAP User wants, it can set its own
        // impl of Charset
        USSDString ussdString = this.mapProvider.getMAPParameterFactory().createUSSDString("*111*+11111111111#", ussdDataCodingScheme, null);

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

        mapDialog.addProcessUnstructuredSSRequest(ussdDataCodingScheme, ussdString, null, msisdn);

        // This will initiate the TC-BEGIN with INVOKE component
        mapDialog.send();
    }
 
Example #4
Source File: SS7ClientLiveInput.java    From SigFW with GNU Affero General Public License v3.0 5 votes vote down vote up
private void initiateUSSD() throws MAPException {

        //SccpAddress callingParty = this.sccpStack.getSccpProvider().getParameterFactory().createSccpAddress(RoutingIndicator.ROUTING_BASED_ON_GLOBAL_TITLE, null, 1, SSN);
        //SccpAddress calledParty = this.sccpStack.getSccpProvider().getParameterFactory().createSccpAddress(RoutingIndicator.ROUTING_BASED_ON_GLOBAL_TITLE, null, 2, SSN);
        
        GlobalTitle callingGT = this.sccpProvider.getParameterFactory().createGlobalTitle("111111111111", 0, org.mobicents.protocols.ss7.indicator.NumberingPlan.ISDN_TELEPHONY, null, NatureOfAddress.INTERNATIONAL);
        GlobalTitle calledGT = this.sccpProvider.getParameterFactory().createGlobalTitle("222222222222", 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, callingGT, CLIENT_SPC, 8);
        SccpAddress calledParty = this.sccpStack.getSccpProvider().getParameterFactory().createSccpAddress(RoutingIndicator.ROUTING_BASED_ON_GLOBAL_TITLE, calledGT, SERVER_SPC, 8);
            
        
        ISDNAddressString origReference = this.mapProvider.getMAPParameterFactory().createISDNAddressString(AddressNature.international_number, NumberingPlan.land_mobile, "11111111111");
        ISDNAddressString destReference = this.mapProvider.getMAPParameterFactory().createISDNAddressString(AddressNature.international_number, NumberingPlan.land_mobile, "111111111111111");
        
        // First create Dialog
        MAPDialogSupplementary mapDialog = this.mapProvider.getMAPServiceSupplementary().createNewDialog(
                MAPApplicationContext.getInstance(MAPApplicationContextName.networkUnstructuredSsContext,
                        MAPApplicationContextVersion.version2), callingParty, origReference, calledParty, destReference);

        CBSDataCodingSchemeImpl ussdDataCodingScheme = new CBSDataCodingSchemeImpl(0x0F);

        // USSD String: *111*+11111111111#
        // The Charset is null, here we let system use default Charset (UTF-7 as
        // explained in GSM 03.38. However if MAP User wants, it can set its own
        // impl of Charset
        USSDString ussdString = this.mapProvider.getMAPParameterFactory().createUSSDString("*111*+11111111111#", ussdDataCodingScheme, null);

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

        mapDialog.addProcessUnstructuredSSRequest(ussdDataCodingScheme, ussdString, null, msisdn);

        // This will initiate the TC-BEGIN with INVOKE component
        mapDialog.send();
    }
 
Example #5
Source File: SS7Server.java    From SigFW with GNU Affero General Public License v3.0 5 votes vote down vote up
private void initiateUSSD() throws MAPException {
    logger.debug("[[[[[[[[[[    initiateUSSD      ]]]]]]]]]]");

    //SccpAddress callingParty = this.sccpStack.getSccpProvider().getParameterFactory().createSccpAddress(RoutingIndicator.ROUTING_BASED_ON_GLOBAL_TITLE, null, 1, SSN);
    //SccpAddress calledParty = this.sccpStack.getSccpProvider().getParameterFactory().createSccpAddress(RoutingIndicator.ROUTING_BASED_ON_GLOBAL_TITLE, null, 2, SSN);
    
    GlobalTitle callingGT = this.sccpProvider.getParameterFactory().createGlobalTitle("111111111111", 0, org.mobicents.protocols.ss7.indicator.NumberingPlan.ISDN_TELEPHONY, null, NatureOfAddress.INTERNATIONAL);
    GlobalTitle calledGT = this.sccpProvider.getParameterFactory().createGlobalTitle("222222222222", 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, callingGT, SERVER_SPC, 8);
    SccpAddress calledParty = this.sccpStack.getSccpProvider().getParameterFactory().createSccpAddress(RoutingIndicator.ROUTING_BASED_ON_GLOBAL_TITLE, calledGT, CLIENT_SPC, 8);
        
    
    ISDNAddressString origReference = this.mapProvider.getMAPParameterFactory().createISDNAddressString(AddressNature.international_number, NumberingPlan.land_mobile, "11111111111");
    ISDNAddressString destReference = this.mapProvider.getMAPParameterFactory().createISDNAddressString(AddressNature.international_number, NumberingPlan.land_mobile, "111111111111111");
    
    // First create Dialog
    MAPDialogSupplementary mapDialog = this.mapProvider.getMAPServiceSupplementary().createNewDialog(
            MAPApplicationContext.getInstance(MAPApplicationContextName.networkUnstructuredSsContext,
                    MAPApplicationContextVersion.version2), callingParty, origReference, calledParty, destReference);

    CBSDataCodingSchemeImpl ussdDataCodingScheme = new CBSDataCodingSchemeImpl(0x0F);

    // USSD String: *111*+11111111111#
    // The Charset is null, here we let system use default Charset (UTF-7 as
    // explained in GSM 03.38. However if MAP User wants, it can set its own
    // impl of Charset
    USSDString ussdString = this.mapProvider.getMAPParameterFactory().createUSSDString("*111*+11111111111#", ussdDataCodingScheme, null);

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

    mapDialog.addProcessUnstructuredSSRequest(ussdDataCodingScheme, ussdString, null, msisdn);

    // This will initiate the TC-BEGIN with INVOKE component
    mapDialog.send();
}
 
Example #6
Source File: GMLCCDRState.java    From gmlc with GNU Affero General Public License v3.0 5 votes vote down vote up
public void init(final Long dialogId, final AddressString destRef, final AddressString origRef, final ISDNAddressString isdnAddressString,
                 final SccpAddress localAddress, final SccpAddress remoteAddress) {
  this.localDialogId = dialogId;
  this.destReference = destRef;
  this.origReference = origRef;
  this.isdnAddressString = isdnAddressString;
  this.localAddress = localAddress;
  this.remoteAddress = remoteAddress;
  // This should be enough to be unique
  this.id = UUID.randomUUID().toString();
  this.initiated = true;
  this.dialogStartTime = null;
  this.dialogEndTime = null;
  this.dialogDuration =null;
}
 
Example #7
Source File: GMLCCDRState.java    From gmlc with GNU Affero General Public License v3.0 5 votes vote down vote up
public void init(String id, boolean initiated, boolean generated, AddressString origReference, AddressString destReference,
                 IMSI imsi, AddressString vlrAddress, ISDNAddressString isdnAddressString,
                 SccpAddress localAddress, SccpAddress remoteAddress, Long localDialogId, Long remoteDialogId,
                 DateTime dialogStartTime, DateTime dialogEndTime, Long dialogDuration, RecordStatus recordStatus,
                 int ci, int lac, int mcc, int mnc, int aol, String atiVlrGt, String subscriberState) {
  // This should be enough to be unique
  this.id = UUID.randomUUID().toString();
  this.initiated = true;
  this.generated = generated;
  this.origReference = origReference;
  this.destReference = destReference;
  this.imsi = imsi;
  this.vlrAddress = vlrAddress;
  this.isdnAddressString = isdnAddressString;
  this.localAddress = localAddress;
  this.remoteAddress = remoteAddress;
  this.localDialogId = localDialogId;
  this.remoteDialogId = remoteDialogId;
  this.dialogStartTime = null;
  this.dialogEndTime = null;
  this.dialogDuration = null;
  this.recordStatus = recordStatus;
  this.ci = ci;
  this.lac = lac;
  this.mcc = mcc;
  this.mnc = mnc;
  this.aol = aol;
  this.atiVlrGt = atiVlrGt;
  this.subscriberState = subscriberState;
}
 
Example #8
Source File: SS7Honeypot.java    From SigFW with GNU Affero General Public License v3.0 4 votes vote down vote up
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);
    }
}
 
Example #9
Source File: SS7Honeypot.java    From SigFW with GNU Affero General Public License v3.0 4 votes vote down vote up
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);
    }
}
 
Example #10
Source File: SriSMResp.java    From SigPloit with MIT License 4 votes vote down vote up
@Override
public void onSendRoutingInfoForSMRequest(SendRoutingInfoForSMRequest sendRoutingInfoForSMRequest) {
    try {
        long invokeId = sendRoutingInfoForSMRequest.getInvokeId();

 //Add the MSC number that is serving the user
        ISDNAddressString msc = this.mapProvider.getMAPParameterFactory().createISDNAddressString
            (AddressNature.international_number, NumberingPlan.ISDN,"201111111111");

 //Add the IMSI of the subscriber that is queried 
        IMSI imsi = this.mapProvider.getMAPParameterFactory().createIMSI("602031234567890");
        LMSI lmsi = this.mapProvider.getMAPParameterFactory().createLMSI(new byte[]{(byte)0x65,(byte)0x10,(byte)0xf2,(byte)0x29});
        LocationInfoWithLMSI Location = this.mapProvider.getMAPParameterFactory().createLocationInfoWithLMSI
            (msc, lmsi, null, false, null);

        GlobalTitle0100 GtHlr = this.sccpProvider.getParameterFactory().createGlobalTitle(
                "201179008244",0, org.mobicents.protocols.ss7.indicator.NumberingPlan.ISDN_TELEPHONY,null,
                NatureOfAddress.INTERNATIONAL);

        GlobalTitle0100 GtSMSC = this.sccpProvider.getParameterFactory().
                createGlobalTitle("441357924680",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,GtSMSC,CLIENT_SPC,SSN_Client);

        /*MAPDialogSms dialogSms = this.mapProvider.getMAPServiceSms().createNewDialog
                (MAPApplicationContext.getInstance(MAPApplicationContextName.shortMsgGatewayContext,
                        MAPApplicationContextVersion.version3),callingParty,null,calledParty,null);*/
        MAPDialogSms dialogSms = sendRoutingInfoForSMRequest.getMAPDialog();

        dialogSms.setUserObject(invokeId);

        dialogSms.addSendRoutingInfoForSMResponse(invokeId,imsi,Location,null, false);
        dialogSms.send();

        logger.info("IMSI and MSC GT Address Sent.....");

    } catch (MAPException e) {
        e.printStackTrace();
    }
}
 
Example #11
Source File: UpdateLocationResp.java    From SigPloit with MIT License 4 votes vote down vote up
@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();
    }



}
 
Example #12
Source File: GMLCCDRState.java    From gmlc with GNU Affero General Public License v3.0 4 votes vote down vote up
/**
 * @return the ISDNAddressString
 */
public ISDNAddressString getISDNAddressString() {
  return isdnAddressString;
}
 
Example #13
Source File: GMLCCDRState.java    From gmlc with GNU Affero General Public License v3.0 4 votes vote down vote up
/**
 * @return the ISDNAddressString
 */
public ISDNAddressString getIsdnAddressString() {
  return isdnAddressString;
}
 
Example #14
Source File: GMLCCDRState.java    From gmlc with GNU Affero General Public License v3.0 4 votes vote down vote up
/**
 * @param iSDNString the ISDNString to set
 */
public void setISDNAddressString(ISDNAddressString iSDNString) {
  isdnAddressString = iSDNString;
}
 
Example #15
Source File: GMLCCDRState.java    From gmlc with GNU Affero General Public License v3.0 4 votes vote down vote up
/**
 * @param isdnAddressString the ISDNString to set
 */
public void setIsdnAddressString(ISDNAddressString isdnAddressString) {
  this.isdnAddressString = isdnAddressString;
}