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

📄 cm.h

📁 RVGatekeeper SIP SDK
💻 H
📖 第 1 页 / 共 2 页
字号:
#ifdef __cplusplus
extern "C" {
#endif



/*

NOTICE:
This document contains information that is proprietary to RADVision LTD..
No part of this publication may be reproduced in any form whatsoever without 
written prior approval by RADVision LTD..

RADVision LTD. reserves the right to revise this publication and make changes 
without obligation to notify any person of such revisions or changes.

*/ 

#ifndef CM_H
#define CM_H



#include <rvcommon.h>

#ifndef RVAPI
#define RVAPI
#endif  

#ifndef CALLCONV
#define CALLCONV
#endif  

DECLARE_OPAQUE(HAPP);
DECLARE_OPAQUE(HAPPAPP);
DECLARE_OPAQUE(HAPPCALL);
DECLARE_OPAQUE(HCALL);
DECLARE_OPAQUE(HPROTCONN);
DECLARE_OPAQUE(HPROTOCOL);
DECLARE_OPAQUE(HAPPCONN);




#include <pvaltree.h>


typedef enum
{
    cmQ931TpktChannel=0,
    cmH245TpktChannel
}cmTpktChanHandleType;

typedef enum
{
    cmRasUdpChannel=0,
    cmRasUdpChannelMCast
}cmUdpChanHandleType;


typedef enum
{
    cmQ931setup =5,
    cmQ931callProceeding=2,	
    cmQ931connect=7,
    cmQ931alerting=1,		
    cmQ931releaseComplete=90,	
    cmQ931status=125,			
    cmQ931facility=98,		
    cmQ931statusEnquiry=117,	
    cmQ931progress=3,		
    cmQ931setupAck=13,
    cmQ931information=123

}cmCallQ931MsgType;

typedef struct
{
	UINT8 cmCodingStandard;
	UINT8 cmSpare;
	UINT8 cmLocation;
	UINT8 cmRecomendation; /*  optional set to -1 if not used */
	UINT8 cmCauseValue;
}
cmCallCauseInfo;

typedef struct 
{
	UINT8 cmCodingStandard;
	UINT8 cmCallStateValue;
}
cmCallStateInfo;

typedef struct
{
	cmCallCauseInfo  callCauseInfo;
	cmCallStateInfo callStateInfo;
	char display[128];
}cmCallStatusMessage;

typedef struct {
  /* Set one of the following choises */

  /* 1. object id */
  char object[128]; /* in object identifier ASN format: "0 1 2" */
  int objectLength; /* in bytes. <=0 if not set */

  /* 2. h.221 id */
  UINT8 t35CountryCode;
  UINT8 t35Extension;
  UINT16 manufacturerCode;
} cmNonStandardIdentifier;

typedef struct
{
    BYTE    t35CountryCode;
    BYTE    t35Extension;
    UINT16  manufacturerCode;
} cmNonStandard;

typedef struct
{
    cmNonStandard   info;
    int             productLen;
    int             versionLen;
    char            productID[256];
    char            versionID[256];
} cmVendor;

typedef struct
{
    cmNonStandardIdentifier   info;
    int			      length;
    char*		      data;
} cmNonStandardParam;


/* --- transport address --- */

typedef enum {
  cmTransportTypeIP, /* No route */
  cmTransportTypeIPStrictRoute,
  cmTransportTypeIPLooseRoute
} cmTransportType;

#define cmRouteSize (7) /* for luck */

typedef enum {
  cmDistributionUnicast,
  cmDistributionMulticast
} cmDistribution;

typedef struct
{
  UINT16          length; /* length in bytes of route */
  UINT32          ip; 
  UINT16          port; 
  cmTransportType type; 
  UINT32          route[cmRouteSize];
  cmDistribution  distribution;
} cmTransportAddress;


typedef enum
{
    cmAliasTypeE164=cmTransportTypeIPLooseRoute+5,
    cmAliasTypeH323ID,
    cmAliasTypeEndpointID,
    cmAliasTypeGatekeeperID,
    cmAliasTypeURLID,
    cmAliasTypeTransportAddress,
	cmAliasTypeEMailID,
	cmAliasTypePartyNumber
} cmAliasType;


typedef enum
{   
		    /* the numbering plan is according to
		       Recommendations E.163 and E.164.*/
    cmPartyNumberPublicUnknown,
		/* if used number digits carry prefix indicating type
		   of number according to national recommendations*/
    cmPartyNumberPublicInternationalNumber	,
    cmPartyNumberPublicNationalNumber	,
    cmPartyNumberPublicNetworkSpecificNumber,
		/* not used, value reserved */
    cmPartyNumberPublicSubscriberNumber	,
    cmPartyNumberPublicAbbreviatedNumber	,
	    /* valid only for called party number at the outgoing
	       access, network substitutes appropriate number. */
	    
    cmPartyNumberDataPartyNumber,
	    /* not used, value reserved */
    cmPartyNumberTelexPartyNumber,
	    /* not used, value reserved*/
    cmPartyNumberPrivateUnknown,			
    cmPartyNumberPrivateLevel2RegionalNumber,	
    cmPartyNumberPrivateLevel1RegionalNumber,	
    cmPartyNumberPrivatePISNSpecificNumber,	
    cmPartyNumberPrivateLocalNumber,		
    cmPartyNumberPrivateAbbreviatedNumber,	
    cmPartyNumberNationalStandardPartyNumber 
} cmPartyNumberType;

typedef struct 
{
	cmAliasType	  type;
	UINT16		  length; /* string in bytes */
	char*		  string;
	cmPartyNumberType pnType;
	cmTransportAddress	  transport;  
} cmAlias;

typedef enum 
{
    cmEndpointTypeTerminal,
    cmEndpointTypeGateway,
    cmEndpointTypeMCU,
    cmEndpointTypeGK,
    cmEndpointTypeUndefined
} cmEndpointType;

typedef enum
{
	cmCallTypeP2P,
	cmCallTypeOne2N,
	cmCallTypeN2One,
	cmCallTypeN2Nw
} cmCallType;


typedef enum
{
	cmCallModelTypeDirect,
	cmCallModelTypeGKRouted
} cmCallModelType;

typedef enum
{
	cmTransportQOSEndpointControlled,
	cmTransportQOSGatekeeperControlled,
	cmTransportQOSNoControl
} cmTransportQOS;

#include <cmras.h>
#include <cmctrl.h>
#include <cmhook.h>
#include <faststart.h>
#ifdef AUTOCHAN
#include <cmautochan.h>
#endif
typedef enum
{
	cmPreGrantedArqDirect=0,
	cmPreGrantedArqRouted
}cmPreGrantedArqUse;

typedef enum 
{
    cmCallStateDialtone,
    cmCallStateProceeding,
    cmCallStateRingBack,
    cmCallStateConnected,       
    cmCallStateDisconnected,            
    cmCallStateIdle,
    cmCallStateOffering,
    cmCallStateTransfering,
    cmCallStateAdmissionConfirm,/*marina*/
    cmCallStateAdmissionReject ,/*marina*/
    cmCallStateIncompleteAddress,
    cmCallStateWaitAddressAck



} cmCallState_e;

typedef enum 
{
    cmCallStateModeDisconnectedBusy,    
    cmCallStateModeDisconnectedNormal,  
    cmCallStateModeDisconnectedReject,  
    cmCallStateModeDisconnectedUnreachable,
    cmCallStateModeDisconnectedUnknown,
    cmCallStateModeDisconnectedLocal,
  
    cmCallStateModeConnectedControl,
    cmCallStateModeConnectedCallSetup,
    cmCallStateModeConnectedCall,
    cmCallStateModeConnectedConference,

    cmCallStateModeControlConnected=cmCallStateModeConnectedControl,
    cmCallStateModeCallSetupConnected,
    cmCallStateModeCallConnected,
     
    cmCallStateModeOfferingCreate=cmCallStateModeConnectedConference+1,
    cmCallStateModeOfferingInvite,
    cmCallStateModeOfferingJoin,
    cmCallStateModeOfferingCapabilityNegotiation,
    cmCallStateModeOfferingCallIndependentSupplementaryService,
    cmCallStateModeDisconnectedIncompleteAddress

} cmCallStateMode_e;

typedef enum
{
    cmReasonTypeNoBandwidth,
    cmReasonTypeGatekeeperResource,
    cmReasonTypeUnreachableDestination,
    cmReasonTypeDestinationRejection,
    cmReasonTypeInvalidRevision,
    cmReasonTypeNoPermision,
    cmReasonTypeUnreachableGatekeeper,
    cmReasonTypeGatewayResource,
    cmReasonTypeBadFormatAddress,
    cmReasonTypeAdaptiveBusy,
    cmReasonTypeInConf,
    cmReasonTypeUndefinedReason,
    cmReasonTypeRouteCallToGatekeeper,
    cmReasonTypeCallForwarded,
    cmReasonTypeRouteCallToMC,
    cmReasonTypeFacilityCallDeflection,
    cmReasonTypeSecurityDenied,					
    cmReasonTypeCalledPartyNotRegistered,        
    cmReasonTypeCallerNotregistered,
	cmReasonTypeConferenceListChoice,
	cmReasonTypeStartH245	
} cmReasonType;



typedef enum
{
    cmCreate,
    cmJoin,
    cmInvite,
    cmCapabilityNegotiation,          
    cmCallIndependentSupplementaryService
} cmConferenceGoalType;


typedef enum
{
    cmITCSpeech=0,
    cmITCUnrestricted=8,
    cmITCRestricted=9,
    cmITCAudio=16,
    cmITCUnrestrictedTones=17,
    cmITCVideo=24
} cmInformationTransferCapability;

typedef enum
{
    cmParamFirst=0x1000,
    cmParamSourceAddress,         /*cmAlias */
    cmParamSourceInfo,            /*cmEndpointType*/
    cmParamDestinationAddress,    /*cmAlias*/
    cmParamDestCallSignalAddress, /*cmTransportAddress*/
    cmParamSrcCallSignalAddress,  /*cmTransportAddress*/
    cmParamDestExtraCallInfo,     /*cmAlias*/
    cmParamActiveMc,              /*BOOL*/  
    cmParamCID,                   /*char*  */
    cmParamConferenceGoal,        /*ENUM */ 
    cmParamCallType,              /*cmCallType*/    
    cmParamSetupH245Address,      /*cmTransportAddress */  
    cmParamH245Address,           /*cmTransportAddress */  
    cmParamDestinationInfo,       /*endpoint type */
    cmParamReleaseCompleteReason, /*cmReasonType */  
    cmParamReleaseCompleteCause,  /*int */  
    cmParamRate,                  /*int */  
    cmParamRequestedRate,         /*int */  
    cmParamInformationTransferCapability,
    cmParamMultiRate,
    cmParamCalledPartyNumber,     /*cmAlias*/
    cmParamCalledPartySubAddress, /*cmAlias*/
    cmParamCallingPartyNumber,     /*cmAlias*/
    cmParamCallingPartySubAddress, /*cmAlias*/
    cmParamExtention,              /*cmAlias*/
    cmParamAlternativeAddress,      /*For future use */
    cmParamAlternativeAliasAddress, /*For future use */
    cmParamFacilityReason,
    cmParamDestinationIpAddress,  /* physical address cmRASTransport- used to detrmine acutal destination of call */
    cmParamRemoteIpAddress,
    cmParamCRV,
    cmParamRASCRV,
    cmParamCallSignalAddress,
    cmParamEstablishH245,
    cmParamDisplay,
    cmParamFacilityCID,          /*char*  */
    cmParamConnectDisplay,
    cmParamUserUser,
    cmParamConnectUserUser,
    cmParamFullSourceInfo,
    cmParamFullDestinationInfo,
    cmParamSetupNonStandardData,	  
    cmParamCallProceedingNonStandardData,
    cmParamAlertingNonStandardData,	  
    cmParamConnectNonStandardData,	  
    cmParamReleaseCompleteNonStandardData,
    cmParamSetupNonStandard,	        
    cmParamCallProceedingNonStandard,   
    cmParamAlertingNonStandard,	        
    cmParamConnectNonStandard,	        
    cmParamReleaseCompleteNonStandard, 
    cmParamAlternativeDestExtraCallInfo,
    cmParamAlternativeExtention,
    cmParamSetupFastStart,  
    cmParamConnectFastStart,
    cmParamEarlyH245,
    cmParamCallID,
    cmParamPreGrantedArq, /*marina */
    cmParamAlertingFastStart,
    cmParamCallProcFastStart,
    cmParamAlertingH245Address,
    cmParamCallProcH245Address,
    cmParamCanOverlapSending,
    cmParamIncompleteAddress,
    cmParamH245Tunneling,
    cmParamFastStartInUse,
    cmParamSetupCanOverlapSending
} cmCallParam;


typedef int cmParam;

typedef int 
(*cmNewCallbackEH)(void);


typedef enum
{
   cmIdle,
   cmDiscovered,
   cmRegistered
} cmRegState;

typedef enum
{
   cmGatekeeperConfirm,
   cmGatekeeperReject,
   cmRegistrationConfirm,
   cmRegistrationReject,
   cmUnregistrationRequest,
   cmUnregistrationConfirm,
   cmUnregistrationReject,
   cmNonStandardMessage,
   cmResourceAvailabilityConfirmation
} cmRegEvent;


typedef int 
    (CALLCONV *cmEvNewCallT)(
		IN      HAPP                hApp,
		IN      HCALL               hsCall,
		OUT     LPHAPPCALL          lphaCall);


typedef int 
    (CALLCONV *cmEvRegEventT)(
		IN      HAPP                hApp,
                IN      cmRegState          regState,
		IN      cmRegEvent          regEvent,
		IN      int                 regEventHandle);

typedef  struct 
{
    cmEvNewCallT cmEvNewCall;
    cmEvRegEventT cmEvRegEvent;
} SCMEVENT,*CMEVENT;

typedef int   
    (CALLCONV *cmEvCallStateChangedT)(
		IN      HAPPCALL            haCall,
		IN      HCALL               hsCall,
		IN      UINT32              state,
		IN      UINT32              stateMode);


typedef int 
    (CALLCONV *cmEvCallNewRateT)(
		IN      HAPPCALL            haCall,
		IN      HCALL               hsCall,
		IN      UINT32              rate);

typedef int 
    (CALLCONV*cmEvCallInfoT)(
		IN      HAPPCALL            haCall,
		IN      HCALL               hsCall,
		IN      char*               display,
		IN      char*               userUser,
                IN      int                 userUserSize);
    
typedef int 
    (CALLCONV*cmCallNonStandardParamT)(
		IN      HAPPCALL            haCall,
		IN      HCALL               hsCall,
		IN      char*               data,
		IN      int                 dataSize);   

typedef int 
    (CALLCONV*cmEvCallFacilityT)(
		IN      HAPPCALL            haCall,
		IN      HCALL               hsCall,
		IN      int                 handle,
		OUT IN	BOOL		    *proceed);   
typedef int 
    (CALLCONV*cmEvCallFastStartSetupT)(
		IN	HAPPCALL haCall, 
		IN	HCALL hsCall,
		OUT IN	cmFastStartMessage *fsMessage);

typedef int 
    (CALLCONV * cmEvCallStatusT)(
			IN	HAPPCALL haCall, 
			IN	HCALL hsCall,
			OUT IN	cmCallStatusMessage *callStatusMsg);
typedef int 
    (CALLCONV * cmEvCallUserInfoT)(
			IN	HAPPCALL haCall, 
			IN	HCALL hsCall,
			IN	int nodeId);

typedef int 
    (CALLCONV * cmEvCallH450SupplServT)(
			IN	HAPPCALL haCall, 
			IN	HCALL hsCall,
			cmCallQ931MsgType msgType,
			int	nodeId,
			int	size);
typedef int 
    (CALLCONV * cmEvCallIncompleteAddressT)(
			IN	HAPPCALL haCall, 
			IN	HCALL hsCall);
typedef int
    (CALLCONV * cmEvCallAdditionalAddressT)(
			IN	HAPPCALL haCall, 
			IN	HCALL hsCall,
			char	* address,
			BOOL	sendingComplete);

#ifdef AUTOCHAN

typedef int 
    (CALLCONV * cmEvCallAutoChannelsUpdateT)(
			IN	HAPPCALL haCall, 
			IN	HCALL hsCall,

⌨️ 快捷键说明

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