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

📄 cm.h

📁 基于h323协议的软phone
💻 H
📖 第 1 页 / 共 5 页
字号:
/************************************************************************
 * cmCallAccept
 * purpose: Accepts an incoming call and sends Q.931 ALERTING message to
 *          calling party
 * input  : hsCall      - Stack handle for the call
 * output : none
 * return : Non-negative value on success
 *          Negative value on failure
 ************************************************************************/
RVAPI
int RVCALLCONV cmCallAccept(
        IN    HCALL       hsCall);


/************************************************************************
 * cmCallDrop
 * purpose: Drops a call
 * input  : hsCall      - Stack handle for the call
 * output : none
 * return : Non-negative value on success
 *          Negative value on failure
 ************************************************************************/
RVAPI
int RVCALLCONV cmCallDrop(IN  HCALL       hsCall);


RVAPI
int RVCALLCONV cmCallDropParam(
        IN  HCALL           hsCall,
                IN      cmReasonType        cmReason);
RVAPI
int RVCALLCONV cmCallClose(
        IN      HCALL               hsCall);

RVAPI
int RVCALLCONV cmCallGetCallingPartyId(
        IN      HCALL               hsCall,
        OUT     char*               callerId,
        IN      int                 size);

#define cmCallGetCallerId cmCallGetCallingPartyId

RVAPI
int RVCALLCONV cmCallGetCalledPartyId(
        IN      HCALL               hsCall,
        OUT     char*               calledPartyId,
        IN      int                 size);

RVAPI
int RVCALLCONV cmCallGetRate(
        IN      HCALL               hsCall,
        OUT     RvUint32*           rate);

RVAPI
int RVCALLCONV cmCallGetOrigin(
        IN      HCALL               hsCall,
        OUT     RvBool*             origin);

RVAPI
int RVCALLCONV cmCallSetRate(
        IN      HCALL               hsCall,
        IN      RvUint32            rate);


RVAPI
int RVCALLCONV cmCallForward(
        IN  HCALL       hsCall,
        IN  char*       destAddress);


RVAPI
int RVCALLCONV cmCallGetNumOfParams(
        IN      HCALL               hsCall,
        IN      cmCallParam         param);


RVAPI
int RVCALLCONV cmCallGetParam(
        IN      HCALL               hsCall,
        IN      cmCallParam         param,
        IN      int                 index,
        INOUT   RvInt32*            value,
        OUT     char *              svalue);

RVAPI
int RVCALLCONV cmCallSetParam(
        IN      HCALL               hsCall,
        IN      cmCallParam         param,
        IN      int                 index,
        IN      RvInt32             value,
        IN      char *              svalue);


/************************************************************************
 * cmCallDeleteParam
 * purpose: Delete a parameter that was set in the call.
 * input  : hsCall      - Stack handle for the call
 *          param       - Parameter to delete
 *          index       - Index of parameter to delete (1-based)
 *                        Should be 0 for non-array parameters
 * output : none
 * return : Non-negative value on success
 *          Negative value on failure
 ************************************************************************/
RVAPI
int RVCALLCONV cmCallDeleteParam(
        IN      HCALL               hsCall,
        IN      cmCallParam         param,
        IN      int                 index);


/************************************************************************
 * cmCallGetMessage
 * purpose: Get a Q931 message for the given call. It creates the necessary
 *          message or just take it from the property database of the call.
 *          This function cannot be used when using DoNotUseProperty
 *          property mode on the calls (determined through the configuration).
 *          It is suggested to use this function when trying to add elements
 *          to an outgoing Q931 message that are not given in cmCallSetParam()
 * input  : hsCall      - Stack's call handle
 *          messageType - Type of message to get
 * output : none
 * return : PVT nodeId of the message on success
 *          Negative value on failure
 ************************************************************************/
RVAPI RvPvtNodeId RVCALLCONV cmCallGetMessage(
    IN  HCALL               hsCall,
    IN  cmCallQ931MsgType   messageType);


RVAPI
HPVT RVCALLCONV cmGetValTree(
                IN  HAPP             hApp);



RVAPI
HPST RVCALLCONV cmGetSynTreeByRootName(
                IN  HAPP            hApp,
                IN  char*           name);

RVAPI
RvInt32 RVCALLCONV cmGetQ931ConfigurationHandle(
                IN  HAPP            hApp);


RVAPI
int RVCALLCONV cmCallJoin(
                IN      HCALL               hsCall,
                IN      HCALL               hsSameConferenceCall);

RVAPI
int RVCALLCONV cmCallInvite(
                IN      HCALL               hsCall,
                IN      HCALL               hsSameConferenceCall);

RVAPI
int RVCALLCONV cmCallIsSameConference(
        IN  HCALL           hsCall,
                IN  HCALL           hsAnotherCall);

RVAPI char* RVCALLCONV
cmGetProtocolMessageName(
                IN      HAPP                hApp,
                IN      int                 msg);



RVAPI
int RVCALLCONV cmCallGetRemoteEndpointInfoHandle(
        IN  HCALL       hsCall);

RVAPI
int RVCALLCONV cmCallGetLocalEndpointInfoHandle(
        IN  HCALL       hsCall);

RVAPI
int RVCALLCONV cmGetEndpointInfoHandle(
        IN  HAPP        hApp);



RVAPI
int RVCALLCONV cmGetParam(
        IN HAPP         hApp,
        IN cmParam      param,
        IN int          index,
        IN RvInt32*     value,
        IN char *       svalue);


