Search in sources :

Example 1 with CorrelationIdValue

use of org.mobicents.smsc.library.CorrelationIdValue in project smscgateway by RestComm.

the class HrSriClientSbb method onSendRoutingInfoForSMResponse.

/**
 * Received response for SRI sent earlier
 *
 * @param evt
 * @param aci
 */
public void onSendRoutingInfoForSMResponse(SendRoutingInfoForSMResponse evt, ActivityContextInterface aci) {
    if (this.logger.isFineEnabled()) {
        this.logger.fine("\nHome routing: HrSriClientSbb: Received SEND_ROUTING_INFO_FOR_SM_RESPONSE = " + evt + " Dialog=" + evt.getMAPDialog());
    }
    if (evt.getMAPDialog().getApplicationContext().getApplicationContextVersion() == MAPApplicationContextVersion.version1 && evt.getMwdSet() != null && evt.getMwdSet()) {
        MWStatus mwStatus = evt.getMAPDialog().getService().getMAPProvider().getMAPParameterFactory().createMWStatus(false, true, false, false);
        CorrelationIdValue correlationIdValue = this.getCorrelationIdValue();
        if (correlationIdValue != null) {
            correlationIdValue.setMwStatus(mwStatus);
            correlationIdValue.setSriMapVersion(evt.getMAPDialog().getApplicationContext().getApplicationContextVersion().getVersion());
            this.setCorrelationIdValue(correlationIdValue);
        }
    }
    this.setSendRoutingInfoForSMResponse(evt);
}
Also used : MWStatus(org.mobicents.protocols.ss7.map.api.service.sms.MWStatus) CorrelationIdValue(org.mobicents.smsc.library.CorrelationIdValue)

Example 2 with CorrelationIdValue

use of org.mobicents.smsc.library.CorrelationIdValue in project smscgateway by RestComm.

the class HrSriClientSbb method onDialogTimeout.

public void onDialogTimeout(DialogTimeout evt, ActivityContextInterface aci) {
    try {
        super.onDialogTimeout(evt, aci);
        CorrelationIdValue correlationIdValue = this.getCorrelationIdValue();
        if (correlationIdValue == null) {
            this.logger.severe("HrSriClientSbb.onDialogTimeout(): CorrelationIdValue CMP missed");
            return;
        }
        this.returnSriFailure(correlationIdValue, null, "(home routing) onDialogTimeout after SRI Request");
    } catch (Throwable e1) {
        logger.severe("Exception in HrSriClientSbb.onDialogTimeout() (home routing) when fetching records and issuing events: " + e1.getMessage(), e1);
    }
}
Also used : CorrelationIdValue(org.mobicents.smsc.library.CorrelationIdValue)

Example 3 with CorrelationIdValue

use of org.mobicents.smsc.library.CorrelationIdValue in project smscgateway by RestComm.

the class HrSriClientSbb method onErrorComponent.

public void onErrorComponent(ErrorComponent event, ActivityContextInterface aci) {
    super.onErrorComponent(event, aci);
    try {
        // we store error into CMP
        MAPErrorMessage mapErrorMessage = event.getMAPErrorMessage();
        this.setErrorResponse(mapErrorMessage);
        if (mapErrorMessage.isEmAbsentSubscriber()) {
            MAPErrorMessageAbsentSubscriber errAs = mapErrorMessage.getEmAbsentSubscriber();
            Boolean mwdSet = errAs.getMwdSet();
            if (mwdSet != null && mwdSet) {
                MWStatus mwStatus = event.getMAPDialog().getService().getMAPProvider().getMAPParameterFactory().createMWStatus(false, true, false, false);
                CorrelationIdValue correlationIdValue = this.getCorrelationIdValue();
                if (correlationIdValue != null) {
                    correlationIdValue.setMwStatus(mwStatus);
                    this.setCorrelationIdValue(correlationIdValue);
                }
            }
        }
    } catch (Throwable e1) {
        logger.severe("Exception in HrSriClientSbb.onErrorComponent when fetching records and issuing events: " + e1.getMessage(), e1);
    }
}
Also used : MAPErrorMessageAbsentSubscriber(org.mobicents.protocols.ss7.map.api.errors.MAPErrorMessageAbsentSubscriber) MWStatus(org.mobicents.protocols.ss7.map.api.service.sms.MWStatus) CorrelationIdValue(org.mobicents.smsc.library.CorrelationIdValue) MAPErrorMessage(org.mobicents.protocols.ss7.map.api.errors.MAPErrorMessage)

Example 4 with CorrelationIdValue

use of org.mobicents.smsc.library.CorrelationIdValue in project smscgateway by RestComm.

the class HrSriClientSbb method onRejectComponent.

