📄 tlibrary.h
字号:
/*
* $Id: tlibrary.h,v 2.38 1999/09/15 19:50:40 epi Exp $
*/
#ifndef _TLIBRARY_H
#define _TLIBRARY_H
#ifdef BACKUP_SYNC
#ifndef WIN32
#include <sys/types.h>
#include <sys/time.h>
#include <signal.h>
#ifdef _AIX
#include <sys/select.h>
#endif
#else
#include <windows.h>
#include <stdio.h>
#include <time.h>
#include <sys/timeb.h>
#endif
#endif
#include "cmntypes.h"
#include "gkvlist.h"
#define T_PROTOCOL_VERSION "tserver protocol 4.2"
#define T_MASK_LENGTH 64
#define ISCC_TRACKING_NUMBER "_ISCC_TRACKING_NUMBER_"
typedef int TServer;
typedef char *TDirectoryNumber;
typedef char *TAgentID;
typedef char *TAgentPassword;
typedef unsigned long TCallID;
typedef unsigned long TFile;
typedef unsigned long TTime;
typedef unsigned char TMask[T_MASK_LENGTH];
typedef unsigned int TReferenceID;
typedef enum {
SyncMode,
AsyncMode
} TOpenMode;
typedef enum {
RoleUnknown,
RoleOrigination,
RoleDestination,
RoleConferenceMember,
RoleNewParty,
RoleAddedBy,
RoleDeletedBy,
RoleTransferredBy,
RoleDeletedParty,
RoleConferencedBy,
RoleObserver
} TDNRole;
typedef enum {
CallStateOk,
CallStateTransferred,
CallStateConferenced,
CallStateGeneralError,
CallStateSystemError,
CallStateRemoteRelease,
CallStateBusy,
CallStateNoAnswer,
CallStateSitDetected,
CallStateAnsweringMachineDetected,
CallStateAllTrunksBusy,
CallStateSitInvalidnum,
CallStateSitVacant,
CallStateSitIntercept,
CallStateSitUnknown,
CallStateSitNocircuit,
CallStateSitReorder,
CallStateFaxDetected,
CallStateQueueFull,
CallStateCleared,
CallStateOverflowed,
CallStateAbandoned,
CallStateRedirected,
CallStateForwarded,
CallStateConsult,
CallStatePickedup,
CallStateDropped,
CallStateDroppednoanswer,
CallStateUnknown,
CallStateCovered, /* 5/5/98 */
CallStateConverseOn,
CallStateBridged,
CallStateDeafened = 49, /* added 9/15/99 by epi */
CallStateHeld = 50 /* (see common/gcti.h) */
} TCallState;
typedef enum {
AddressTypeUnknown,
AddressTypeDN,
AddressTypePosition,
AddressTypeQueue,
AddressTypeRouteDN,
AddressTypeTrunk,
AddressTypeVoiceChannel,
AddressTypeDataChannel,
AddressTypeAnnouncement,
AddressTypeASAI,
AddressTypeACDGroup,
AddressTypeVSP,
AddressTypeRouteQueue, /* RouteDN + Queue */
AddressTypeAgentID, /* not a real address */
AddressTypeOther = 99 /* other/unspecified */
} TAddressType;
typedef enum {
ModeShare,
ModePrivate,
ModeMonitor
} TRegisterMode;
typedef enum {
RegisterDefault,
RegisterForce,
RegisterLocal
} TControlMode;
typedef enum {
CallTypeUnknown,
CallTypeInternal,
CallTypeInbound,
CallTypeOutbound,
CallTypeConsult
} TCallType;
typedef enum {
AgentWorkModeUnknown,
AgentManualIn,
AgentAutoIn,
AgentAfterCallWork,
AgentAuxWork,
AgentNoCallDisconnect
} TAgentWorkMode;
enum _TRouteType {
RouteTypeUnknown,
RouteTypeDefault,
RouteTypeLabel,
RouteTypeOverwriteDNIS,
RouteTypeDDD,
RouteTypeIDDD,
RouteTypeDirect,
RouteTypeReject,
RouteTypeAnnouncement,
RouteTypePostFeature,
RouteTypeDirectAgent,
RouteTypePriority,
RouteTypeDirectPriority,
RouteTypeAgentID, /* OtherDN = AgentID; added 8/10/99 */
RouteTypeIDMAX
};
typedef enum _TRouteType TRouteType;
typedef enum {
XRouteTypeRoute,
XRouteTypeDirect,
XRouteTypeDirectWToken
} TXRouteType;
typedef enum {
MakeCallRegular,
MakeCallDirectAgent,
MakeCallSupervisorAssist,
MakeCallPriority,
MakeCallDirectPriority
} TMakeCallType;
typedef enum {
AddressStatusIdle,
AddressStatusOrigination,
AddressStatusDialing,
AddressStatusTalking,
AddressStatusRinging,
AddressStatusHeld,
AddressStatusTreatment,
AddressStatusLockedOut,
AddressStatusMaintenance,
AddressStatusAvailable,
AddressStatusVacant
} AddressStatusInfoType;
typedef enum {
MsgWaitingActivated,
MsgWaitingDeactivated,
ExecMsgWaitingActivated,
ExecMsgWaitingDeactivated,
MsgWaitingNotAllowed
} MsgWaitingInfoType;
typedef enum {
ForwardModeNone,
ForwardModeUnconditional,
ForwardModeOnBusy,
ForwardModeOnNoAnswer,
ForwardModeOnBusyAndNoAnswer,
ForwardModeSendAllCalls
} TForwardMode;
typedef enum {
AssociatedToThisSession,
AssociatedToAnotherSession,
NotAssociated,
AssociationNotAllowed
} AssociationInfoType;
typedef enum {
AddressInfoAddressStatus,
AddressInfoMessageWaitingStatus,
AddressInfoAssociationStatus,
AddressInfoCallForwardingStatus,
AddressInfoAgentStatus,
AddressInfoNumberOfAgentsInQueue,
AddressInfoNumberOfAvailableAgentsInQueue,
AddressInfoNumberOfCallsInQueue,
AddressInfoAddressType,
AddressInfoCallsQuery,
AddressInfoSendAllCallsStatus,
AddressInfoQueueLoginAudit,
AddressInfoNumberOfIdleClassifiers, /* obsolete, use TSwitchQuery instead */
AddressInfoNumberOfClassifiersInUse, /* obsolete, use TSwitchQuery instead */
AddressInfoNumberOfIdleTrunks,
AddressInfoNumberOfTrunksInUse,
AddressInfoDatabaseValue,
AddressInfoDNStatus,
AddressInfoQueueStatus
} TAddressInfoType;
typedef enum {
CallInfoPartiesQuery,
CallInfoStatusQuery
} TCallInfoType;
typedef enum {
SwitchInfoDateTime = 1,
SwitchInfoClassifierStat = 2
} TSwitchInfoType;
typedef enum {
LocationInfoAllLocations,
LocationInfoLocationData,
LocationInfoMonitorLocation,
LocationInfoCancelMonitorLocation,
LocationInfoMonitorAllLocations,
LocationInfoCancellMonitorAllLocations,
LocationInfoLocationMonitorCanceled,
LocationInfoAllLocationsMonitorCanceled
} TLocationInfoType;
typedef union {
AssociationInfoType AssociationStatus;
AddressStatusInfoType AddressStatus;
MsgWaitingInfoType MsgWaitingStatus;
TForwardMode CallForwardingStatus;
TAgentWorkMode AgentStatus;
int NumberOfAgentsInQueue;
int NumberOfAvailableAgentsInQueue;
int NumberOfCallsInQueue;
TAddressType AddressType;
TForwardMode SendAllCallsStatus;
int NumberOfIdleClassifiers; /* obsolete */
int NumberOfClassifiersInUse; /* obsolete */
int NumberOfIdleTrunks;
int NumberOfTrunksInUse;
int NumberOfListElements; /* value passed in AttributeExtensions */
} TAddressInfoStatus;
typedef enum {
ServerRolePrimary,
ServerRoleBackup
} TServerRole;
typedef enum {
MergeForTransfer,
MergeForConference
} TMergeType;
typedef enum {
AgentTypeAgent,
AgentTypeSupervisor
} TAgentType;
typedef enum {
Uninterruptable = 1,
Interruptable = 2
} TInterruptFlag;
typedef enum {
Clear = 1,
NotClear = 2
} TClearFlag;
typedef struct {
char *HomeLocation;
TDirectoryNumber OrigDN;
} TRemoteParty;
typedef struct {
TRemoteParty FirstTransfer;
TRemoteParty LastTransfer;
} TCallHistoryInfo;
typedef enum {
CreateCallInfo,
SetCallInfo,
DeleteCallInfo,
AddParty,
DeleteParty,
CallInfoUpdate
} TSetOpType;
typedef struct {
unsigned long seconds;
unsigned long useconds;
} TTimeStamp;
enum _TTreatmentType {
TreatmentUnknown,
TreatmentIVR,
TreatmentMusic,
TreatmentRingBack,
TreatmentSilence,
TreatmentBusy,
TreatmentCollectDigits,
TreatmentPlayAnnouncement,
TreatmentPlayAnnouncementAndDigits,
TreatmentVerifyDigits,
TreatmentRecordUserAnnouncement,
TreatmentDeleteUserAnnouncement,
TreatmentCancelCall,
TreatmentPlayApplication,
TreatmentSetDefaultRoute,
TreatmentTextToSpeech,
TreatmentTextToSpeechAndDigits,
TreatmentFastBusy, /* added for DMS-100 */
TreatmentRAN, /* Sep 21, 1998 */
TreatmentIDMAX
};
typedef enum _TTreatmentType TTreatmentType;
enum TMessageType {
RequestRegisterClient,
RequestQueryServer,
RequestQueryAddress,
RequestRegisterAddress,
RequestUnregisterAddress,
RequestRegisterAll,
RequestUnregisterAll,
RequestSetInputMask,
RequestAgentLogin,
RequestAgentLogout,
RequestAgentReady,
RequestAgentNotReady,
RequestSetDNDOn,
RequestSetDNDOff,
RequestMakeCall,
RequestMakePredictiveCall,
RequestAnswerCall,
RequestReleaseCall,
RequestHoldCall,
RequestRetrieveCall,
RequestInitiateConference,
RequestCompleteConference,
RequestDeleteFromConference,
RequestInitiateTransfer,
RequestMuteTransfer,
RequestSingleStepTransfer,
RequestCompleteTransfer,
RequestMergeCalls,
RequestAlternateCall,
RequestReconnectCall,
RequestAttachUserData,
RequestUpdateUserData,
RequestDeleteUserData,
RequestDeletePair,
RequestCallForwardSet,
RequestCallForwardCancel,
RequestRouteCall,
RequestGiveMusicTreatment,
RequestGiveSilenceTreatment,
RequestGiveRingBackTreatment,
RequestLoginMailBox,
RequestLogoutMailBox,
RequestOpenVoiceFile,
RequestCloseVoiceFile,
RequestPlayVoiceFile,
RequestCollectDigits,
RequestSetMessageWaitingOn,
RequestSetMessageWaitingOff,
RequestDistributeUserEvent,
RequestDistributeEvent,
EventServerConnected,
EventServerDisconnected,
EventError,
EventRegistered,
EventUnregistered,
EventRegisteredAll,
EventUnregisteredAll,
EventQueued,
EventDiverted,
EventAbandoned,
EventRinging,
EventDialing,
EventNetworkReached,
EventDestinationBusy,
EventEstablished,
EventReleased,
EventHeld,
EventRetrieved,
EventPartyChanged,
EventPartyAdded,
EventPartyDeleted,
EventRouteRequest,
EventRouteUsed,
EventAgentLogin,
EventAgentLogout,
EventAgentReady,
EventAgentNotReady,
EventDNDOn,
EventDNDOff,
EventMailBoxLogin,
EventMailBoxLogout,
EventVoiceFileOpened,
EventVoiceFileClosed,
EventVoiceFileEndPlay,
EventDigitsCollected,
EventAttachedDataChanged,
EventOffHook,
EventOnHook,
EventForwardSet,
EventForwardCancel,
EventMessageWaitingOn,
EventMessageWaitingOff,
EventAddressInfo,
EventServerInfo,
EventLinkDisconnected,
EventLinkConnected,
EventUserEvent,
RequestSendDTMF,
EventDTMFSent,
EventResourceAllocated,
EventResourceFreed,
EventRemoteConnectionSuccess,
EventRemoteConnectionFailed,
RequestRedirectCall,
RequestListenDisconnect,
RequestListenReconnect,
EventListenDisconnected,
EventListenReconnected,
RequestQueryCall,
EventPartyInfo,
RequestClearCall,
RequestSetCallInfo,
EventCallInfoChanged,
RequestApplyTreatment,
EventTreatmentApplied,
EventTreatmentNotApplied,
EventTreatmentEnd,
EventHardwareError,
EventAgentAfterCallWork,
EventTreatmentRequired,
RequestSingleStepConference,
RequestQuerySwitch,
EventSwitchInfo,
RequestGetAccessNumber,
RequestCancelReqGetAccessNumber,
EventAnswerAccessNumber,
EventReqGetAccessNumberCanceled,
RequestReserveAgent,
EventAgentReserved,
RequestReserveAgentAndGetAccessNumber,
RequestAgentSetIdleReason,
EventAgentIdleReasonSet,
EventRestoreConnection,
EventPrimaryChanged,
RequestLostBackupConnection,
RequestSetDNInfo,
RequestQueryLocation,
EventLocationInfo,
EventACK,
MessageIDMAX
};
enum TAttribute {
AttributeProtocolVersion,
AttributeErrorMessage,
AttributeReferenceID,
AttributeCallID,
AttributeNodeID,
AttributeNetworkCallID,
AttributeNetworkNodeID,
AttributeTransferredNetworkCallID,
AttributeTransferredNetworkNodeID,
AttributeConnID,
AttributePreviousConnID,
AttributeTransferConnID,
AttributeConferenceConnID,
AttributeCallState,
AttributeAgentID,
AttributeAgentStateReasonUnused,
AttributeAgentWorkMode,
AttributeReason,
AttributeDNIS,
AttributeANI,
AttributeThisDN,
AttributeThisQueue,
AttributeThisTrunk,
AttributeThisDNRole,
AttributeOtherDN,
AttributeOtherQueue,
AttributeOtherTrunk,
AttributeOtherDNRole,
AttributeThirdPartyDN,
AttributeThirdPartyQueue,
AttributeThirdPartyTrunk,
AttributeThirdPartyDNRole,
AttributeMusicPath,
AttributeVoiceFileName,
AttributeFileHandle,
AttributeUserID,
AttributePassword,
AttributeVoiceSegment,
AttributeVoiceIFlag,
AttributeVoiceCFlag,
AttributeNumberOfDigits,
AttributeTerminateDigits,
AttributeTimeout,
AttributeCollectedDigits,
AttributeLastDigit,
AttributeInputMask,
AttributeErrorCode,
AttributeAddressType,
AttributeAddressMode,
AttributeRegisterMode,
AttributeControlMode,
AttributeUserData,
AttributeDataKey,
AttributeExtensions,
AttributeCallType,
AttributeCallingLineName,
AttributeAddressInfoType,
AttributeAddressInfoStatus,
AttributeUserEvent,
AttributeCommunicationDN,
AttributeRouteType,
AttributeServerVersion,
AttributeServerRole,
AttributeServerCapabilityMask,
AttributeApplicationName,
AttributeApplicationPassword,
AttributeMergeType,
AttributeForwardMode,
AttributeDTMFDigits,
AttributeLocation,
AttributeRemoteLocation,
AttributeRemoteConnID,
AttributeRemoteDN,
AttributeMakeCallType,
AttributeCallInfoType,
AttributeHomeLocation,
AttributeCustomerID,
AttributeFirstTransferHomeLocation,
AttributeFirstTransferOrigDN,
AttributeLastTransferHomeLocation,
AttributeLastTransferOrigDN,
AttributeSetOperation,
AttributeNewConnID,
AttributeTreatmentType,
AttributeTreatmentParms,
AttributeCLID,
AttributeTimeinSecs,
AttributeTimeinuSecs,
AttributeSwitchInfoType,
AttributeXRouteType,
AttributeAccessNumber,
AttributeXReferenceID,
AttributePlace,
AttributePriority,
AttributeAgentIdleReason,
AttributeRegistrationCode,
AttributeDNSyncInfo,
AttributeMediaType, /* TMediaType enumeration */
AttributeLocationInfoType,
AttributeIDMAX
};
enum TSockInfoReason{
TSocketCreated,
TSocketDeleted,
TSocketChanged
};
typedef struct {
int socket;
int sync_id;
int reason;
void *ptr;
} TSockInfo;
typedef enum {
TMediaVoice = 0, /* Voice (PSTN) call */
TMediaVoIP = 1, /* Voice over IP */
TMediaEMail = 2,
TMediaVMail = 3, /* Voice Mail */
TMediaSMail = 4, /* Scanned Mail */
TMediaChat = 5,
TMediaVideo = 6,
TMediaCobrowsing = 7,
TMediaWhiteboard = 8,
TMediaAppSharing = 9, /* Application Sharing */
TMediaWebForm = 10,
TMediaWorkItem = 11, /* work item (generic) */
TMediaCustom0 = 100 /*<- all values above this one are */
} /* reserved for custom media types */
TMediaType;
/*---------------------------------------------------------------------------*/
typedef struct {
enum TMessageType Event;
TServer Server;
int ReferenceID;
char *HomeLocation;
char *CustomerID;
TConnectionID ConnID;
TConnectionID PreviousConnID;
TCallID CallID;
int NodeID;
TCallID NetworkCallID;
int NetworkNodeID;
TCallHistoryInfo CallHistory;
TCallType CallType;
TCallState CallState;
TAgentID AgentID;
TAgentWorkMode WorkMode;
long ErrorCode;
char *ErrorMessage;
TFile FileHandle;
char *CollectedDigits;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -