当前位置: 首页>>代码示例>>Java>>正文


Java Invoke类代码示例

本文整理汇总了Java中org.mobicents.protocols.ss7.tcap.asn.comp.Invoke的典型用法代码示例。如果您正苦于以下问题:Java Invoke类的具体用法?Java Invoke怎么用?Java Invoke使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


Invoke类属于org.mobicents.protocols.ss7.tcap.asn.comp包,在下文中一共展示了Invoke类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getMAPv1ApplicationContext

import org.mobicents.protocols.ss7.tcap.asn.comp.Invoke; //导入依赖的package包/类
@Override
public MAPApplicationContext getMAPv1ApplicationContext(int operationCode, Invoke invoke) {

    switch (operationCode) {
        case MAPOperationCode.mo_forwardSM:
            return MAPApplicationContext.getInstance(MAPApplicationContextName.shortMsgMORelayContext,
                    MAPApplicationContextVersion.version1);
        case MAPOperationCode.alertServiceCentreWithoutResult:
            return MAPApplicationContext.getInstance(MAPApplicationContextName.shortMsgAlertContext,
                    MAPApplicationContextVersion.version1);
        case MAPOperationCode.sendRoutingInfoForSM:
            return MAPApplicationContext.getInstance(MAPApplicationContextName.shortMsgGatewayContext,
                    MAPApplicationContextVersion.version1);
        case MAPOperationCode.reportSM_DeliveryStatus:
            return MAPApplicationContext.getInstance(MAPApplicationContextName.shortMsgGatewayContext,
                    MAPApplicationContextVersion.version1);
        case MAPOperationCode.noteSubscriberPresent:
            return MAPApplicationContext.getInstance(MAPApplicationContextName.mwdMngtContext,
                    MAPApplicationContextVersion.version1);
    }

    return null;
}
 
开发者ID:RestComm,项目名称:phone-simulator,代码行数:24,代码来源:MAPServiceSmsImpl.java

示例2: onInvokeTimeout

import org.mobicents.protocols.ss7.tcap.asn.comp.Invoke; //导入依赖的package包/类
public void onInvokeTimeout(Invoke invoke) {

        MAPDialogImpl mapDialogImpl = (MAPDialogImpl) this.getMAPDialog(((InvokeImpl) invoke).getDialog().getLocalDialogId());

        if (mapDialogImpl != null) {
            try {
                mapDialogImpl.getTcapDialog().getDialogLock().lock();

                if (mapDialogImpl.getState() != MAPDialogState.EXPUNGED) {

                    // Getting the MAP Service that serves the MAP Dialog
                    MAPServiceBaseImpl perfSer = (MAPServiceBaseImpl) mapDialogImpl.getService();

                    // We do not send invokeTimeout for Class 4 invokes
                    if (invoke.getInvokeClass() == InvokeClass.Class4)
                        return;

                    perfSer.deliverInvokeTimeout(mapDialogImpl, invoke);
                }
            } finally {
                mapDialogImpl.getTcapDialog().getDialogLock().unlock();
            }
        }
    }
 
开发者ID:RestComm,项目名称:phone-simulator,代码行数:25,代码来源:MAPProviderImpl.java

示例3: getMAPv1ApplicationContext

import org.mobicents.protocols.ss7.tcap.asn.comp.Invoke; //导入依赖的package包/类
@Override
public MAPApplicationContext getMAPv1ApplicationContext(int operationCode, Invoke invoke) {
    switch (operationCode) {
        case MAPOperationCode.sendRoutingInfo:
            return MAPApplicationContext.getInstance(MAPApplicationContextName.locationInfoRetrievalContext,
                    MAPApplicationContextVersion.version1);
        case MAPOperationCode.provideRoamingNumber:
            return MAPApplicationContext.getInstance(MAPApplicationContextName.roamingNumberEnquiryContext,
                    MAPApplicationContextVersion.version1);
    }

    return null;
}
 
开发者ID:RestComm,项目名称:phone-simulator,代码行数:14,代码来源:MAPServiceCallHandlingImpl.java

示例4: addSendImsiRequest