public void onRejectComponent(RejectComponent event, ActivityContextInterface aci) {
    super.onRejectComponent(event, aci);
    String reason = this.getRejectComponentReason(event);
    CorrelationIdValue correlationIdValue = this.getCorrelationIdValue();
    if (correlationIdValue == null) {
        this.logger.severe("HrSriClientSbb.onRejectComponent(): CorrelationIdValue CMP missed");
        return;
    }
    this.returnSriFailure(correlationIdValue, null, "Home routing: onRejectComponent after SRI Request: " + reason != null ? reason.toString() : "");
}
Also used : ISDNAddressString(org.mobicents.protocols.ss7.map.api.primitives.ISDNAddressString) AddressString(org.mobicents.protocols.ss7.map.api.primitives.AddressString) CorrelationIdValue(org.mobicents.smsc.library.CorrelationIdValue)

Example 5 with CorrelationIdValue

use of org.mobicents.smsc.library.CorrelationIdValue in project smscgateway by RestComm.

the class HrSriClientSbb method onSriFullResponse.

private void onSriFullResponse() {
    SendRoutingInfoForSMResponse sendRoutingInfoForSMResponse = this.getSendRoutingInfoForSMResponse();
    MAPErrorMessage errorMessage = this.getErrorResponse();
    CorrelationIdValue correlationIdValue = this.getCorrelationIdValue();
    if (correlationIdValue == null) {
        this.logger.severe("Home routing HrSriClientSbb.onSriFullResponse(): CorrelationIdValue CMP missed");
        return;
    }
    if (sendRoutingInfoForSMResponse != null) {
        // we have positive response to SRI request
        correlationIdValue.setImsi(sendRoutingInfoForSMResponse.getIMSI().getData());
        correlationIdValue.setLocationInfoWithLMSI(sendRoutingInfoForSMResponse.getLocationInfoWithLMSI());
        correlationIdValue.setSendRoutingInfoForSMResponse(sendRoutingInfoForSMResponse);
        MProcResult mProcResult = MProcManagement.getInstance().applyMProcHrSri(getMProcRuleRa(), correlationIdValue);
        if (mProcResult.isHrIsByPassed()) {
            this.returnSriHrByPass(correlationIdValue);
        } else {
            this.returnSriSuccess(correlationIdValue);
        }
        return;
    }
    if (errorMessage != null) {
        // we have a negative response
        this.returnSriFailure(correlationIdValue, errorMessage, "Home routing HrSriClientSbb.onSriFullResponse(): MAP ErrorMessage received: " + errorMessage);
    } else {
        // we have no responses - this is an error behaviour
        this.returnSriFailure(correlationIdValue, null, "Home routing HrSriClientSbb.onSriFullResponse(): Empty response after SRI Request");
    }
}
Also used : MProcResult(org.mobicents.smsc.mproc.impl.MProcResult) SendRoutingInfoForSMResponse(org.mobicents.protocols.ss7.map.api.service.sms.SendRoutingInfoForSMResponse) CorrelationIdValue(org.mobicents.smsc.library.CorrelationIdValue) MAPErrorMessage(org.mobicents.protocols.ss7.map.api.errors.MAPErrorMessage)

Aggregations

CorrelationIdValue (org.mobicents.smsc.library.CorrelationIdValue)10 AddressString (org.mobicents.protocols.ss7.map.api.primitives.AddressString)3 ISDNAddressString (org.mobicents.protocols.ss7.map.api.primitives.ISDNAddressString)3 MWStatus (org.mobicents.protocols.ss7.map.api.service.sms.MWStatus)3 MAPErrorMessage (org.mobicents.protocols.ss7.map.api.errors.MAPErrorMessage)2 MAPApplicationContext (org.mobicents.protocols.ss7.map.api.MAPApplicationContext)1 MAPApplicationContextName (org.mobicents.protocols.ss7.map.api.MAPApplicationContextName)1 MAPAbortProviderReason (org.mobicents.protocols.ss7.map.api.dialog.MAPAbortProviderReason)1 MAPRefuseReason (org.mobicents.protocols.ss7.map.api.dialog.MAPRefuseReason)1 MAPErrorMessageAbsentSubscriber (org.mobicents.protocols.ss7.map.api.errors.MAPErrorMessageAbsentSubscriber)1 MAPDialogSms (org.mobicents.protocols.ss7.map.api.service.sms.MAPDialogSms)1 SendRoutingInfoForSMResponse (org.mobicents.protocols.ss7.map.api.service.sms.SendRoutingInfoForSMResponse)1 ApplicationContextName (org.mobicents.protocols.ss7.tcap.asn.ApplicationContextName)1 Sms (org.mobicents.smsc.library.Sms)1 SmsSet (org.mobicents.smsc.library.SmsSet)1 SriResponseValue (org.mobicents.smsc.library.SriResponseValue)1 MProcResult (org.mobicents.smsc.mproc.impl.MProcResult)1 InformServiceCenterContainer (org.mobicents.smsc.slee.services.smpp.server.events.InformServiceCenterContainer)1