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);
}
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);
}
}
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);
}
}
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() : "");
}
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");
}
}
Aggregations