public void putCorrelationIdCacheElement(CorrelationIdValue elem, int correlationIdLiveTime) throws Exception { this.correlationIdLiveTime = correlationIdLiveTime; synchronized (this.correlationIdCacheSync) { this.correlationIdCache1.put(elem.getCorrelationID(), elem); } }
@Override public int getOrigNetworkId() { return correlationIdValue.getNetworkId(); }
smscAddressForCountryCode); } else { networkNodeNumber = getNetworkNodeNumber(correlationIdValue.getNetworkId()); this.doSendResponse(correlationIdValue, dlg, correlationIdValue.getCorrelationID(), li); } catch (MAPException e) { if (dlg != null) {
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); InformServiceCentreRequest isc = correlationIdValue.getInformServiceCentreRequest(); if (mwStatus != null && isc != null) { dlg.addInformServiceCentreRequest(isc.getStoredMSISDN(), isc.getMwStatus(), null, isc.getAbsentSubscriberDiagnosticSM(), isc.getAdditionalAbsentSubscriberDiagnosticSM()); } dlg.close(false); }
@Override public String getImsiDigits() { return correlationIdValue.getImsi(); }
@Override public String getNnnDigits() { if (correlationIdValue.getLocationInfoWithLMSI() != null && correlationIdValue.getLocationInfoWithLMSI().getNetworkNodeNumber() != null) return correlationIdValue.getLocationInfoWithLMSI().getNetworkNodeNumber().getAddress(); else return null; }
@Override public String getOriginatorSccpAddress() { if (correlationIdValue.getOriginatorSccpAddress() != null && correlationIdValue.getOriginatorSccpAddress().getGlobalTitle() != null) return correlationIdValue.getOriginatorSccpAddress().getGlobalTitle().getDigits(); else return null; }
this.setSmscAddressForCountryCode(correlationIDRes.getSmscAddress()); String correlationID = correlationIDRes.getCorrelationId(); CorrelationIdValue correlationIdValue = new CorrelationIdValue(correlationID, msisdn, serviceCentreAddress, networkId, originatorSccpAddress);
@Override public void onSriHrByPass(CorrelationIdValue correlationIdValue) { MAPDialogSms dlg = this.getActivity(); if (dlg == null) { this.logger.severe("Home routing: can not get MAPDialog for sending SRI hrByPass Response"); return; } smscStatAggregator.updateMsgInHrSriHrByPass(); StringBuilder sb = new StringBuilder(); sb.append("Home routing: bypassing of Home routing: procedure: transaction: "); sb.append(correlationIdValue); if (this.logger.isInfoEnabled()) this.logger.info(sb.toString()); // sending original SRI response try { SendRoutingInfoForSMResponse sendRoutingInfoForSMResponse = correlationIdValue.getSendRoutingInfoForSMResponse(); this.doSendResponse(correlationIdValue, dlg, sendRoutingInfoForSMResponse.getIMSI().getData(), sendRoutingInfoForSMResponse.getLocationInfoWithLMSI()); } catch (MAPException e) { if (dlg != null) { dlg.release(); } String reason = "Home routing: MAPException when sending SRI bypassing of Home routing: " + e.toString(); this.logger.severe(reason, e); } }
@Override public int getNetworkId() { return correlationIdValue.getNetworkId(); }
private void sendSRI(String destinationAddress, int ton, int npi, MAPApplicationContext mapApplicationContext, CorrelationIdValue correlationIdValue) { // Send out SRI MAPDialogSms mapDialogSms = null; try { // 1. Create Dialog first and add the SRI request to it mapDialogSms = this.setupRoutingInfoForSMRequestIndication(destinationAddress, ton, npi, mapApplicationContext, correlationIdValue.getNetworkId()); // 2. Create the ACI and attach this SBB ActivityContextInterface sriDialogACI = this.mapAcif.getActivityContextInterface(mapDialogSms); sriDialogACI.attach(this.sbbContext.getSbbLocalObject()); // 3. Finally send the request mapDialogSms.send(); } catch (MAPException e) { if (mapDialogSms != null) { mapDialogSms.release(); } String reason = "Home routing: HrSriClientSbb: MAPException when sending SRI from sendSRI(): " + e.toString(); this.logger.severe(reason, e); this.returnSriFailure(correlationIdValue, null, reason); } }
@Override public void setupSriRequest(CorrelationIdValue correlationIdValue) { if (this.logger.isFineEnabled()) { this.logger.fine("\nHome routing: HrSriClientSbb: Received SriRequest: event= " + correlationIdValue); } this.setCorrelationIdValue(correlationIdValue); this.setInProcess(1); this.sendSRI(correlationIdValue.getMsisdn().getAddress(), correlationIdValue.getMsisdn().getAddressNature().getIndicator(), correlationIdValue .getMsisdn().getNumberingPlan().getIndicator(), this.getSRIMAPApplicationContext(this.maxMAPApplicationContextVersion), correlationIdValue); }
this.sendSRI(correlationIdValue.getMsisdn().getAddress(), correlationIdValue.getMsisdn().getAddressNature().getIndicator(), correlationIdValue .getMsisdn().getNumberingPlan().getIndicator(), this.getSRIMAPApplicationContext(MAPApplicationContextVersion.version1), correlationIdValue); return; MAPApplicationContext supportedMAPApplicationContext = MAPApplicationContext.getInstance(tcapApplicationContextName.getOid()); this.sendSRI(correlationIdValue.getMsisdn().getAddress(), correlationIdValue.getMsisdn().getAddressNature().getIndicator(), correlationIdValue .getMsisdn().getNumberingPlan().getIndicator(), this.getSRIMAPApplicationContext(supportedMAPApplicationContext.getApplicationContextVersion()), correlationIdValue); return;