import org.mobicents.protocols.ss7.tcap.asn.comp.Invoke; //导入依赖的package包/类
@Override
public Long addSendImsiRequest(int customInvokeTimeout, ISDNAddressString msisdn) throws MAPException {
    if ((this.appCntx.getApplicationContextName() != MAPApplicationContextName.imsiRetrievalContext)
            || (this.appCntx.getApplicationContextVersion() != MAPApplicationContextVersion.version2))
        throw new MAPException("Bad application context name for sendImsiRequest: must be imsiRetrievalContext_V2");

    Invoke invoke = this.mapProviderImpl.getTCAPProvider().getComponentPrimitiveFactory().createTCInvokeRequest();
    if (customInvokeTimeout == _Timer_Default)
        invoke.setTimeout(_Timer_m);
    else
        invoke.setTimeout(customInvokeTimeout);

    OperationCode oc = this.mapProviderImpl.getTCAPProvider().getComponentPrimitiveFactory().createOperationCode();
    oc.setLocalOperationCode((long) MAPOperationCode.sendIMSI);
    invoke.setOperationCode(oc);

    SendImsiRequestImpl req = new SendImsiRequestImpl(msisdn);
    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());
    invoke.setParameter(p);

    Long invokeId;
    try {
        invokeId = this.tcapDialog.getNewInvokeId();
        invoke.setInvokeId(invokeId);
    } catch (TCAPException e) {
        throw new MAPException(e.getMessage(), e);
    }

    this.sendInvokeComponent(invoke);

    return invokeId;
}
 
开发者ID:RestComm,项目名称:phone-simulator,代码行数:40,代码来源:MAPDialogOamImpl.java

示例5: getPasswordRequest

import org.mobicents.protocols.ss7.tcap.asn.comp.Invoke; //导入依赖的package包/类
private void getPasswordRequest(Parameter parameter, MAPDialogSupplementaryImpl mapDialogImpl, Long invokeId, Long linkedId, Invoke linkedInvoke)
        throws MAPParsingComponentException {
    if (parameter == null)
        throw new MAPParsingComponentException("Error while decoding getPasswordRequest: Parameter is mandatory but not found",
                MAPParsingComponentExceptionReason.MistypedParameter);

    if (parameter.getTag() != Tag.ENUMERATED || parameter.getTagClass() != Tag.CLASS_UNIVERSAL || !parameter.isPrimitive())
        throw new MAPParsingComponentException(
                "Error while decoding getPasswordRequest: Bad tag or tagClass or parameter is not primitive, received tag=" + parameter.getTag(),
                MAPParsingComponentExceptionReason.MistypedParameter);

    byte[] buf = parameter.getData();
    AsnInputStream ais = new AsnInputStream(buf, parameter.getTagClass(), parameter.isPrimitive(), parameter.getTag());

    GetPasswordRequestImpl ind = new GetPasswordRequestImpl();
    ind.decodeData(ais, buf.length);
    ind.setInvokeId(invokeId);
    ind.setLinkedId(linkedId);
    ind.setLinkedInvoke(linkedInvoke);
    ind.setMAPDialog(mapDialogImpl);

    for (MAPServiceListener serLis : this.serviceListeners) {
        try {
            serLis.onMAPMessage(ind);
            ((MAPServiceSupplementaryListener) serLis).onGetPasswordRequest(ind);
        } catch (Exception e) {
            loger.error("Error processing onGetPasswordRequest: " + e.getMessage(), e);
        }
    }
}
 
开发者ID:RestComm,项目名称:phone-simulator,代码行数:31,代码来源:MAPServiceSupplementaryImpl.java

示例6: addEraseSSRequest

