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

📄 gatevars.h

📁 ipt网关源码
💻 H
字号:
/****************************************************************
* 
* $ProjectName$
* $ProjectRevision$
* $Name$
* $Revision$ - $Date$
* $Locker$
* 
****************************************************************/


#ifndef _gateVars_h
#define _gateVars_h

#ifdef __cplusplus
extern "C" {
#endif __cplusplus

#ifdef _GATEMAIN_C

   CHANInfo   chanInfo[GATE_MAX_SESSIONS];             /* Holds information related to all Sessions */

   USHORT     deviceToChannel[MAX_PSTN_DEVICES];       /* Holds for each pstn channel device handle 
                                                          the Session index */

   USHORT activeChannel;                                 /* Active channel to send UII or 
                                                            NonStdVCmd messages */ 
   
   ULONG NumOfBoards;                                   /* Number of DM3 boards in the system */

   ULONG IPTBoardNumber = 0;                             /* Board number for IPT */

   USHORT numRings = GATE_RINGS;                         /* Number of rings, default = 2 */

   USHORT IPTChannels = 0;					                  /* IPT NetTSC channels be updated 
                                                            according to DM3 available channels*/
   USHORT gateChannels = 0;                              /* Program channels be updated according
                                                            to voice and DM3 channels*/
   UCHAR  encodingType = QSCBUS_ENCODING_MULAW;          /* Encoding type: Mu-Law or A-Law */
   UCHAR  IdlePat = QSCBUS_IDLE_MULAW;                   /* default Idle pattern */

   BOOL   quitFlag = FALSE;                              /* quitflag = TRUE means the user asked 
                                                            to end the application */

   USHORT frontEnd = GATE_LEGACY_ANALOG;				 /* Type of front end to use */

   USHORT numtslots = T1_SLOTS;							 /* For digital FE */
   
   BOOL   logFileFlag = FALSE;							 /* All printings go to stdout, by default */

   int   _logLevel = 6;

#else  /* notdef _GATEMAIN_C */
   extern CHANInfo   chanInfo[];
   extern USHORT     deviceToChannel[];
   extern USHORT activeChannel;
   extern ULONG NumOfBoards; 
   extern USHORT IPTBoardNumber;
   extern USHORT gateChannels;
   extern USHORT numRings;
   extern USHORT IPTChannels;
   extern USHORT frontEnd;
   extern UCHAR  encodingType;
   extern UCHAR  IdlePat;   
   extern BOOL   quitFlag;
   extern USHORT frontEnd;
   extern USHORT numtslots;	
   extern int   _logLevel;
#endif /* elsedef _GATEMAIN_C */ 



/* State Machine Function Prototype */  
/*   USHORT gateWaitForDetectCmplt(LPDM3NetTSC ,LONG,void *);
   USHORT gateWaitForCall(LPDM3NetTSC ,LONG,void *);
   USHORT gateWaitForConnect(LPDM3NetTSC ,LONG,void *);
   USHORT gatePstnInit(LPDM3NetTSC ,LONG,void *);
   USHORT gateWaitForDisconnect(LPDM3NetTSC ,LONG,void *);
   USHORT gateWaitForIdle(LPDM3NetTSC ,LONG,void *);
   USHORT gateWaitForRelease(LPDM3NetTSC ,LONG,void *);
   USHORT gatePstnRelease(LPDM3NetTSC ,LONG,void *);
   USHORT gateWaitDone(LPDM3NetTSC ,LONG,void *);*/

// New State Machine Function Prototype , add by xuzq 98.6.10
   USHORT gateWaitForDetectCmplt(LPDM3NetTSC ,LONG,void *);
   USHORT gateWaitForCall(LPDM3NetTSC ,LONG,void *);
   USHORT gateWaitForConnect(LPDM3NetTSC ,LONG,void *);
   //new state fuction
   USHORT gateWaitForOffhookCmplt(LPDM3NetTSC ,LONG,void *);		//等待挂机操作完成
   USHORT gateWaitForWelcomeCmplt(LPDM3NetTSC ,LONG,void *);		//等待播放欢迎语音完成
   USHORT gateWaitForGetUsernameCmplt(LPDM3NetTSC ,LONG,void *);	//等待获取用户名按键完成
   USHORT gateWaitForPromptPasswdCmplt(LPDM3NetTSC ,LONG,void *);	//等待播放提示输入密码语音完成
   USHORT gateWaitForGetPasswdCmplt(LPDM3NetTSC ,LONG,void *);		//等待获取用户密码按键完成
   USHORT gateWaitForPromptPhonenumCmplt(LPDM3NetTSC ,LONG,void *);	//用户验证成功,等待播放提示输入目的电话号码语音完成
   USHORT gateWaitForNotmatchCmplt(LPDM3NetTSC ,LONG,void *);		//用户验证失败,等待播放提示重新输入用户名语音完成
   USHORT gateWaitForGetPhonenumCmplt(LPDM3NetTSC ,LONG,void *);	//等待获取目的电话号码结束
   // IP inbound state machine
   USHORT gateWaitForIpInboundOffhookCmplt(LPDM3NetTSC ,LONG,void *);	//等待Ip来话呼叫外拨摘机成功
   USHORT gateWaitForIpInboundDialoutCmplt(LPDM3NetTSC ,LONG,void *);	//等待Ip来话呼叫外拨成功
   //end of new state function
   USHORT gatePstnInit(LPDM3NetTSC ,LONG,void *);
   USHORT gateWaitForDisconnect(LPDM3NetTSC ,LONG,void *);
   USHORT gateWaitForIdle(LPDM3NetTSC ,LONG,void *);
   USHORT gateWaitForRelease(LPDM3NetTSC ,LONG,void *);
   USHORT gatePstnRelease(LPDM3NetTSC ,LONG,void *);
   USHORT gateWaitDone(LPDM3NetTSC ,LONG,void *);

#ifdef _GATESTATE_C
gateStateFxn gateFunctionList[] = {
   (gateStateFxn)&gateWaitForDetectCmplt,
   (gateStateFxn)&gateWaitForCall,
   (gateStateFxn)&gateWaitForConnect,
   //new state function list
   (gateStateFxn)&gateWaitForOffhookCmplt,
   (gateStateFxn)&gateWaitForWelcomeCmplt,
   (gateStateFxn)&gateWaitForGetUsernameCmplt,
   (gateStateFxn)&gateWaitForPromptPasswdCmplt,
   (gateStateFxn)&gateWaitForGetPasswdCmplt,
   (gateStateFxn)&gateWaitForPromptPhonenumCmplt,
   (gateStateFxn)&gateWaitForNotmatchCmplt,
   (gateStateFxn)&gateWaitForGetPhonenumCmplt,
   //Ip inbound call!
   (gateStateFxn)&gateWaitForIpInboundOffhookCmplt,
   (gateStateFxn)&gateWaitForIpInboundDialoutCmplt,
   // end of new function list
   (gateStateFxn)&gatePstnInit,
   (gateStateFxn)&gateWaitForDisconnect, 
   (gateStateFxn)&gateWaitForIdle, 
   (gateStateFxn)&gateWaitForRelease,
   (gateStateFxn)&gatePstnRelease,
   (gateStateFxn)&gateWaitDone
};
#else
extern gateStateFxn gateFunctionList[];
#endif /* elsenot _GATESTATE_C */


#endif

⌨️ 快捷键说明

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