protected AddressString getServiceCenterAddressString(int networkId) { if (networkId == 0) { if (this.serviceCenterAddress == null) { this.serviceCenterAddress = this.mapParameterFactory.createAddressString(AddressNature.international_number, org.mobicents.protocols.ss7.map.api.primitives.NumberingPlan.ISDN, smscPropertiesManagement.getServiceCenterGt()); } return this.serviceCenterAddress; } else { return this.mapParameterFactory.createAddressString(AddressNature.international_number, org.mobicents.protocols.ss7.map.api.primitives.NumberingPlan.ISDN, smscPropertiesManagement.getServiceCenterGt(networkId)); } }
@Override public void onUnstructuredSSRequest(UnstructuredSSRequest unstrReqInd) { if (logger.isDebugEnabled()) { logger.debug(String.format("Rx UnstructuredSSRequestIndication. USSD String=%s ", unstrReqInd.getUSSDString())); } MAPDialogSupplementary mapDialog = unstrReqInd.getMAPDialog(); try { CBSDataCodingScheme ussdDataCodingScheme = new CBSDataCodingSchemeImpl(0x0f); USSDString ussdString = this.mapProvider.getMAPParameterFactory().createUSSDString("1", null, null); AddressString msisdn = this.mapProvider.getMAPParameterFactory().createAddressString( AddressNature.international_number, NumberingPlan.ISDN, "31628838002"); mapDialog.addUnstructuredSSResponse(unstrReqInd.getInvokeId(), ussdDataCodingScheme, ussdString); mapDialog.send(); } catch (MAPException e) { logger.error(String.format("Error while sending UnstructuredSSResponse for Dialog=%d", mapDialog.getLocalDialogId())); } }
@Override public void onUnstructuredSSRequest(UnstructuredSSRequest unstrReqInd) { if (logger.isDebugEnabled()) { logger.debug(String.format("Rx UnstructuredSSRequestIndication. USSD String=%s ", unstrReqInd.getUSSDString())); } MAPDialogSupplementary mapDialog = unstrReqInd.getMAPDialog(); try { CBSDataCodingScheme ussdDataCodingScheme = new CBSDataCodingSchemeImpl(0x0f); USSDString ussdString = this.mapProvider.getMAPParameterFactory().createUSSDString("1", null, null); AddressString msisdn = this.mapProvider.getMAPParameterFactory().createAddressString( AddressNature.international_number, NumberingPlan.ISDN, "31628838002"); mapDialog.addUnstructuredSSResponse(unstrReqInd.getInvokeId(), ussdDataCodingScheme, ussdString); mapDialog.send(); } catch (MAPException e) { logger.error(String.format("Error while sending UnstructuredSSResponse for Dialog=%d", mapDialog.getLocalDialogId())); } }
@Override public void onUnstructuredSSResponse(UnstructuredSSResponse unstrResInd) { if (logger.isDebugEnabled()) { logger.debug(String.format("onUnstructuredSSResponseIndication for DialogId=%d", unstrResInd.getMAPDialog() .getLocalDialogId())); } try { USSDString ussdStrObj = this.mapProvider.getMAPParameterFactory().createUSSDString("Your balance is 500"); CBSDataCodingScheme ussdDataCodingScheme = new CBSDataCodingSchemeImpl(0x0F); MAPDialogSupplementary dialog = unstrResInd.getMAPDialog(); AddressString msisdn = this.mapProvider.getMAPParameterFactory().createAddressString( AddressNature.international_number, NumberingPlan.ISDN, "31628838002"); dialog.addProcessUnstructuredSSResponse(((Long) dialog.getUserObject()).longValue(), ussdDataCodingScheme, ussdStrObj); dialog.close(false); } catch (MAPException e) { logger.error("Error while sending UnstructuredSSRequest ", e); } }
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),
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(
AddressString serviceCentreAddress = mapProvider.getMAPParameterFactory().createAddressString( this.testerHost.getConfigurationData().getTestSmsServerConfigurationData().getAddressNature(), this.testerHost.getConfigurationData().getTestSmsServerConfigurationData().getNumberingPlan(), serviceCentreAddr);
this.testerHost.getConfigurationData().getTestSmsClientConfigurationData().getAddressNature(), this.testerHost.getConfigurationData().getTestSmsClientConfigurationData().getNumberingPlan(), destIsdnNumber); AddressString serviceCentreAddressDA = mapProvider.getMAPParameterFactory().createAddressString( this.testerHost.getConfigurationData().getTestSmsClientConfigurationData().getAddressNature(), this.testerHost.getConfigurationData().getTestSmsClientConfigurationData().getNumberingPlan(), serviceCentreAddr);
this.testerHost.getConfigurationData().getTestSmsServerConfigurationData().getAddressNature(), this.testerHost.getConfigurationData().getTestSmsServerConfigurationData().getNumberingPlan(), destIsdnNumber); AddressString serviceCentreAddress = mapProvider.getMAPParameterFactory().createAddressString( this.testerHost.getConfigurationData().getTestSmsServerConfigurationData().getAddressNature(), this.testerHost.getConfigurationData().getTestSmsServerConfigurationData().getNumberingPlan(), serviceCentreAddr);
this.testerHost.getConfigurationData().getTestSmsServerConfigurationData().getAddressNature(), this.testerHost.getConfigurationData().getTestSmsServerConfigurationData().getNumberingPlan(), curDestIsdnNumber); AddressString serviceCentreAddress = mapProvider.getMAPParameterFactory().createAddressString( this.testerHost.getConfigurationData().getTestSmsServerConfigurationData().getAddressNature(), this.testerHost.getConfigurationData().getTestSmsServerConfigurationData().getNumberingPlan(), this.getServiceCenterAddress());
AddressString serviceCentreAddressDA = mapProvider.getMAPParameterFactory().createAddressString( this.testerHost.getConfigurationData().getTestSmsClientConfigurationData().getAddressNature(), this.testerHost.getConfigurationData().getTestSmsClientConfigurationData().getNumberingPlan(), serviceCentreAddr);