import org.mobicents.protocols.ss7.tcap.asn.comp.Invoke; //导入依赖的package包/类
@Override
public Long addEraseSSRequest(int customInvokeTimeout, SSForBSCode ssForBSCode) throws MAPException {
    if ((this.appCntx.getApplicationContextName() != MAPApplicationContextName.networkFunctionalSsContext)
            || this.appCntx.getApplicationContextVersion() != MAPApplicationContextVersion.version2)
        throw new MAPException("Bad application context name for addEraseSSRequest: must be networkFunctionalSsContext_V2");

    Invoke invoke = this.mapProviderImpl.getTCAPProvider().getComponentPrimitiveFactory().createTCInvokeRequest();
    if (customInvokeTimeout == _Timer_Default)
        invoke.setTimeout(_Timer_m);
    else
        invoke.setTimeout(customInvokeTimeout);

    OperationCode oc = this.mapProviderImpl.getTCAPProvider().getComponentPrimitiveFactory().createOperationCode();
    oc.setLocalOperationCode((long) MAPOperationCode.eraseSS);
    invoke.setOperationCode(oc);

    EraseSSRequestImpl req = new EraseSSRequestImpl(ssForBSCode);
    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());
    invoke.setParameter(p);

    Long invokeId;
    try {
        invokeId = this.tcapDialog.getNewInvokeId();
        invoke.setInvokeId(invokeId);
    } catch (TCAPException e) {
        throw new MAPException(e.getMessage(), e);
    }

    this.sendInvokeComponent(invoke);

    return invokeId;
}
 
开发者ID:RestComm,项目名称:phone-simulator,代码行数:40,代码来源:MAPDialogSupplementaryImpl.java

示例7: addActivateSSRequest

import org.mobicents.protocols.ss7.tcap.asn.comp.Invoke; //导入依赖的package包/类
@Override
public Long addActivateSSRequest(int customInvokeTimeout, SSForBSCode ssForBSCode) throws MAPException {
    if ((this.appCntx.getApplicationContextName() != MAPApplicationContextName.networkFunctionalSsContext)
            || this.appCntx.getApplicationContextVersion() != MAPApplicationContextVersion.version2)
        throw new MAPException("Bad application context name for addActivateSSRequest: must be networkFunctionalSsContext_V2");

    Invoke invoke = this.mapProviderImpl.getTCAPProvider().getComponentPrimitiveFactory().createTCInvokeRequest();
    if (customInvokeTimeout == _Timer_Default)
        invoke.setTimeout(_Timer_m);
    else
        invoke.setTimeout(customInvokeTimeout);

    OperationCode oc = this.mapProviderImpl.getTCAPProvider().getComponentPrimitiveFactory().createOperationCode();
    oc.setLocalOperationCode((long) MAPOperationCode.activateSS);
    invoke.setOperationCode(oc);

    ActivateSSRequestImpl req = new ActivateSSRequestImpl(ssForBSCode);
    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());
    invoke.setParameter(p);

    Long invokeId;
    try {
        invokeId = this.tcapDialog.getNewInvokeId();
        invoke.setInvokeId(invokeId);
    } catch (TCAPException e) {
        throw new MAPException(e.getMessage(), e);
    }

    this.sendInvokeComponent(invoke);

    return invokeId;
}
 
开发者ID:RestComm,项目名称:phone-simulator,代码行数:40,代码来源:MAPDialogSupplementaryImpl.java

示例8: addDeactivateSSRequest

import org.mobicents.protocols.ss7.tcap.asn.comp.Invoke; //导入依赖的package包/类
@Override
public Long addDeactivateSSRequest(int customInvokeTimeout, SSForBSCode ssForBSCode) throws MAPException {
    if ((this.appCntx.getApplicationContextName() != MAPApplicationContextName.networkFunctionalSsContext)
            || this.appCntx.getApplicationContextVersion() != MAPApplicationContextVersion.version2)
        throw new MAPException("Bad application context name for addDeactivateSSRequest: must be networkFunctionalSsContext_V2");

    Invoke invoke = this.mapProviderImpl.getTCAPProvider().getComponentPrimitiveFactory().createTCInvokeRequest();
    if (customInvokeTimeout == _Timer_Default)
        invoke.setTimeout(_Timer_m);
    else
        invoke.setTimeout(customInvokeTimeout);

    OperationCode oc = this.mapProviderImpl.getTCAPProvider().getComponentPrimitiveFactory().createOperationCode();
    oc.setLocalOperationCode((long) MAPOperationCode.deactivateSS);
    invoke.setOperationCode(oc);

    DeactivateSSRequestImpl req = new DeactivateSSRequestImpl(ssForBSCode);
    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());
    invoke.setParameter(p);

    Long invokeId;
    try {
        invokeId = this.tcapDialog.getNewInvokeId();
        invoke.setInvokeId(invokeId);
    } catch (TCAPException e) {
        throw new MAPException(e.getMessage(), e);
    }

    this.sendInvokeComponent(invoke);

    return invokeId;
}
 
