Search in sources :

Example 21 with IMSI

use of org.restcomm.protocols.ss7.map.api.primitives.IMSI in project smscgateway by RestComm.

the class MAPListener method onSendRoutingInfoForSMRequest.

@Override
public void onSendRoutingInfoForSMRequest(SendRoutingInfoForSMRequest event) {
    if (logger.isInfoEnabled()) {
        logger.info("Rx : SendRoutingInfoForSMRequestIndication=" + event);
    }
    IMSI imsi = new IMSIImpl("410035001692061");
    ISDNAddressString nnn = new ISDNAddressStringImpl(AddressNature.international_number, NumberingPlan.ISDN, "923330052001");
    LocationInfoWithLMSI li = new LocationInfoWithLMSIImpl(nnn, null, null, false, null);
    MAPDialogSms mapDialogSms = event.getMAPDialog();
    try {
        mapDialogSms.addSendRoutingInfoForSMResponse(event.getInvokeId(), imsi, li, null, null, null);
    // mapDialogSms.close(false);
    } catch (MAPException e) {
        e.printStackTrace();
    }
    mapDialogSms.setUserObject(true);
}
Also used : LocationInfoWithLMSI(org.restcomm.protocols.ss7.map.api.service.sms.LocationInfoWithLMSI) ISDNAddressStringImpl(org.restcomm.protocols.ss7.map.primitives.ISDNAddressStringImpl) IMSIImpl(org.restcomm.protocols.ss7.map.primitives.IMSIImpl) MAPDialogSms(org.restcomm.protocols.ss7.map.api.service.sms.MAPDialogSms) MAPException(org.restcomm.protocols.ss7.map.api.MAPException) IMSI(org.restcomm.protocols.ss7.map.api.primitives.IMSI) ISDNAddressString(org.restcomm.protocols.ss7.map.api.primitives.ISDNAddressString) LocationInfoWithLMSIImpl(org.restcomm.protocols.ss7.map.service.sms.LocationInfoWithLMSIImpl)

Example 22 with IMSI

use of org.restcomm.protocols.ss7.map.api.primitives.IMSI in project smscgateway by RestComm.

the class HrSriServerSbb method doSendResponse.

private void doSendResponse(CorrelationIdValue correlationIdValue, MAPDialogSms dlg, String imsiValue, LocationInfoWithLMSI li) throws MAPException {
    long invokeId = this.getInvokeId();
    IMSI imsi = this.mapParameterFactory.createIMSI(imsiValue);
    MWStatus mwStatus = correlationIdValue.getMwStatus();
    Boolean mwdSet = null;
    if (dlg.getApplicationContext().getApplicationContextVersion() == MAPApplicationContextVersion.version1) {
        if (mwStatus != null) {
            if (mwStatus.getMnrfSet())
                mwdSet = true;
            mwStatus = null;
        }
    }
    dlg.addSendRoutingInfoForSMResponse(invokeId, imsi, li, null, mwdSet, null);
    InformServiceCentreRequest isc = correlationIdValue.getInformServiceCentreRequest();
    if (mwStatus != null && isc != null) {
        dlg.addInformServiceCentreRequest(isc.getStoredMSISDN(), isc.getMwStatus(), null, isc.getAbsentSubscriberDiagnosticSM(), isc.getAdditionalAbsentSubscriberDiagnosticSM());
    }
    dlg.close(false);
}
Also used : MWStatus(org.restcomm.protocols.ss7.map.api.service.sms.MWStatus) InformServiceCentreRequest(org.restcomm.protocols.ss7.map.api.service.sms.InformServiceCentreRequest) IMSI(org.restcomm.protocols.ss7.map.api.primitives.IMSI)

Example 23 with IMSI

use of org.restcomm.protocols.ss7.map.api.primitives.IMSI in project smscgateway by RestComm.

the class SriSbb method executeForwardSM.

private void executeForwardSM(SmsSet smsSet, LocationInfoWithLMSI locationInfoWithLMSI, String imsi, int networkId) {
    smsSet.setImsi(imsi);
    smsSet.setLocationInfoWithLMSI(locationInfoWithLMSI);
    ISDNAddressString networkNodeNumber = locationInfoWithLMSI.getNetworkNodeNumber();
    MtSbbLocalObject mtSbbLocalObject = this.getMtSbbObject();
    if (mtSbbLocalObject != null) {
        ActivityContextInterface schedulerActivityContextInterface = this.getSchedulerActivityContextInterface();
        schedulerActivityContextInterface.attach(mtSbbLocalObject);
        SendMtEvent event = new SendMtEvent();
        event.setSmsSet(smsSet);
        event.setImsiData(imsi);
        event.setLmsi(locationInfoWithLMSI.getLMSI());
        event.setNetworkNode(networkNodeNumber);
        event.setInformServiceCenterContainer(this.getInformServiceCenterContainer());
        event.setSriMapVersion(this.getSriMapVersion());
        event.setCurrentMsgNum(this.getCurrentMsgNumValue());
        event.setTimerID(this.getDeliveryTimerID());
        // event.setSendingPoolMsgCount(this.getSendingPoolMsgCountValue());
        this.fireSendMtEvent(event, schedulerActivityContextInterface, null);
    }
}
Also used : ActivityContextInterface(javax.slee.ActivityContextInterface) ISDNAddressString(org.restcomm.protocols.ss7.map.api.primitives.ISDNAddressString) SendMtEvent(org.mobicents.smsc.slee.services.smpp.server.events.SendMtEvent)

Aggregations

ISDNAddressString (org.restcomm.protocols.ss7.map.api.primitives.ISDNAddressString)21 IMSI (org.restcomm.protocols.ss7.map.api.primitives.IMSI)20 ArrayList (java.util.ArrayList)17 SmsSet (org.mobicents.smsc.library.SmsSet)17 LocationInfoWithLMSI (org.restcomm.protocols.ss7.map.api.service.sms.LocationInfoWithLMSI)17 IMSIImpl (org.restcomm.protocols.ss7.map.primitives.IMSIImpl)17 ISDNAddressStringImpl (org.restcomm.protocols.ss7.map.primitives.ISDNAddressStringImpl)17 LocationInfoWithLMSIImpl (org.restcomm.protocols.ss7.map.service.sms.LocationInfoWithLMSIImpl)17 SmscPropertiesManagement (org.mobicents.smsc.domain.SmscPropertiesManagement)16 Sms (org.mobicents.smsc.library.Sms)16 MAPDialogSmsProxy (org.mobicents.smsc.slee.resources.persistence.MAPDialogSmsProxy)16 MAPServiceSmsProxy (org.mobicents.smsc.slee.resources.persistence.MAPServiceSmsProxy)16 SmsSetEvent (org.mobicents.smsc.slee.services.smpp.server.events.SmsSetEvent)16 SendRoutingInfoForSMResponse (org.restcomm.protocols.ss7.map.api.service.sms.SendRoutingInfoForSMResponse)16 SendRoutingInfoForSMResponseImpl (org.restcomm.protocols.ss7.map.service.sms.SendRoutingInfoForSMResponseImpl)16 Test (org.testng.annotations.Test)16 MAPApplicationContextVersion (org.restcomm.protocols.ss7.map.api.MAPApplicationContextVersion)15 AddressString (org.restcomm.protocols.ss7.map.api.primitives.AddressString)15 UUID (java.util.UUID)14 SmsProxy (org.mobicents.smsc.slee.resources.persistence.SmsProxy)14