| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131 |
- /*************************************************************************
- 【文件名】 IpoLinkInc.h
- 【功能模块和目的】 IPOLink公共头文件
- 【开发者及日期】 郑石诺 2016/03/23
- 【版本】 V1.0.0
- 【版权信息】 Copyright (C)2016 河南华谊网络科技有限公司
- 【更改记录】
- *************************************************************************/
- #pragma once
- #include "../Public/GlobalDef/CommonTypeDef.h"
- #include "../Public/GlobalDef/DevLinkInc.h"
- #include "../Public/GlobalDef/DevInfoInc.h"
- #include "NetCtrlInterface.h"
- #include "NetRepInterface.h"
- #include "PduLinkInc.h"
- #include "PduEntity.h"
- #include "PduDataFormat.h"
- #include "Logger.h"
- #define OTL_ODBC //OTL连接方式为ODBC
- #define OTL_STREAM_READ_ITERATOR_ON //使用OTL迭代器
- #define OTL_STL //OTL使用标准库
- #include "../Public/OTL/otlv4.h"
- #include "../Public/OTL/OtlDB.h"
- #define CONST_DEV_LINK_CALL_NULL -1
- #define CONST_DEV_LINK_SUSPEND -2
- #define CONST_DEV_ID_INVALID -1
- #define CONST_DEVLINK_HANGUP_BY_A 0
- #define CONST_DEVLINK_HANGUP_BY_B 1
- #define CONST_DEVLINK_OUTBOUND_ANSWER 0
- #define CONST_DEVLINK_INBOUND_ANSWER 1
- #define CONST_LINE_INIT_TIME_LIMIT 3
- #define CONST_TAPI_DEST_DEVICE _T("Avaya")
- #define CONST_TAPI_OP_INSTANCE_INVALID -1
- #define CONST_TAPI_DIGIT_MEETING _T("!")
- #define CONST_TAPI_CODE_MEETING _T("*47")
- #define CONST_TAPI_CODE_PARK _T("*****")
- const int CALL_IDENT_LEN (6);
- const int COMMA (0x2C);
- const int MAX_FIELD_LEN (33);
- // CDR constants
- const int CALL_START (0);
- const int CALL_DURATION (1);
- const int RING_DURATION (2);
- const int CALLER (3);
- const int DIRECTION (4);
- const int CALLED_NUMBER (5);
- const int DIALED_NUMBER (6);
- const int NAME (7);
- const int TAG (8);
- const int ACCOUNT (9);
- const int IS_INTERNAL (10);
- const int LCR_CALLED_NUMBER (11);
- // Real Time Event constants
- const int ASTATE (2);
- const int BSTATE (3);
- const int ACONNECTED (4);
- const int BCONNECTED (6);
- const int A_IS_MUSIC (5);
- const int B_IS_MUSIC (7);
- const int ANAME (8);
- const int BNAME (9);
- const int BLIST (10);
- const int ASLOT (11);
- const int BSLOT (12);
- const int CALLED_NUM (14);
- const int CALLING_NUM (16);
- const int TARG_UNAME (32);
- const int IS_INTERNAL_CALL (34);
- const int PARK_SLOT_NUMBER (41);
- const int RTE_TAG (43);
- const int ACCOUNT_CODE (48);
- const int CALL_ID (49);
- typedef enum tagDEV_LINK_EVENT_TYPE /* 事件类型 */
- {
- DEV_LINK_EVENT_TYPE_S, // S事件
- DEV_LINK_EVENT_TYPE_D, // D事件
- DEV_LINK_EVENT_TYPE_A // A事件
- } DEV_LINK_EVENT_TYPE;
- typedef enum tagDEV_LINK_CALL_STATE /* 呼叫状态 */
- {
- CSIdle,
- CSRinging,
- CSConnected,
- CSDisconnected,
- CSSuspending,
- CSSuspended,
- CSResuming,
- CSDialling,
- CSDialled,
- CSLocalDial,
- CSQueued,
- CSParked,
- CSHeld,
- CSReDialling
- } DEV_LINK_CALL_STATE;
- /* 解析后的S事件内容 */
- typedef struct tagDevLinkInfoS
- {
- int nDevLinkCallId; // DevLink CallId
- int nResType; // 触发事件设备类型
- CHAR szResId[MAX_FIELD_LEN]; // 触发事件的设备ID
- int nResStatus; // 设备当前状态
- int nPeerResType; // 对端设备类型(-1 表示无对端设备)
- CHAR szPeerResId[MAX_FIELD_LEN]; // 对端设备ID
- CHAR szCallerNum[MAX_FIELD_LEN]; // 主叫号码
- CHAR szCalleeNum[MAX_FIELD_LEN]; // 被叫号码
- int nFlag; // 主动挂机方(0 -> A端,1 -> B端), 接通时的通话方向(0 -> 呼出接通,1 -> 应答接通)
- } DevLinkInfoS;
- // 中继线路类型
- typedef enum tagTrunkType
- {
- TRUNK_UNKNOWN = 0,
- TRUNK_DT,
- TRUNK_ANA,
- TRUNK_H323,
- TRUNK_SIP
- } TrunkType;
|