开发者ID:RestComm,项目名称:phone-simulator,代码行数:40,代码来源:MAPDialogSupplementaryImpl.java

示例9: addInterrogateSSRequest

import org.mobicents.protocols.ss7.tcap.asn.comp.Invoke; //导入依赖的package包/类
@Override
public Long addInterrogateSSRequest(int customInvokeTimeout, SSForBSCode ssForBSCode) throws MAPException {
    if ((this.appCntx.getApplicationContextName() != MAPApplicationContextName.networkFunctionalSsContext)
            || this.appCntx.getApplicationContextVersion() != MAPApplicationContextVersion.version2)
        throw new MAPException("Bad application context name for addInterrogateSSRequest: must be networkFunctionalSsContext_V2");

    Invoke invoke = this.mapProviderImpl.getTCAPProvider().getComponentPrimitiveFactory().createTCInvokeRequest();
    if (customInvokeTimeout == _Timer_Default)
        invoke.setTimeout(_Timer_m);
    else
        invoke.setTimeout(customInvokeTimeout);

    OperationCode oc = this.mapProviderImpl.getTCAPProvider().getComponentPrimitiveFactory().createOperationCode();
    oc.setLocalOperationCode((long) MAPOperationCode.interrogateSS);
    invoke.setOperationCode(oc);

    InterrogateSSRequestImpl req = new InterrogateSSRequestImpl(ssForBSCode);
    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());
    invoke.setParameter(p);

    Long invokeId;
    try {
        invokeId = this.tcapDialog.getNewInvokeId();
        invoke.setInvokeId(invokeId);
    } catch (TCAPException e) {
        throw new MAPException(e.getMessage(), e);
    }

    this.sendInvokeComponent(invoke);

    return invokeId;
}
 
开发者ID:RestComm,项目名称:phone-simulator,代码行数:40,代码来源:MAPDialogSupplementaryImpl.java

示例10: addGetPasswordRequest

import org.mobicents.protocols.ss7.tcap.asn.comp.Invoke; //导入依赖的package包/类
@Override
public Long addGetPasswordRequest(int customInvokeTimeout, Long linkedId, GuidanceInfo guidanceInfo) throws MAPException {
    if ((this.appCntx.getApplicationContextName() != MAPApplicationContextName.networkFunctionalSsContext)
            || this.appCntx.getApplicationContextVersion() != MAPApplicationContextVersion.version2)
        throw new MAPException("Bad application context name for addGetPasswordRequest: must be networkFunctionalSsContext_V2");

    Invoke invoke = this.mapProviderImpl.getTCAPProvider().getComponentPrimitiveFactory().createTCInvokeRequest();
    if (customInvokeTimeout == _Timer_Default)
        invoke.setTimeout(_Timer_ml);
    else
        invoke.setTimeout(customInvokeTimeout);

    OperationCode oc = this.mapProviderImpl.getTCAPProvider().getComponentPrimitiveFactory().createOperationCode();
    oc.setLocalOperationCode((long) MAPOperationCode.getPassword);
    invoke.setOperationCode(oc);

    GetPasswordRequestImpl req = new GetPasswordRequestImpl(guidanceInfo);
    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());
    invoke.setParameter(p);

    Long invokeId;
    try {
        invokeId = this.tcapDialog.getNewInvokeId();
        invoke.setInvokeId(invokeId);
        invoke.setLinkedId(linkedId);
    } catch (TCAPException e) {
        throw new MAPException(e.getMessage(), e);
    }

    this.sendInvokeComponent(invoke);

    return invokeId;
}
 
开发者ID:RestComm,项目名称:phone-simulator,代码行数:41,代码来源:MAPDialogSupplementaryImpl.java

示例11: addRegisterPasswordRequest

