⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 cmcall.h

📁 基于h323协议的软phone
💻 H
📖 第 1 页 / 共 2 页
字号:
 * Check cmCrossReference.c for details about the calls database.
 ************************************************************************/
typedef struct __callElem {
#ifdef RV_H323CALL_DEBUG_FLAGS
    struct
    {
        int                     remoteVersion;
        RvBool                  newCIDRequired;         /* RV_TRUE if we need to create a new CID.
                                                           This happens when we're forwarding the call */
        RvBool                  callInitiator;          /* RV_TRUE if this is the initiator of the call, RV_FALSE otherwise */
        RvBool                  dummyRAS;               /* There is no RAS in this call */
        RvBool                  enableOverlapSending;
        RvBool                  remoteCanOverlapSend;
        RvBool                  multiRate;
        RvBool                  overrideCID;            /* Indication that the CID parameter should be overriden in outgoing messages
                                                           when sendCallMessage() is called. This parameter is false only when
                                                           cmCallJoin() is called. */
        RvBool                  gatekeeperRouted;       /* RV_TRUE if callModel is gatekeeperRouted */

        RvBool                  notified;               /* RV_TRUE if application was already notified about this new incoming call */
        RvBool                  callWithoutQ931;        /* RV_TRUE if call started with incoming ARQ and no SETUP was received yet */
        RvBool                  control;                /* RV_TRUE if there is an H245 TCP connection for this call */
        RvBool                  h245Tunneling;
        RvBool                  notEstablishControl;
        RvBool                  isParallelTunneling;
        cmH245Stage             h245Stage;
        RvBool                  isMultiplexed;
        RvBool                  shutdownEmptyConnection;
        RvBool                  fastStartFinished;
        RvBool                  controlDisconnected;
        RvBool                  preservedCall;
        RvBool                  callDialInvoked;        /* RV_TRUE if cmCallDial() was already called for outgoing calls */
        RvBool                  sendCallProceeding;
        RvBool                  sendAlerting;
    } flags;
#else
    RvUint32                flags;
#endif  /* RV_H323CALL_DEBUG_FLAGS */

    HSTRANSSESSION          hsTransSession;
    cmConferenceGoalType    conferenceGoal;
    cmCallState_e           state;
    cmCallStateMode_e       stateMode;


    RvUint8                 callId[16];             /* CallIdentifier of the call */
    RvUint8                 cId[16];                /* ConferenceIdentifier of the call */

    void*                   hMsgContext;            /* Message context for last message received on call. Used for security checks */
    int                     crv;                    /* Q931 CRV of the call */
    int                     rascrv;                 /* RAS CRV of the call */

    int                     rate;
    int                     newRate;

    RvTimer*                timer;
    cmPreGrantedArqUse      preGrantedArqUse;
    cmAnnexEUsageMode       annexE;
    RVHCATCALL              hCatCall;               /* CallAssociationTable handle for this call */
    RvPvtNodeId             routeCallSignalAddress;
    RvPvtNodeId             callSignalAddress;      /* The address of destination of the callSignaling connection */
                                                    /* The remote for outgoing call */
                                                    /* The local for incoming call */
    RvPvtNodeId             remoteCallSignalAddress;/* The remote callSignaling address for the incoming call */
    RvPvtNodeId             annexECallSignalAddress;
    RvPvtNodeId             destinationInfo;

    HCHAN                   firstChan; /* First channel for this call. Others are linked to it */

    /*Control*/
    int                     lcnOut; /* todo: I want another explanation of this mechanism (tsahi) */

    /* transport related parameters */

    /* fast start */
    int                     fastStartState;         /* State of fastStart procedure of this call (fssNo, fssRequest, fssAck) */
    RvPvtNodeId*            fastStartNodes;
    int                     fastStartNodesCount;
    RvPvtNodeId*            fastStartNodesAck;
    int                     fastStartNodesAckCount;
    RvUint8*                fastStartIndexes;

    /* parameters */
    RvPvtNodeId             property;               /* PVT root of the property database for the call */
    RvPvtNodeId             paramNodeId[cmEnumLast];/* Parameters that are used if we're running without a property DB */
    RvPvtNodeId             lastSentMessageNodeId;  /* NodeID of the last send message. This parameter is used when we're
                                                       running without a property DB */
    /* state queue - this is a cyclic queue */
    RvUint8                 q_nextState; /* Index of the next state we should handle */
    RvUint8                 q_numStates; /* Number of state currently in the queue */
    RvUint8                 q_states[RV_H323CALL_STATE_MAX];
    RvUint8                 q_stateModes[RV_H323CALL_STATE_MAX];
} callElem;



