public MAPParameterFactory getMAPParameterFactory() { if (this.wrappedProvider == null) { throw new IllegalStateException("RA is has not been activated."); } return this.wrappedProvider.getMAPParameterFactory(); }
this.realProvider.addMAPDialogListener(this); this.realProvider.getMAPServiceMobility().addMAPServiceListener(this); this.realProvider.getMAPServiceCallHandling().addMAPServiceListener(this); this.realProvider.getMAPServiceOam().addMAPServiceListener(this); this.realProvider.getMAPServicePdpContextActivation().addMAPServiceListener(this); this.realProvider.getMAPServiceSupplementary().addMAPServiceListener(this); this.realProvider.getMAPServiceSms().addMAPServiceListener(this); this.realProvider.getMAPServiceLsm().addMAPServiceListener(this); this.realProvider.getMAPServiceMobility().acivate(); this.realProvider.getMAPServiceCallHandling().acivate(); this.realProvider.getMAPServiceOam().acivate(); this.realProvider.getMAPServicePdpContextActivation().acivate(); this.realProvider.getMAPServiceSupplementary().acivate(); this.realProvider.getMAPServiceSms().acivate(); this.realProvider.getMAPServiceLsm().acivate();
@Override public void setSbbContext(SbbContext sbbContext) { this.sbbContext = (SbbContextExt) sbbContext; try { Context ctx = (Context) new InitialContext() .lookup("java:comp/env"); this.mapAcif = (MAPContextInterfaceFactory) ctx .lookup("slee/resources/map/2.0/acifactory"); this.mapProvider = (MAPProvider) ctx .lookup("slee/resources/map/2.0/provider"); this.mapParameterFactory = this.mapProvider.getMAPParameterFactory(); this.mapErrorMessageFactory = this.mapProvider.getMAPErrorMessageFactory(); this.sccpParameterFact = new ParameterFactoryImpl(); // this.smppServerSessions = (SmppSessions) ctx // .lookup("slee/resources/smpp/server/1.0/provider"); this.persistence = (PersistenceRAInterface) this.sbbContext.getResourceAdaptorInterface(PERSISTENCE_ID, PERSISTENCE_LINK); this.logger = this.sbbContext.getTracer(this.className); itsMProcRa = (MProcRuleRaProvider) this.sbbContext.getResourceAdaptorInterface(MPROC_RATYPE_ID, MPROC_RA_LINK); } catch (Exception ne) { logger.severe("Could not set SBB context:", ne); } // TODO : Handle proper error }
public void setWrappedProvider(MAPProvider wrappedProvider) { this.wrappedProvider = wrappedProvider; this.wrappedMAPServiceMobility = new MAPServiceMobilityWrapper(this, wrappedProvider.getMAPServiceMobility()); this.wrappedMAPServiceCallHandling = new MAPServiceCallHandlingWrapper(this, wrappedProvider.getMAPServiceCallHandling()); this.wrappedMAPServiceOam = new MAPServiceOamWrapper(this, wrappedProvider.getMAPServiceOam()); this.wrappedMAPServicePdpContextActivation = new MAPServicePdpContextActivationWrapper(this, wrappedProvider.getMAPServicePdpContextActivation()); this.wrappedUSSD = new MAPServiceSupplementaryWrapper(this, wrappedProvider.getMAPServiceSupplementary()); this.wrappedLSM = new MAPServiceLsmWrapper(this, wrappedProvider.getMAPServiceLsm()); this.wrappedSMS = new MAPServiceSmsWrapper(this, wrappedProvider.getMAPServiceSms()); }
@Override public void stop() { isStarted = false; mapProvider.getMAPServiceLsm().deactivate(); mapProvider.getMAPServiceLsm().removeMAPServiceListener(this); mapProvider.removeMAPDialogListener(this); this.testerHost.sendNotif(SOURCE_NAME, "LCS Client has been stopped", "", Level.INFO); }
public boolean start() { this.mapProvider = this.mapMan.getMAPStack().getMAPProvider(); mapServiceLsm = mapProvider.getMAPServiceLsm(); this.mapParameterFactory = mapProvider.getMAPParameterFactory(); mapServiceLsm.acivate(); mapServiceLsm.addMAPServiceListener(this); mapProvider.addMAPDialogListener(this); isStarted = true; return true; }
IMSI imsi = mapProvider.getMAPParameterFactory().createIMSI(destImsi); SM_RP_DA da = mapProvider.getMAPParameterFactory().createSM_RP_DA(imsi); AddressString serviceCentreAddress = mapProvider.getMAPParameterFactory().createAddressString( this.testerHost.getConfigurationData().getTestSmsServerConfigurationData().getAddressNature(), this.testerHost.getConfigurationData().getTestSmsServerConfigurationData().getNumberingPlan(), serviceCentreAddr); SM_RP_OA oa = mapProvider.getMAPParameterFactory().createSM_RP_OA_ServiceCentreAddressOA(serviceCentreAddress); ProtocolIdentifier pi = new ProtocolIdentifierImpl(0); SmsDeliverTpdu tpdu = new SmsDeliverTpduImpl(false, false, false, false, originatingAddress, pi, serviceCentreTimeStamp, userData); SmsSignalInfo si = mapProvider.getMAPParameterFactory().createSmsSignalInfo(tpdu, null); MAPDialogSms curDialog = mapProvider.getMAPServiceSms().createNewDialog(mapAppContext, this.mapMan.createOrigAddress(), null, this.mapMan.createDestAddress(vlrNumber, this.testerHost.getConfigurationData().getTestSmsServerConfigurationData().getVlrSsn()), null);
private void initiateUSSD() throws MAPException { NetworkIdState networkIdState = this.mapStack.getMAPProvider().getNetworkIdState(0); int executorCongestionLevel = this.mapStack.getMAPProvider().getExecutorCongestionLevel(); if (!(networkIdState == null || networkIdState.isAvailavle() && networkIdState.getCongLevel() <= 0 && executorCongestionLevel <= 0)) { AddressString origRef = this.mapProvider.getMAPParameterFactory().createAddressString( AddressNature.international_number, NumberingPlan.ISDN, "12345"); AddressString destRef = this.mapProvider.getMAPParameterFactory().createAddressString( AddressNature.international_number, NumberingPlan.ISDN, "67890"); MAPDialogSupplementary mapDialog = this.mapProvider.getMAPServiceSupplementary().createNewDialog( MAPApplicationContext.getInstance(MAPApplicationContextName.networkUnstructuredSsContext, MAPApplicationContextVersion.version2), SCCP_CLIENT_ADDRESS, origRef, SCCP_SERVER_ADDRESS, destRef); USSDString ussdString = this.mapProvider.getMAPParameterFactory().createUSSDString("*125*+31628839999#", null, null); ISDNAddressString msisdn = this.mapProvider.getMAPParameterFactory().createISDNAddressString( AddressNature.international_number, NumberingPlan.ISDN, "31628838002");
private MAPDialogMobility setupCheckImeiRequest(String testIMEI, String testIMSI) throws MAPException { MAPDialogMobility clientDialogMobility = this.mapProvider.getMAPServiceMobility() .createNewDialog(getApplicationContext(), getMSCSccpAddress(), null, getEIRSccpAddress(), null); logger.info("DialogId: " + clientDialogMobility.getLocalDialogId() + ". Sending IMEI=[" + testIMEI + "]. IMSI=[" + testIMSI + "]"); MAPParameterFactory mapParameterFactory = this.mapProvider.getMAPParameterFactory(); IMEI imei = mapParameterFactory.createIMEI(testIMEI); IMSI imsi = mapParameterFactory.createIMSI(testIMSI); clientDialogMobility.addCheckImeiRequest_Huawei(imei, null, null, imsi); return clientDialogMobility; }
public boolean start() { this.countAtiReq = 0; this.countAtiResp = 0; MAPProvider mapProvider = this.mapMan.getMAPStack().getMAPProvider(); mapProvider.getMAPServiceMobility().acivate(); mapProvider.getMAPServiceMobility().addMAPServiceListener(this); mapProvider.addMAPDialogListener(this); this.testerHost.sendNotif(SOURCE_NAME, "ATI Client has been started", "", Level.INFO); isStarted = true; return true; }
private void initMAP() throws Exception { System.out.println("initMAP"); this.mapStack = new MAPStackImpl("Test", this.sccpStack.getSccpProvider(), SSN); this.mapProvider = this.mapStack.getMAPProvider(); System.out.println("this.mapProvider = " + this.mapProvider); this.mapProvider.addMAPDialogListener(this); this.mapProvider.getMAPServiceSms().addMAPServiceListener(this); this.mapProvider.getMAPServiceSms().acivate(); this.mapStack.start(); this.mapStack.getMAPProvider().getMAPServiceSupplementary().acivate(); }
ussdString = mapProvider.getMAPParameterFactory().createUSSDString( msg, new CBSDataCodingSchemeImpl(this.testerHost.getConfigurationData().getTestUssdServerConfigurationData() if (this.testerHost.getConfigurationData().getTestUssdServerConfigurationData().getMsisdnAddress() != null && !this.testerHost.getConfigurationData().getTestUssdServerConfigurationData().getMsisdnAddress().equals("")) { msisdn = mapProvider.getMAPParameterFactory().createISDNAddressString( this.testerHost.getConfigurationData().getTestUssdServerConfigurationData().getMsisdnAddressNature(), this.testerHost.getConfigurationData().getTestUssdServerConfigurationData().getMsisdnNumberingPlan(), MAPApplicationContextVersion.version2); curDialog = mapProvider.getMAPServiceSupplementary().createNewDialog(mapUssdAppContext, this.mapMan.createOrigAddress(), this.mapMan.createOrigReference(), this.mapMan.createDestAddress(), this.mapMan.createDestReference()); currentDialog = curDialog;
public boolean start() { MAPProvider mapProvider = this.mapMan.getMAPStack().getMAPProvider(); mapProvider.getMAPServiceSupplementary().acivate(); mapProvider.getMAPServiceSupplementary().addMAPServiceListener(this); mapProvider.addMAPDialogListener(this); this.testerHost.sendNotif(SOURCE_NAME, "USSD Server has been started", "", Level.INFO); isStarted = true; return true; }
public boolean start() { this.countSriReq = 0; this.countSriResp = 0; this.countMtFsmReq = 0; this.countMtFsmResp = 0; this.countMoFsmReq = 0; this.countMoFsmResp = 0; this.countIscReq = 0; this.countErrRcvd = 0; this.countErrSent = 0; this.countRsmdsReq = 0; this.countRsmdsResp = 0; this.countAscReq = 0; this.countAscResp = 0; MAPProvider mapProvider = this.mapMan.getMAPStack().getMAPProvider(); mapProvider.getMAPServiceSms().acivate(); mapProvider.getMAPServiceSms().addMAPServiceListener(this); mapProvider.addMAPDialogListener(this); this.testerHost.sendNotif(SOURCE_NAME, "SMS Server has been started", "", Level.INFO); isStarted = true; return true; }
@Override public void stop() { MAPProvider mapProvider = this.mapMan.getMAPStack().getMAPProvider(); isStarted = false; mapProvider.getMAPServiceMobility().deactivate(); mapProvider.getMAPServiceMobility().removeMAPServiceListener(this); mapProvider.removeMAPDialogListener(this); this.testerHost.sendNotif(SOURCE_NAME, "ATI Server has been stopped", "", Level.INFO); }
public MAPErrorMessageFactory getMAPErrorMessageFactory() { if (this.wrappedProvider == null) { throw new IllegalStateException("RA is has not been activated."); } return this.wrappedProvider.getMAPErrorMessageFactory(); }
@Override public void stop() { MAPProvider mapProvider = this.mapMan.getMAPStack().getMAPProvider(); isStarted = false; mapProvider.getMAPServiceSms().deactivate(); mapProvider.getMAPServiceSms().removeMAPServiceListener(this); mapProvider.removeMAPDialogListener(this); this.testerHost.sendNotif(SOURCE_NAME, "SMS Server has been stopped", "", Level.INFO); }
@Override public void stop() { MAPProvider mapProvider = this.mapMan.getMAPStack().getMAPProvider(); isStarted = false; this.doRemoveDialog(); mapProvider.getMAPServiceSupplementary().deactivate(); mapProvider.getMAPServiceSupplementary().removeMAPServiceListener(this); mapProvider.removeMAPDialogListener(this); this.testerHost.sendNotif(SOURCE_NAME, "USSD Server has been stopped", "", Level.INFO); }
private MAPDialogSms setupRoutingInfoForSMRequestIndication(String destinationAddress, int ton, int npi, MAPApplicationContext mapApplicationContext, int networkId) throws MAPException { // this.mapParameterFactory.creat String hlrAddress = destinationAddress; String hrHlrNumber = smscPropertiesManagement.getHrHlrNumber(networkId); if (hrHlrNumber != null && hrHlrNumber.length() > 0) { hlrAddress = hrHlrNumber; } SccpAddress destinationAddr = this.convertAddressFieldToSCCPAddress(hlrAddress, ton, npi); MAPDialogSms mapDialogSms = this.mapProvider.getMAPServiceSms().createNewDialog(mapApplicationContext, this.getServiceCenterSccpAddress(networkId), null, destinationAddr, null); mapDialogSms.setNetworkId(networkId); ISDNAddressString isdn = this.getCalledPartyISDNAddressString(destinationAddress, ton, npi); AddressString serviceCenterAddress = this.getServiceCenterAddressString(networkId); boolean sm_RP_PRI = true; mapDialogSms.addSendRoutingInfoForSMRequest(isdn, sm_RP_PRI, serviceCenterAddress, null, false, null, null, null); if (this.logger.isInfoEnabled()) this.logger.info("\nHome routing: HrSriClientSbb: Sending: SendRoutingInfoForSMRequest: isdn=" + isdn + ", serviceCenterAddress=" + serviceCenterAddress + ", sm_RP_PRI=" + sm_RP_PRI); return mapDialogSms; }
@Override public String performUnstructuredRequest(String msg) { if (!isStarted) return "The tester is not started"; if (msg == null || msg.equals("")) return "USSD message is empty"; MAPProvider mapProvider = this.mapMan.getMAPStack().getMAPProvider(); MAPDialogSupplementary curDialog = currentDialog; try { if (curDialog == null) { MAPApplicationContext mapUssdAppContext = MAPApplicationContext.getInstance(MAPApplicationContextName.networkUnstructuredSsContext, MAPApplicationContextVersion.version2); curDialog = mapProvider.getMAPServiceSupplementary().createNewDialog(mapUssdAppContext, this.mapMan.createOrigAddress(), this.mapMan.createOrigReference(), this.mapMan.createDestAddress(), this.mapMan.createDestReference()); currentDialog = curDialog; } DialogData dd = (DialogData) curDialog.getUserObject(); if (dd == null) { dd = new DialogData(); curDialog.setUserObject(dd); } String res = this.sendUnstructuredRequest(curDialog, msg); curDialog.send(); return res; } catch (Exception e) { this.testerHost.sendNotif(SOURCE_NAME, "Exception when invoking send() : " + e.getMessage(), e, Level.ERROR); return "Exception when sending UnstructuredSSRequest: " + e.toString(); } }