📄 answer.h
字号:
#ifndef ANSWER_DEF
#define ANSWER_DEF
#include <srllib.h>
#include <dxxxlib.h>
#include <dtilib.h>
#include <faxlib.h>
#include <msilib.h>
#include <sctools.h>
#include <gclib.h>
#include <gcerr.h>
#ifdef __cplusplus
extern "C" {
#endif
/**********************************************************************
* *
* AA N N SSSS W W EEEEEE RRRRR H H *
* A A NN N S W W E R R H H *
* A A N N N SSSS W W EEEEE R R HHHHHH *
* AAAAAA N N N S W WW W E RRRRR ... H H *
* A A N NN S S WW WW E R R ... H H *
* A A N N SSSS W W EEEEEE R R ... H H *
* *
*********************************************************************
* Copyright (c) 1992-96 by Dialogic Corp. All Rights Reserved *
*********************************************************************/
/*
* definition of frontend for DM3
*/
#define CT_NTDM3 0x06
/**
** Definitions
**/
#define MAXDTMF 1024 /* Number of Digits Expected */
#define MAXCHANS 1440 /* Maximum Number of Voc Channels */
#define FAXCHANS 120 /* Maximum Number of Fax Channels */
#define MSICHANS 120 /* Maximum Number of Msi Channels */
#define MAXRING 1 /* Number of Rings Before Picking Up */
#define MAXPATH 128 /* Maximum Length of File Path */
#define MAXMSG 150 /* Maximum Length of Message Filename */
#define SIGEVTCHK 0x1010 /* Check for type of signalling event */
#define SIGBITCHK 0x1111 /* Check for signalling bit change */
#define TDX_USER 0x99 /* User Event */
#define TID_0 120
#define TID_1 TID_0+1
#define TID_2 TID_0+2
#define TID_3 TID_0+3
#define TID_4 TID_0+4
#define FALSE 0
#define TRUE 1
#define CMD_WTRING 0
#define CMD_PLAY1 1
#define CMD_PLAY2 2
#define CMD_PLAY3 3
#define CMD_PLAY4 6
#define CMD_PLAY5 7
#define CMD_GETDIG 4
#define CMD_PLAYTONE 5
#define CMD_PLAYINFOTONE 8
#define CMD_GETINFOTONE 9
#define CMD_SENDFAX 10
#define CMD_RECVFAX 20
#define CMD_RECORD 30
#define CMD_OFFHOOK 49
#define CMD_ONHOOK 50
#define CMD_DIAL 51
#define CMD_TALK 70
#define CMD_CONMSI 80
#define CMD_SETPATH 99
#define CMD_USERSTOP 9001
#define CMD_SENDFSK 81
#define CMD_RECVFSK 82
#define CMD_TRANSFER 83
#define CMD_CONFERENCE 84
#define CMD_SETTIMER 85
enum
{
ST_WTRING = 1, /* Waiting for an Incoming Call */
ST_OFFHOOK, /* Going Off Hook to Accept Call */
ST_GETR2MF, /* Getting R2MF signal */
ST_READY, /* Ready to play or getdigs */
ST_PLAYTONE, /* Play signal tone */
ST_PLAY, /* Play Message to caller */
ST_GETDIG, /* Get DTMF digits */
ST_RECORD, /* Recording Message from Caller */
ST_SENDFAX, /* Sending fax to Caller */
ST_RECVFAX, /* Receiving fax from Caller */
ST_DIAL, /* Dialling out */
ST_CONMSI, /* Connect with Msi */
ST_TALK, /* Talking status */
ST_ONHOOK, /* Go On Hook(Hang up the phone) */
ST_ERROR, /* Error occurred */
ST_SENDFSK,
ST_RECVFSK,
NUM_STATES
};
static char STATE_STR[NUM_STATES][256] =
{
"Zero State (shouldn't see this)", // state 0
"Waiting for an Incoming Call",
"Going Off Hook to Accept Call",
"Getting R2MF signal",
"Ready to play or getdigs",
"Play signal tone",
"Play Message to Caller ",
"Get DTMF Digits (Access Code)",
"Recording Message from Caller",
"Sending fax to Caller",
"Receiving fax from Caller",
"Dialling out",
"Connect with Msi",
"Talking status",
"Go On Hook(Hang up the phone)",
"Error occurred",
};
// Definition of Windows Messages
enum
{
WM_DLGC_STOPPED = WM_USER + 1, // sent when dialogic code has stopped
WM_DLGC_STATE, // sent when a channel changes state
WM_DLGC_CODE, // sent when a channel needs to show the access code
WM_POP_STATE // sent when ui popupmenu pressed
};
#define QUIT( n ) ForceCloseDialogic( (n) )
typedef struct
{
HWND hWnd; // see CreateThread
int maxchans;
int faxchans;
int msichans;
int d4xbdnum;
int dtibdnum;
int faxbdnum;
int msibdnum;
int frontend;
int scbus;
int routeag;
int boardtag;
} ARG_STRUCT;
extern HANDLE ghDLGCEvent; // controls stopping of Dialogic stuff
extern HWND hWnd; // the overseeing dialog
extern char SVocDir[128];
extern char GVocDir[128];
extern char SFaxDir[128];
extern char VScript[128];
extern int frontend;
extern int maxchans;
extern int faxchans;
extern int msichans;
extern int d4xbdnum;
extern int dtibdnum;
extern int faxbdnum;
extern int msibdnum;
extern int gammfax;
extern long warntype;
extern long warnspan;
extern long stopspan;
extern int MAXUNIT;
/* Functions
*/
void InitDialogic();
UINT RunDialogic(LPVOID info);
void ForceCloseDialogic (int n);
#ifdef __cplusplus
} // ends the extern "C" {
#endif
#endif // for ANSWER_DEF
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -