private void LogOperationCode(OperationCode op) { this.pw.print("OpCode="); if (op != null) this.pw.print(op.getLocalOperationCode()); else this.pw.print("???"); }
@Override public void addDisconnectLegResponse(long invokeId) throws CAPException { if (this.appCntx != CAPApplicationContext.CapV4_gsmSSF_scfGeneric && this.appCntx != CAPApplicationContext.CapV4_scf_gsmSSFGeneric) throw new CAPException("Bad application context name for addDisconnectLegResponse: must be " + "CapV4_gsmSSF_scfGeneric or CapV4_scf_gsmSSFGeneric"); ReturnResultLast resultLast = this.capProviderImpl.getTCAPProvider().getComponentPrimitiveFactory() .createTCResultLastRequest(); resultLast.setInvokeId(invokeId); // Operation Code OperationCode oc = this.capProviderImpl.getTCAPProvider().getComponentPrimitiveFactory().createOperationCode(); oc.setLocalOperationCode((long) CAPOperationCode.disconnectLeg); resultLast.setOperationCode(oc); this.sendReturnResultLastComponent(resultLast); }
public void addSplitLegResponse(long invokeId) throws CAPException { if (this.appCntx != CAPApplicationContext.CapV4_gsmSSF_scfGeneric && this.appCntx != CAPApplicationContext.CapV4_scf_gsmSSFGeneric) throw new CAPException( "Bad application context for addSplitLegResponse: must be CapV4_gsmSSF_scfGeneric or CapV4_scf_gsmSSFGeneric"); ReturnResultLast resultLast = this.capProviderImpl.getTCAPProvider().getComponentPrimitiveFactory() .createTCResultLastRequest(); resultLast.setInvokeId(invokeId); // Operation Code OperationCode oc = this.capProviderImpl.getTCAPProvider().getComponentPrimitiveFactory().createOperationCode(); oc.setLocalOperationCode((long) CAPOperationCode.splitLeg); resultLast.setOperationCode(oc); this.sendReturnResultLastComponent(resultLast); }
Long ocValue = oc.getLocalOperationCode(); if (ocValue == null) new MAPParsingComponentException("", MAPParsingComponentExceptionReason.UnrecognizedOperation);
@Override public void addMoveLegResponse(long invokeId) throws CAPException { if (this.appCntx != CAPApplicationContext.CapV4_gsmSSF_scfGeneric && this.appCntx != CAPApplicationContext.CapV4_scf_gsmSSFGeneric) throw new CAPException( "Bad application context name for addMoveLegResponse: must be CapV4_gsmSSF_scfGeneric or CapV4_scf_gsmSSFGeneric"); ReturnResultLast resultLast = this.capProviderImpl.getTCAPProvider().getComponentPrimitiveFactory() .createTCResultLastRequest(); resultLast.setInvokeId(invokeId); // Operation Code OperationCode oc = this.capProviderImpl.getTCAPProvider().getComponentPrimitiveFactory().createOperationCode(); oc.setLocalOperationCode((long) CAPOperationCode.moveLeg); resultLast.setOperationCode(oc); this.sendReturnResultLastComponent(resultLast); }
Long ocValue = oc.getLocalOperationCode(); if (ocValue == null) new MAPParsingComponentException("", MAPParsingComponentExceptionReason.UnrecognizedOperation);
@Override public Long addContinueSMSRequest(int customInvokeTimeout) throws CAPException { if (this.appCntx != CAPApplicationContext.CapV3_cap3_sms && this.appCntx != CAPApplicationContext.CapV4_cap4_sms) throw new CAPException("Bad application context name for ConnectSMSRequest: must be CapV3_cap3_sms or CapV4_cap4_sms"); Invoke invoke = this.capProviderImpl.getTCAPProvider().getComponentPrimitiveFactory().createTCInvokeRequest(InvokeClass.Class4); if (customInvokeTimeout == _Timer_Default) invoke.setTimeout(_Timer_Sms_Short); else invoke.setTimeout(customInvokeTimeout); OperationCode oc = this.capProviderImpl.getTCAPProvider().getComponentPrimitiveFactory().createOperationCode(); oc.setLocalOperationCode((long) CAPOperationCode.continueSMS); invoke.setOperationCode(oc); Long invokeId; try { invokeId = this.tcapDialog.getNewInvokeId(); invoke.setInvokeId(invokeId); } catch (TCAPException e) { throw new CAPException(e.getMessage(), e); } this.sendInvokeComponent(invoke); return invokeId; }
Long ocValue = oc.getLocalOperationCode(); if (ocValue == null) new MAPParsingComponentException("", MAPParsingComponentExceptionReason.UnrecognizedOperation);
@Override public Long addActivityTestGPRSRequest(int customInvokeTimeout) throws CAPException { if (this.appCntx != CAPApplicationContext.CapV3_gprsSSF_gsmSCF && this.appCntx != CAPApplicationContext.CapV3_gsmSCF_gprsSSF) throw new CAPException( "Bad application context name for ActivityTestGPRSRequest: must be CapV3_gsmSCF_gprsSSF or CapV3_gsmSCF_gprsSSF"); Invoke invoke = this.capProviderImpl.getTCAPProvider().getComponentPrimitiveFactory() .createTCInvokeRequest(InvokeClass.Class3); if (customInvokeTimeout == _Timer_Default) invoke.setTimeout(_Timer_Gprs_Short); else invoke.setTimeout(customInvokeTimeout); OperationCode oc = this.capProviderImpl.getTCAPProvider().getComponentPrimitiveFactory().createOperationCode(); oc.setLocalOperationCode((long) CAPOperationCode.activityTestGPRS); invoke.setOperationCode(oc); Long invokeId; try { invokeId = this.tcapDialog.getNewInvokeId(); invoke.setInvokeId(invokeId); } catch (TCAPException e) { throw new CAPException(e.getMessage(), e); } this.sendInvokeComponent(invoke); return invokeId; }
@Override public Long addCollectInformationRequest(int customInvokeTimeout) throws CAPException { if (this.appCntx != CAPApplicationContext.CapV4_gsmSSF_scfGeneric && this.appCntx != CAPApplicationContext.CapV4_scf_gsmSSFGeneric) throw new CAPException( "Bad application context name for addContinueRequest: must be CapV4_gsmSSF_scfGeneric or CapV4_scf_gsmSSFGeneric"); Invoke invoke = this.capProviderImpl.getTCAPProvider().getComponentPrimitiveFactory() .createTCInvokeRequest(InvokeClass.Class4); if (customInvokeTimeout == _Timer_Default) invoke.setTimeout(_Timer_CircuitSwitchedCallControl_Short); else invoke.setTimeout(customInvokeTimeout); OperationCode oc = this.capProviderImpl.getTCAPProvider().getComponentPrimitiveFactory().createOperationCode(); oc.setLocalOperationCode((long) CAPOperationCode.collectInformation); invoke.setOperationCode(oc); Long invokeId; try { invokeId = this.tcapDialog.getNewInvokeId(); invoke.setInvokeId(invokeId); } catch (TCAPException e) { throw new CAPException(e.getMessage(), e); } this.sendInvokeComponent(invoke); return invokeId; }
@Override public Long addContinueRequest(int customInvokeTimeout) throws CAPException { if (this.appCntx != CAPApplicationContext.CapV1_gsmSSF_to_gsmSCF && this.appCntx != CAPApplicationContext.CapV2_gsmSSF_to_gsmSCF && this.appCntx != CAPApplicationContext.CapV3_gsmSSF_scfGeneric && this.appCntx != CAPApplicationContext.CapV4_gsmSSF_scfGeneric && this.appCntx != CAPApplicationContext.CapV4_scf_gsmSSFGeneric) throw new CAPException( "Bad application context name for addContinueRequest: must be CapV1_gsmSSF_to_gsmSCF, CapV2_gsmSSF_to_gsmSCF, CapV3_gsmSSF_scfGeneric, CapV4_gsmSSF_scfGeneric or CapV4_scf_gsmSSFGeneric"); Invoke invoke = this.capProviderImpl.getTCAPProvider().getComponentPrimitiveFactory() .createTCInvokeRequest(InvokeClass.Class4); if (customInvokeTimeout == _Timer_Default) invoke.setTimeout(_Timer_CircuitSwitchedCallControl_Short); else invoke.setTimeout(customInvokeTimeout); OperationCode oc = this.capProviderImpl.getTCAPProvider().getComponentPrimitiveFactory().createOperationCode(); oc.setLocalOperationCode((long) CAPOperationCode.continueCode); invoke.setOperationCode(oc); Long invokeId; try { invokeId = this.tcapDialog.getNewInvokeId(); invoke.setInvokeId(invokeId); } catch (TCAPException e) { throw new CAPException(e.getMessage(), e); } this.sendInvokeComponent(invoke); return invokeId; }
oc.setLocalOperationCode((long) CAPOperationCode.disconnectForwardConnection); invoke.setOperationCode(oc);
oc.setLocalOperationCode((long) CAPOperationCode.activityTest); invoke.setOperationCode(oc);
public void addProcessUnstructuredSSResponse(long invokeId, CBSDataCodingScheme ussdDataCodingScheme, USSDString ussdString) throws MAPException { Return returnResult = this.mapProviderImpl.getTCAPProvider().getComponentPrimitiveFactory().createTCResultLastRequest(); returnResult.setInvokeId(invokeId); // Operation Code OperationCode oc = TcapFactory.createOperationCode(); oc.setLocalOperationCode((long) MAPOperationCode.processUnstructuredSS_Request); returnResult.setOperationCode(oc); ProcessUnstructuredSSResponseImpl req = new ProcessUnstructuredSSResponseImpl(ussdDataCodingScheme, ussdString); AsnOutputStream aos = new AsnOutputStream(); req.encodeData(aos); Parameter p = this.mapProviderImpl.getTCAPProvider().getComponentPrimitiveFactory().createParameter(); p.setTagClass(req.getTagClass()); p.setPrimitive(req.getIsPrimitive()); p.setTag(req.getTag()); p.setData(aos.toByteArray()); returnResult.setParameter(p); this.sendReturnResultLastComponent((ReturnResultLast) returnResult); }
@Override public Long addForwardCheckSSIndicationRequest(int customInvokeTimeout) throws MAPException { if ((this.appCntx.getApplicationContextName() != MAPApplicationContextName.networkLocUpContext) || ((this.appCntx.getApplicationContextVersion() != MAPApplicationContextVersion.version3) && (this.appCntx.getApplicationContextVersion() != MAPApplicationContextVersion.version2) && (this.appCntx .getApplicationContextVersion() != MAPApplicationContextVersion.version1))) throw new MAPException("Bad application context name for ForwardCheckSSIndicationRequest: must be networkLocUpContext_V1, V2 or V3"); Invoke invoke = this.mapProviderImpl.getTCAPProvider().getComponentPrimitiveFactory().createTCInvokeRequest(InvokeClass.Class4); if (customInvokeTimeout == _Timer_Default) invoke.setTimeout(_Timer_s); else invoke.setTimeout(customInvokeTimeout); OperationCode oc = this.mapProviderImpl.getTCAPProvider().getComponentPrimitiveFactory().createOperationCode(); oc.setLocalOperationCode((long) MAPOperationCode.forwardCheckSsIndication); invoke.setOperationCode(oc); ForwardCheckSSIndicationRequestImpl req = new ForwardCheckSSIndicationRequestImpl(); Long invokeId; try { invokeId = this.tcapDialog.getNewInvokeId(); invoke.setInvokeId(invokeId); } catch (TCAPException e) { throw new MAPException(e.getMessage(), e); } this.sendInvokeComponent(invoke); return invokeId; }
public void addUnstructuredSSResponse(long invokeId, CBSDataCodingScheme ussdDataCodingScheme, USSDString ussdString) throws MAPException { Return returnResult = this.mapProviderImpl.getTCAPProvider().getComponentPrimitiveFactory().createTCResultLastRequest(); returnResult.setInvokeId(invokeId); // Operation Code OperationCode oc = TcapFactory.createOperationCode(); oc.setLocalOperationCode((long) MAPOperationCode.unstructuredSS_Request); returnResult.setOperationCode(oc); if (ussdString != null) { UnstructuredSSResponseImpl req = new UnstructuredSSResponseImpl(ussdDataCodingScheme, ussdString); AsnOutputStream aos = new AsnOutputStream(); req.encodeData(aos); Parameter p = this.mapProviderImpl.getTCAPProvider().getComponentPrimitiveFactory().createParameter(); p.setTagClass(req.getTagClass()); p.setPrimitive(req.getIsPrimitive()); p.setTag(req.getTag()); p.setData(aos.toByteArray()); returnResult.setParameter(p); } this.sendReturnResultLastComponent((ReturnResultLast) returnResult); }
@Override public void addSendImsiResponse(long invokeId, IMSI imsi) throws MAPException { if ((this.appCntx.getApplicationContextName() != MAPApplicationContextName.imsiRetrievalContext) || (this.appCntx.getApplicationContextVersion() != MAPApplicationContextVersion.version2)) throw new MAPException("Bad application context name for addSendImsiResponse: must be imsiRetrievalContext_V2"); ReturnResultLast resultLast = this.mapProviderImpl.getTCAPProvider().getComponentPrimitiveFactory().createTCResultLastRequest(); resultLast.setInvokeId(invokeId); // Operation Code OperationCode oc = this.mapProviderImpl.getTCAPProvider().getComponentPrimitiveFactory().createOperationCode(); oc.setLocalOperationCode((long) MAPOperationCode.sendIMSI); resultLast.setOperationCode(oc); SendImsiResponseImpl req = new SendImsiResponseImpl(imsi); AsnOutputStream aos = new AsnOutputStream(); req.encodeData(aos); Parameter p = this.mapProviderImpl.getTCAPProvider().getComponentPrimitiveFactory().createParameter(); p.setTagClass(req.getTagClass()); p.setPrimitive(req.getIsPrimitive()); p.setTag(req.getTag()); p.setData(aos.toByteArray()); resultLast.setParameter(p); this.sendReturnResultLastComponent(resultLast); }
@Override public void addInterrogateSSResponse_BasicServiceGroupList(long invokeId, ArrayList<BasicServiceCode> basicServiceGroupList) throws MAPException { if ((this.appCntx.getApplicationContextName() != MAPApplicationContextName.networkFunctionalSsContext) || this.appCntx.getApplicationContextVersion() != MAPApplicationContextVersion.version2) throw new MAPException("Bad application context name for addInterrogateSSResponse: must be networkFunctionalSsContext_V2"); ReturnResultLast resultLast = this.mapProviderImpl.getTCAPProvider().getComponentPrimitiveFactory().createTCResultLastRequest(); resultLast.setInvokeId(invokeId); // Operation Code OperationCode oc = this.mapProviderImpl.getTCAPProvider().getComponentPrimitiveFactory().createOperationCode(); oc.setLocalOperationCode((long) MAPOperationCode.interrogateSS); resultLast.setOperationCode(oc); InterrogateSSResponseImpl req = new InterrogateSSResponseImpl(basicServiceGroupList, false); AsnOutputStream aos = new AsnOutputStream(); req.encodeData(aos); Parameter p = this.mapProviderImpl.getTCAPProvider().getComponentPrimitiveFactory().createParameter(); p.setTagClass(req.getTagClass()); p.setPrimitive(req.getIsPrimitive()); p.setTag(req.getTag()); p.setData(aos.toByteArray()); resultLast.setParameter(p); this.sendReturnResultLastComponent(resultLast); }
@Override public void addRegisterPasswordResponse(long invokeId, Password password) throws MAPException { if ((this.appCntx.getApplicationContextName() != MAPApplicationContextName.networkFunctionalSsContext) || this.appCntx.getApplicationContextVersion() != MAPApplicationContextVersion.version2) throw new MAPException("Bad application context name for addRegisterPasswordResponse: must be networkFunctionalSsContext_V2"); ReturnResultLast resultLast = this.mapProviderImpl.getTCAPProvider().getComponentPrimitiveFactory().createTCResultLastRequest(); resultLast.setInvokeId(invokeId); // Operation Code OperationCode oc = this.mapProviderImpl.getTCAPProvider().getComponentPrimitiveFactory().createOperationCode(); oc.setLocalOperationCode((long) MAPOperationCode.registerPassword); resultLast.setOperationCode(oc); RegisterPasswordResponseImpl req = new RegisterPasswordResponseImpl(password); AsnOutputStream aos = new AsnOutputStream(); req.encodeData(aos); Parameter p = this.mapProviderImpl.getTCAPProvider().getComponentPrimitiveFactory().createParameter(); p.setTagClass(req.getTagClass()); p.setPrimitive(req.getIsPrimitive()); p.setTag(req.getTag()); p.setData(aos.toByteArray()); resultLast.setParameter(p); this.sendReturnResultLastComponent(resultLast); }
@Override public void addInterrogateSSResponse_ForwardingFeatureList(long invokeId, ArrayList<ForwardingFeature> forwardingFeatureList) throws MAPException { if ((this.appCntx.getApplicationContextName() != MAPApplicationContextName.networkFunctionalSsContext) || this.appCntx.getApplicationContextVersion() != MAPApplicationContextVersion.version2) throw new MAPException("Bad application context name for addInterrogateSSResponse: must be networkFunctionalSsContext_V2"); ReturnResultLast resultLast = this.mapProviderImpl.getTCAPProvider().getComponentPrimitiveFactory().createTCResultLastRequest(); resultLast.setInvokeId(invokeId); // Operation Code OperationCode oc = this.mapProviderImpl.getTCAPProvider().getComponentPrimitiveFactory().createOperationCode(); oc.setLocalOperationCode((long) MAPOperationCode.interrogateSS); resultLast.setOperationCode(oc); InterrogateSSResponseImpl req = new InterrogateSSResponseImpl(forwardingFeatureList); AsnOutputStream aos = new AsnOutputStream(); req.encodeData(aos); Parameter p = this.mapProviderImpl.getTCAPProvider().getComponentPrimitiveFactory().createParameter(); p.setTagClass(req.getTagClass()); p.setPrimitive(req.getIsPrimitive()); p.setTag(req.getTag()); p.setData(aos.toByteArray()); resultLast.setParameter(p); this.sendReturnResultLastComponent(resultLast); }