RVAPI int RVCALLCONV
cmSetHandle(
        IN      HAPP                hApp,
        IN      HAPPAPP     haApp);

RVAPI int RVCALLCONV
cmGetHandle(
        IN      HAPP                hApp,
        IN      HAPPAPP*        haApp);

/* nonStandard handling_______________________________________________________________*/

RVAPI int RVCALLCONV /* RV_TRUE or negative value on failure */
cmNonStandardParameterCreate(
                 /* Create NonStandardParameter tree */
                 IN  HPVT hVal,
                 IN  int rootId, /* nonStandardData */

                 IN  cmNonStandardIdentifier *identifier,
                 IN  char *data,
                 IN  int dataLength /* in bytes */
                 );

RVAPI int RVCALLCONV /* RV_TRUE or negative value on failure */
cmNonStandardParameterGet(
              /* Convert NonStandardParameter tree to C structures */
              IN  HPVT hVal,
              IN  int rootId, /* nonStandardData */

              OUT cmNonStandardIdentifier *identifier,
              OUT char *data,
              INOUT RvInt32 *dataLength /* (in bytes) IN: data allocation. OUT: correct size */
              );
RVAPI
int RVCALLCONV cmCallConnectControl(
                IN      HCALL               hsCall
                );

RVAPI
int RVCALLCONV
cmCallSw2SeparateH245(IN      HCALL               hsCall);

RVAPI
int RVCALLCONV cmCallSetIndependentSupplementaryService(
                IN      HCALL               hsCall
                );

RVAPI
int RVCALLCONV cmCallSetControlRemoteAddress(
                IN      HCALL               hsCall,
                IN      cmTransportAddress  *addr
                );

/************************************************************************
 * cmCallSendSuppServiceManually
 * purpose: Sends an H.450 APDU on the next Q.931 message that the
 *          application initiates. It will not initiate a FACILITY message
 *          on its own as cmCallSendSupplamentaryService() might send.
 * input  : hsCall      - Stack handle for the call
 *          buffer      - Buffer in which the APDU has been placed
 *          bufferSize  - Size of the buffer
 * output : none
 * return : Non-negative value on success
 *          Negative value on failure
 ************************************************************************/
RVAPI
int RVCALLCONV cmCallSendSuppServiceManually(
    IN  HCALL       hsCall,
    IN  void*       buffer,
    IN  int         bufferSize);

#define CM_H450_NO_FLAGS 0x00000000
#define CM_H450_FORCE    0x00000001
#define CM_H450_ALERTING 0x00000002

/************************************************************************
 * cmCallSendSupplementaryService
 * purpose: Sends an H.450 APDU. This function takes a buffer of a
 *          Supplementary Service and puts an H.450 message in the buffer
 * input  : hsCall      - Stack handle for the call
 *          buffer      - Buffer in which the APDU has been placed
 *          bufferSize  - Size of the buffer
 *          flags:
 *             CM_H450_NO_FLAGS - will send on the next outgoing message, and will
 *                         initiate a facility messgae if call is connected.
 *             CM_H450_FORCE    - will force the stack to send a facility message
 *                         with the APDU.
 *             CM_H450_ALERTING - will send the APDU only with an alerting or a
 *                         connect message
 * output : none
 * return : Non-negative value on success
 *          Negative value on failure
 ************************************************************************/
RVAPI
int RVCALLCONV cmCallSendSupplementaryService(
    IN  HCALL       hsCall,
    IN  void*       buffer,
    IN  int         bufferSize,
    IN  RvBool      force);


RVAPI
int RVCALLCONV cmAlias2Vt(
            IN      HPVT                valH,
            IN      cmAlias*            alias,
            IN      int                 nodeId);



RVAPI
RvInt32 RVCALLCONV cmGetLocalCallSignalAddress(
                IN  HAPP             hApp,
                OUT     cmTransportAddress*  tr);


/************************************************************************
 * cmGetLocalAnnexEAddress
 * purpose: Gets the local AnnexE address
 *          Annex E is used to send Q931 messages on UDP.
 * input  : hApp    - Application's stack handle
 * output : tr      - The local Annex E transport address.
 * return : Non negative value on success
 *          Negative value on failure
 ************************************************************************/
RVAPI
RvInt32 RVCALLCONV cmGetLocalAnnexEAddress(
               IN   HAPP                hApp,
               OUT  cmTransportAddress* tr);


/************************************************************************
 * cmGetLocalRASAddress
 * purpose: Gets the local RAS address
 * input  : hApp    - Application's stack handle
 * output : tr      - The local RAS signal transport address.
 * return : Non negative value on success
 *          Negative value on failure
 ************************************************************************/
RVAPI
RvInt32 RVCALLCONV cmGetLocalRASAddress(
                IN  HAPP             hApp,
                OUT     cmTransportAddress*  tr);

RVAPI
RvInt32 RVCALLCONV cmGetGKCallSignalAddress(
                IN  HAPP             hApp,
                OUT     cmTransportAddress*  tr);

RVAPI
RvInt32 RVCALLCONV cmGetGKRASAddress(
                IN  HAPP             hApp,
                OUT     cmTransportAddress*  tr);

RVAPI
HPROTCONN RVCALLCONV cmGetRASConnectionHandle(
                IN  HAPP             hApp);


/************************************************************************
 * cmVt2Alias

⌨️ 快捷键说明

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