import org.mobicents.protocols.ss7.tcap.asn.comp.Invoke; //导入依赖的package包/类
@Override
public Long addRegisterPasswordRequest(int customInvokeTimeout, SSCode ssCode) throws MAPException {
    if ((this.appCntx.getApplicationContextName() != MAPApplicationContextName.networkFunctionalSsContext)
            || this.appCntx.getApplicationContextVersion() != MAPApplicationContextVersion.version2)
        throw new MAPException("Bad application context name for addRegisterPasswordRequest: must be networkFunctionalSsContext_V2");

    Invoke invoke = this.mapProviderImpl.getTCAPProvider().getComponentPrimitiveFactory().createTCInvokeRequest();
    if (customInvokeTimeout == _Timer_Default)
        invoke.setTimeout(_Timer_m);
    else
        invoke.setTimeout(customInvokeTimeout);

    OperationCode oc = this.mapProviderImpl.getTCAPProvider().getComponentPrimitiveFactory().createOperationCode();
    oc.setLocalOperationCode((long) MAPOperationCode.registerPassword);
    invoke.setOperationCode(oc);

    RegisterPasswordRequestImpl req = new RegisterPasswordRequestImpl(ssCode);
    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());
    invoke.setParameter(p);

    Long invokeId;
    try {
        invokeId = this.tcapDialog.getNewInvokeId();
        invoke.setInvokeId(invokeId);
    } catch (TCAPException e) {
        throw new MAPException(e.getMessage(), e);
    }

    this.sendInvokeComponent(invoke);

    return invokeId;
}
 
开发者ID:RestComm,项目名称:phone-simulator,代码行数:40,代码来源:MAPDialogSupplementaryImpl.java

示例12: addProcessUnstructuredSSRequest

import org.mobicents.protocols.ss7.tcap.asn.comp.Invoke; //导入依赖的package包/类
public Long addProcessUnstructuredSSRequest(int customInvokeTimeout, CBSDataCodingScheme ussdDataCodingScheme,
        USSDString ussdString, AlertingPattern alertingPatter, ISDNAddressString msisdn) throws MAPException {

    Invoke invoke = this.mapProviderImpl.getTCAPProvider().getComponentPrimitiveFactory().createTCInvokeRequest();
    if (customInvokeTimeout == _Timer_Default)
        invoke.setTimeout(600000); // 10 minutes
    else
        invoke.setTimeout(customInvokeTimeout);

    // Operation Code
    OperationCode oc = TcapFactory.createOperationCode();
    oc.setLocalOperationCode((long) MAPOperationCode.processUnstructuredSS_Request);
    invoke.setOperationCode(oc);

    ProcessUnstructuredSSRequestImpl req = new ProcessUnstructuredSSRequestImpl(ussdDataCodingScheme, ussdString,
            alertingPatter, msisdn);
    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());
    invoke.setParameter(p);

    Long invokeId;
    try {
        invokeId = this.tcapDialog.getNewInvokeId();
        invoke.setInvokeId(invokeId);
    } catch (TCAPException e) {
        throw new MAPException(e.getMessage(), e);
    }

    this.sendInvokeComponent(invoke);

    return invokeId;

}
 
开发者ID:RestComm,项目名称:phone-simulator,代码行数:40,代码来源:MAPDialogSupplementaryImpl.java

示例13: addUnstructuredSSRequest

import org.mobicents.protocols.ss7.tcap.asn.comp.Invoke; //导入依赖的package包/类
public Long addUnstructuredSSRequest(int customInvokeTimeout, CBSDataCodingScheme ussdDataCodingScheme,
        USSDString ussdString, AlertingPattern alertingPatter, ISDNAddressString msisdn) throws MAPException {

    Invoke invoke = this.mapProviderImpl.getTCAPProvider().getComponentPrimitiveFactory().createTCInvokeRequest();
    if (customInvokeTimeout == _Timer_Default)
        invoke.setTimeout(_Timer_ml);
    else
        invoke.setTimeout(customInvokeTimeout);

    // Operation Code
    OperationCode oc = TcapFactory.createOperationCode();
    oc.setLocalOperationCode((long) MAPOperationCode.unstructuredSS_Request);
    invoke.setOperationCode(oc);

    UnstructuredSSRequestImpl req = new UnstructuredSSRequestImpl(ussdDataCodingScheme, ussdString, alertingPatter, msisdn);
    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());
    invoke.setParameter(p);

    Long invokeId;
    try {
        invokeId = this.tcapDialog.getNewInvokeId();
        invoke.setInvokeId(invokeId);
    } catch (TCAPException e) {
        throw new MAPException(e.getMessage(), e);
    }

    this.sendInvokeComponent(invoke);

    return invokeId;
}
 