/* Make sure we don't have too many flags */
#if (e_lastCallFlag > 32)
#error Too many flags for the element callElem.flags
#endif



/************************************************************************
 * callStartOK
 * purpose: Deal with an outgoing or incoming call in the Q931 side, after
 *          RAS was done (or skiped)
 * input  : call    - Stack handle for the call to dial
 * output : none
 * return : Non-negative value on success
 *          Negative value on failure
 ************************************************************************/
int callStartOK(IN callElem* call);


int callStartRoute(callElem*call);
int callStartError(callElem*call);
int callIncompleteAddress(callElem*call);

/************************************************************************
 * rasCallDrop
 * purpose: Call drop was initiated by an incoming DRQ message from the
 *          gatekeeper
 * input  : call      - Stack handle for the call
 * output : none
 * return : Non-negative value on success
 *          Negative value on failure
 ************************************************************************/
int rasCallDrop(IN callElem* call);

/************************************************************************
 * callStopOK
 * purpose: We've finished dropping the call.
 *          Notify the application we've reached the Idle state on this call
 * input  : hsCall      - Stack handle for the call
 * output : none
 * return : Non-negative value on success
 *          Negative value on failure
 ************************************************************************/
int callStopOK(IN callElem* call);

int callStopError(callElem*call);

/************************************************************************
 * callNewRate
 * purpose: Notify the applicatino about the rate of the call
 * input  : call      - Stack handle for the call
 * output : none
 * return : none
 ************************************************************************/
void callNewRate(IN callElem* call);

/************************************************************************
 * sendCallMessage
 * purpose: Send Q931 message for a given call.
 *          This function also adds specific call-related information
 * input  : hsCall  - Stack handle for the Q931 call
 *          message - root node ID of the message to send
 * output : none
 * return : Non-negative value on success
 *          Negative value on failure
 ************************************************************************/
int sendCallMessage(IN HCALL hsCall, IN RvPvtNodeId message);

/************************************************************************
 * sendMessage
 * purpose: Send TCP (Q931/H245) message for a given call.
 *          This function also adds specific call-related information
 * input  : hsCall  - Stack handle for the call
 *          vNodeId - root node ID of the message to send
 *          type    - Type of channel to send on
 * output : none
 * return : Non-negative value on success
 *          Negative value on failure
 ************************************************************************/
int sendMessage(IN HCALL hsCall, IN RvPvtNodeId vNodeId, IN cmTpktChanHandleType type);

int cmEvRASNewCall(HAPP hApp, RVHCATCALL* lphCatCall, catStruct* callObj);

/************************************************************************
 * cmIndicate
 * purpose: Indicate and process an incoming Q931 message
 * input  : call    - Stack handle for the call
 *          message - Message root node
 *          msgType - Type of the message
 * output : none
 * return : Non-negative value on success
 *          negative value on failure
 ************************************************************************/
int cmIndicate(IN HCALL call, IN int message, IN int msgType);


/************************************************************************
 * callMibGetSession
 * purpose: Get the session of a handle for the MIB.
 *          This function is used to access the transport layer for MIB
 *          specific information
 * input  : call    - Stack handle for the call
 * output : none
 * return : Session of the call on success
 *          NULL on failure
 ************************************************************************/
HSTRANSSESSION callMibGetSession(IN HCALL call);

/**********************************************************************
* cmSetupEnd
* This function is responsible for the end of the scenatio of receiving
* a setup message. It was taken out of the cmSetup in order to give the
* endpoint time to receive ACF before sending AutoConnect (when autoRas
* and autoConnect are on).
************************************************************************/
int cmSetupEnd(IN callElem* call);


#ifdef __cplusplus
}
#endif

#endif  /* _CMCALL_ */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -