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

📄 gatedefs.h

📁 dialogic voip 测试代码
💻 H
字号:
/**********************************************************************************************

* 

* $ProjectName: X:/SIPROJ/VOIP/HOST/WIN_NT/DEMOS/Samples.rel5/Dm3/Iplink/project.pj $

* $ProjectRevision: 1.5 $

* $Label$

* $Revision: 1.6.2.1 $ - $Date: 2002/01/16 09:57:04 $

* 

**********************************************************************************************/



#ifndef _GATEDEFS_H

#define  _GATEDEFS_H            



#ifdef __cplusplus

extern "C" {

#endif 





#include "incfile.h"

#include <libdefs.h>



/* General defines */



#define OBJECT_ID_STR    40         /* Object ID string length used for the H245 data structure */



#define  ALL_CHANNELS    0		    /* Exit all channels */



#define MAX_PSTN_DEVICES  500       /* Max number of device the dx_open or dt_open



/* Configuration file */

#define GATE_CONFIG_FILE   "gateway_R4.cfg" /* the configuration file */



#define MAX_PROTOCOL_NAME   20           /* Max length of the protocol name */

	

/* Number of coders configuration file can recognize */

#define IPT_NUMBER_OF_CODERS    10



/* The maximum error message length when calling gc_LoadDxParm */

#define	MSGLENGTH   80



#define T1_SLOTS	24

#define VOX_CH		4



#define  IPT_MAX_STRING      256  /* Max string length */



/* Max number of coders capability */

#define MAX_CODER_CAPABILITY    5



/* Events from key bord */

#define PRINT_CHANNEL_INFO     71



#define TIMEOUT                30





/* Definition connected to D/xxx */

#define GATE_RINGS         2     /* default number of rings to detect DE_RINGS*/





/* Parsing sizing */

#define PARSE_MAX_TOKEN    10

#define PARSE_MAX_STRING   (IPT_MAX_STRING-PARSE_MAX_TOKEN)

#define PARSE_MAX_NUM      10





/* State definitions */

typedef enum {

  GATE_INIT,			/* Waiting for GCEV_UNBLOCKED from PSTN and IP */

  GATE_NULL,            /* Waiting for GCEV_OFFERED from PSTN or IP */

  IP_OFFERED, 			/* Waiting for GCEN_CONNECTED from IP */

  PSTN_OFFERED,			/* Waiting for GCEN_CONNECTED from IP  */

  IP_CONNECTED,			/* Waiting for GCEN_CONNECTED or GCEV_ANSWERED from PSTN */

  GATE_CONNECTED,		/* Waiting for GCEV_DISCONNECTED from PSTN or IP*/

  GATE_DROP			/* Waiting for GCEV_DROPCALL from PSTN and IP */

} gateSessionState;



/*

 * Define some synonyms for function returns used by the Framework

 */



typedef enum _FUNCSTATUS {

            FUNCSUCCESS,

            FUNCFAIL

} FUNCSTATUS;





typedef enum

{

   GATE_LEGACY_ANALOG,       /* The network front end is a D/xxx analog card */

   GATE_T1,                  /* The network front end is TSC or D/xxx digital card*/

   GATE_E1,                  /* The network front end is TSC  or D/xxx digital card*/

} gateFrontEnd;	 /* enum gateFrontEnd */





#ifdef _GATEMAIN_C

   const char IPTCoderListing[IPT_NUMBER_OF_CODERS][IPT_MAX_STRING]=

   {

        "g723_5_3k",

        "g723_6_3k",

        "gsm",

        "g711mulaw",

        "g711alaw",

	    "g729a",

        "g729ab",

		"gsmefr"

   };

#else  /* notdef _GATEMAIN_C */

   extern const char IPTCoderListing[IPT_NUMBER_OF_CODERS][IPT_MAX_STRING];

#endif /* elsedef _GATEMAIN_C */





/* Our state machine function definition */

typedef unsigned short (*gateStateFxn)(unsigned int channel, COMP_KEY compKey, long event,void * EvtData);

typedef void (*setApplExit)();



#ifdef __cplusplus

}

#endif /* def __cplusplus */



#endif /* ndef _GATEDEFS_H */







⌨️ 快捷键说明

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