开发者ID:RestComm,项目名称:phone-simulator,代码行数:38,代码来源:MAPDialogSupplementaryImpl.java

示例14: addUnstructuredSSNotifyRequest

import org.mobicents.protocols.ss7.tcap.asn.comp.Invoke; //导入依赖的package包/类
public Long addUnstructuredSSNotifyRequest(int customInvokeTimeout, CBSDataCodingScheme ussdDataCodingScheme,
        USSDString ussdString, AlertingPattern alertingPatter, ISDNAddressString msisdn) throws MAPException {

    Invoke invoke = this.mapProviderImpl.getTCAPProvider().getComponentPrimitiveFactory().createTCInvokeRequest();
    if (customInvokeTimeout == _Timer_Default)
        invoke.setTimeout(_Timer_ml);
    else
        invoke.setTimeout(customInvokeTimeout);

    // Operation Code
    OperationCode oc = TcapFactory.createOperationCode();
    oc.setLocalOperationCode((long) MAPOperationCode.unstructuredSS_Notify);
    invoke.setOperationCode(oc);

    if (ussdString != null) {
        UnstructuredSSRequestImpl req = new UnstructuredSSRequestImpl(ussdDataCodingScheme, ussdString, alertingPatter, msisdn);
        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());
        invoke.setParameter(p);
    }

    Long invokeId;
    try {
        invokeId = this.tcapDialog.getNewInvokeId();
        invoke.setInvokeId(invokeId);
    } catch (TCAPException e) {
        throw new MAPException(e.getMessage(), e);
    }

    this.sendInvokeComponent(invoke);

    return invokeId;
}
 
开发者ID:RestComm,项目名称:phone-simulator,代码行数:40,代码来源:MAPDialogSupplementaryImpl.java

示例15: processComponent

import org.mobicents.protocols.ss7.tcap.asn.comp.Invoke; //导入依赖的package包/类
public void processComponent(ComponentType compType, OperationCode oc, Parameter parameter, MAPDialog mapDialog,
            Long invokeId, Long linkedId, Invoke linkedInvoke) throws MAPParsingComponentException {

        // if an application-context-name different from version 1 is
        // received in a syntactically correct TC-
        // BEGIN indication primitive but is not acceptable from a load
        // control point of view, the MAP PM
        // shall ignore this dialogue request. The MAP-user is not informed.
//        if (compType == ComponentType.Invoke && this.mapProviderImpl.isCongested()) {
//            // TODO: we need to care of conjection control
//        }

        MAPDialogPdpContextActivationImpl mapDialogPdpContextActivationImpl = (MAPDialogPdpContextActivationImpl) mapDialog;

        Long ocValue = oc.getLocalOperationCode();
        if (ocValue == null)
            new MAPParsingComponentException("", MAPParsingComponentExceptionReason.UnrecognizedOperation);
        MAPApplicationContextName acn = mapDialog.getApplicationContext().getApplicationContextName();
        int vers = mapDialog.getApplicationContext().getApplicationContextVersion().getVersion();
        int ocValueInt = (int) (long) ocValue;

        switch (ocValueInt) {
        case MAPOperationCode.sendRoutingInfoForGprs:
            if (acn == MAPApplicationContextName.gprsLocationInfoRetrievalContext || acn == MAPApplicationContextName.shortMsgMTRelayContext) {
                if (compType == ComponentType.Invoke)
                    this.sendRoutingInfoForGprsRequest(parameter, mapDialogPdpContextActivationImpl, invokeId);
                else
                    this.sendRoutingInfoForGprsResponse(parameter, mapDialogPdpContextActivationImpl, invokeId);
            }
            break;
        default:
            throw new MAPParsingComponentException("MAPServicePdpContextActivation: unknown incoming operation code: " + ocValueInt,
                    MAPParsingComponentExceptionReason.UnrecognizedOperation);
        }
    }
 
开发者ID:RestComm,项目名称:phone-simulator,代码行数:36,代码来源:MAPServicePdpContextActivationImpl.java


注:本文中的org.mobicents.protocols.ss7.tcap.asn.comp.Invoke类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。