00001
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016 #ifndef __ILIBRARY_INTERFACE_H
00017 #define __ILIBRARY_INTERFACE_H
00018
00019
00020
00021
00022 #ifdef __cplusplus
00023 extern "C" {
00024 #endif
00025
00026 #if defined __OS2DEF__ || defined __wtypes_h__ || defined WIN32
00027 #define NDEF_BOOL
00028 #endif
00029
00030 #if !defined DEF_BOOL && !defined NDEF_BOOL
00031 #define DEF_BOOL
00032 #ifdef FALSE
00033 #undef FALSE
00034 #endif
00035 #ifdef TRUE
00036 #undef TRUE
00037 #endif
00038 #define FALSE 0
00039 #define TRUE 1
00040 typedef int BOOL;
00041 typedef BOOL* PBOOL;
00042 #endif
00043
00044 #if !defined __OS2DEF__
00045 typedef unsigned char BYTE;
00046 typedef unsigned short USHORT;
00047 typedef unsigned int UINT;
00048 typedef unsigned long ULONG;
00049 typedef void * PVOID;
00050 typedef BYTE * PBYTE;
00051 typedef int * PINT;
00052 typedef UINT * PUINT;
00053 typedef ULONG * PULONG;
00054 typedef BYTE * PUSTR;
00055 #endif
00056
00057 typedef const void * CPVOID;
00058 typedef PVOID * PPVOID;
00059 typedef char * PSTR;
00060 typedef const char * CPSTR;
00061 typedef long * PLONG;
00062
00063 #if !defined WIN32
00064 typedef long LONG;
00065 typedef long * LPTR;
00066 #endif
00067
00068 #if defined WIN32
00069 typedef __int64 LONG64;
00070 typedef unsigned __int64 ULONG64;
00071 #elif defined __osf__
00072 typedef long LONG64;
00073 typedef unsigned long ULONG64;
00074 #elif defined SCO_SV_3_2
00075 #elif defined _ATT_UX
00076 #elif defined _UW1_1
00077 #elif defined _UW2_1
00078 #elif defined OS2
00079 typedef struct tagLONG64
00080 {
00081 long Lo;
00082 long Hi;
00083 } LONG64;
00084 typedef struct tagULONG64
00085 {
00086 ULONG Lo;
00087 ULONG Hi;
00088 } ULONG64;
00089 #else
00090 typedef long long LONG64;
00091 typedef unsigned long long ULONG64;
00092 #endif
00093
00094 #if !defined NULL
00095 # define NULL 0
00096 #endif
00097
00098 typedef unsigned short SOCKET_PORT;
00099 typedef ULONG ilPORT;
00100 typedef ULONG ilRQ;
00101 #define ilRQ_ERR 0
00102 #define ilRQ_ANY 0
00103
00104
00105
00106
00107
00108 typedef long ilRET;
00109 #define ilRET_OK 0L
00110 #define ilRET_ERROR -1L
00111 #define ilRET_LIB_NOTREADY -3L
00112
00113 #define ilRET_CONN_CLOSED -5L
00114 #define ilRET_BAD_ARGS -7L
00115 #define ilRET_FUNC_UNSUPPORTED -9L
00116 #define ilRET_TIMEOUT -11L
00117 #define ilRET_REQ_EXPIRED -12L
00118
00119 #define ilRET_NO_REQUESTS -13L
00120
00121
00122 #define ilRET_BAD_CONN_NAME -15L
00123 #define ilRET_REQ_FAILURE -1000L
00124
00125
00126
00127
00128 typedef enum
00129 {
00130 ilCI_ALL = 100,
00131 ilCI_CONN_ID = 101,
00132 ilCI_CALL_ID = 102,
00133 ilCI_DN = 111,
00134 ilCI_ANI = 112,
00135 ilCI_DNIS = 113,
00136 ilCI_THIS_DN = 121,
00137 ilCI_THIS_TRUNK = 122,
00138 ilCI_THIS_QUEUE = 123,
00139 ilCI_OTHER_DN = 131,
00140 ilCI_OTHER_TRUNK = 132,
00141 ilCI_OTHER_QUEUE = 133,
00142 ilCI_LAST_EVENT_NAME = 151,
00143 ilCI_FIRST_HOME_LOC = 152,
00144 ilCI_UNKNOWN = 999
00145 } ilCI_TYPE;
00146
00147
00148
00149
00150 #define ilCI_CONN_ID_CHAR "ConnId"
00151 #define ilCI_ALL_CHAR "All"
00152 #define ilCI_CALL_ID_CHAR "TSCallId"
00153 #define ilCI_DN_CHAR "CalledNum"
00154 #define ilCI_ANI_CHAR "ANI"
00155 #define ilCI_DNIS_CHAR "DNIS"
00156 #define ilCI_THIS_DN_CHAR "PortDN"
00157 #define ilCI_THIS_TRUNK_CHAR "PortTrunk"
00158 #define ilCI_THIS_QUEUE_CHAR "PortQueue"
00159 #define ilCI_OTHER_DN_CHAR "OtherDN"
00160 #define ilCI_OTHER_TRUNK_CHAR "OtherTrunk"
00161 #define ilCI_OTHER_QUEUE_CHAR "OtherQueue"
00162 #define ilCI_LAST_EVENT_NAME_CHAR "LastEvent"
00163 #define ilCI_FIRST_HOME_LOC_CHAR "FirstHomeLocation"
00164 #define ilCI_UNKNOWN_CHAR "Unknown"
00165
00166 typedef enum
00167 {
00168 ilET_NUMBER = 0,
00169 ilET_TEXT = 10
00170 } ilERR_TYPE;
00171
00172 typedef enum
00173 {
00174 ilDO_NOT_SUPPORTED = 0,
00175 ilDO_NO_TRUNKS,
00176 ilDO_MISC
00177 } ilDIALOUTERR;
00178
00179 typedef enum
00180 {
00181 ilFAIL_BUSY=0,
00182 ilFAIL_NO_ANSWER,
00183 ilFAIL_CONNECT_FAILED
00184 } ilFAILURE;
00185
00186
00187
00188
00189
00190
00191
00192
00193
00194
00195
00196
00197
00198
00199 enum CallStatus
00200 {
00201 eCallStatusUnknown=0,
00202
00203
00204
00205
00206 eCallStatusDialingMakeCall,
00207 eCallStatusBusyMakeCall,
00208 eCallStatusRinging,
00209
00210
00211
00212 eCallStatusHeld,
00213 eCallStatusBusy,
00214 eCallStatusDialing,
00215 eCallStatusEstablished,
00216 eCallStatusRetrieved,
00217 eCallStatusConfPartyDel,
00218 eCallStatusConfPartyAdd,
00219 eCallStatusXferComplete,
00220
00221
00222
00223
00224
00225
00226
00227
00228
00229
00230
00231 eCallStatusReleased,
00232 eCallStatusNoChange
00233
00234 };
00235
00236
00237
00238
00239
00240
00241
00242
00243
00244
00245
00246
00247
00248
00249
00250
00251
00252
00253
00254 enum IlibraryState
00255 {
00256 ilRET_ACTIVE=0,
00257 ilRET_SHUTDOWN_IN_PROCESS,
00258 ilRET_ALL_AGENTS_LOGGEDOUT,
00259 ilRET_NO_CALLS_IN_PROGRESS
00260 };
00261
00262
00263
00264
00265
00266 #ifdef WIN32
00267 __declspec(dllexport)
00268 #endif
00269
00283 BOOL ilInitiate(CPSTR psName);
00284
00285 #ifdef WIN32
00286 __declspec(dllexport)
00287 #endif
00288
00297 BOOL ilSetVersionNumber(CPSTR pszVersionNumber);
00298
00299 #ifdef WIN32
00300 __declspec(dllexport)
00301 #endif
00302
00322 BOOL ilConnectionOpen(CPSTR psHost,SOCKET_PORT sPort,ULONG ulTimeoutMS);
00323
00324 #ifdef WIN32
00325 __declspec(dllexport)
00326 #endif
00327
00349 BOOL ilConnectionOpenConfigServer(CPSTR psHost,SOCKET_PORT sPort,CPSTR szAppName,ULONG ulTimeoutMS);
00350
00351 #ifdef WIN32
00352 __declspec(dllexport)
00353 #endif
00354
00378 BOOL ilConnectionOpenConfigServer80( CPSTR _host, SOCKET_PORT _port, SOCKET_PORT _port_transport, CPSTR _host_bu, SOCKET_PORT _port_bu, CPSTR appName, ULONG _ulTimeoutMS );
00379
00380 #ifdef WIN32
00381 __declspec(dllexport)
00382 #endif
00383
00390 BOOL ilConnectionClose(void);
00391
00392 #ifdef WIN32
00393 __declspec(dllexport)
00394 #endif
00395
00435 ilRQ ilSRqNoteCallStart(ilRQ RqID,ilPORT Port,CPSTR psCallID,CPSTR psDNIS,CPSTR psANI,CPSTR psTagCDT);
00436
00437 #ifdef WIN32
00438 __declspec(dllexport)
00439 #endif
00440
00457 ilRQ ilSRqNoteCallEnd(ilRQ RqID,ilPORT Port);
00458
00459 #ifdef WIN32
00460 __declspec(dllexport)
00461 #endif
00462
00483 ilRET ilGetReply(ilRQ RqID, PSTR psRep, int iRepLen);
00484
00485 #ifdef WIN32
00486 __declspec(dllexport)
00487 #endif
00488
00497 ilRET ilWatch( long w );
00498
00499 #ifdef WIN32
00500 __declspec(dllexport)
00501 #endif
00502
00519 ilRQ ilSRqUDataAddKD(ilRQ RqID,ilPORT port,CPSTR psKey,CPSTR psData);
00520
00521 #ifdef WIN32
00522 __declspec(dllexport)
00523 #endif
00524
00546 ilRQ ilSRqRouteGet(ilRQ RqID,ilPORT Port,CPSTR psRP);
00547
00548 #ifdef WIN32
00549 __declspec(dllexport)
00550 #endif
00551
00571 ilRET ilGetReplyAny(ilRQ* pRqID,PSTR psRep,int iRepLen);
00572
00573 #ifdef WIN32
00574 __declspec(dllexport)
00575 #endif
00576
00593 ilRQ ilSRqCallInit(ilRQ RqID,ilPORT Port,CPSTR psDstDN);
00594
00595 #ifdef WIN32
00596 __declspec(dllexport)
00597 #endif
00598
00617 ilRQ ilSRqCallComplete(ilRQ RqID,ilPORT Port);
00618
00619 #ifdef WIN32
00620 __declspec(dllexport)
00621 #endif
00622
00642 ilRQ ilSRqCallConference(ilRQ RqID,ilPORT Port,CPSTR psDstDN);
00643
00644 #ifdef WIN32
00645 __declspec(dllexport)
00646 #endif
00647
00669 ilRQ ilSRqCallTransfer(ilRQ RqID,ilPORT Port,CPSTR psDstDN);
00670
00671 #ifdef WIN32
00672 __declspec(dllexport)
00673 #endif
00674
00698 ilRQ ilSRqCallTransferKVList(ilRQ RqID,ilPORT Port,CPSTR psDstDN, CPSTR psData);
00699
00700 #ifdef WIN32
00701 __declspec(dllexport)
00702 #endif
00703
00725 ilRQ ilSRqCallConsultInit(ilRQ RqID,ilPORT Port,CPSTR psDstDN);
00726
00727 #ifdef WIN32
00728 __declspec(dllexport)
00729 #endif
00730
00747 ilRQ ilSRqCallConsultComplete(ilRQ RqID,ilPORT Port);
00748
00749 #ifdef WIN32
00750 __declspec(dllexport)
00751 #endif
00752
00772 ilRQ ilSRqCallConsultConference(ilRQ RqID,ilPORT Port);
00773
00774 #ifdef WIN32
00775 __declspec(dllexport)
00776 #endif
00777
00798 ilRQ ilSRqCallConsultTransfer(ilRQ RqID,ilPORT Port);
00799
00800 #ifdef WIN32
00801 __declspec(dllexport)
00802 #endif
00803
00851 ilRQ ilSRqUDataAddList(ilRQ RqID,ilPORT Port,CPSTR psList);
00852
00853 #ifdef WIN32
00854 __declspec(dllexport)
00855 #endif
00856
00877 ilRQ ilSRqUDataGetKD(ilRQ RqID,ilPORT Port,CPSTR psKey);
00878
00879 #ifdef WIN32
00880 __declspec(dllexport)
00881 #endif
00882
00899 ilRQ ilSRqUDataGetAll(ilRQ RqID,ilPORT Port );
00900
00901 #ifdef WIN32
00902 __declspec(dllexport)
00903 #endif
00904
00921 ilRQ ilSRqUDataDelKD(ilRQ RqID,ilPORT Port,CPSTR psKey);
00922
00923 #ifdef WIN32
00924 __declspec(dllexport)
00925 #endif
00926
00941 ilRQ ilSRqUDataDelAll(ilRQ RqID,ilPORT Port);
00942
00943 #ifdef WIN32
00944 __declspec(dllexport)
00945 #endif
00946
00978 ilRQ ilSRqGetCallInfo(ilRQ RqID,ilPORT Port,ilCI_TYPE eCI);
00979
00980 #ifdef WIN32
00981 __declspec(dllexport)
00982 #endif
00983
01038 ilRQ ilSRqCDT_Init(ilRQ RqID,ilPORT Port,CPSTR psDstDN,CPSTR psService,CPSTR psCDT_Type,CPSTR psCDT_Tag);
01039
01040 #ifdef WIN32
01041 __declspec(dllexport)
01042 #endif
01043
01058 ilRQ ilSRqCDT_Cancel(ilRQ RqID,ilPORT Port);
01059
01060 #ifdef WIN32
01061 __declspec(dllexport)
01062 #endif
01063
01081 ilRQ ilSRqVersion(ilRQ RqID,ilPORT Port,CPSTR psService);
01082
01083 #ifdef WIN32
01084 __declspec(dllexport)
01085 #endif
01086
01092 CPSTR ilGetVersion(void);
01093
01094 #ifdef WIN32
01095 __declspec(dllexport)
01096 #endif
01097
01115 ilRQ ilSRqToLog(ilRQ RqID,ilPORT Port,CPSTR psService,CPSTR psStr);
01116
01117 #ifdef WIN32
01118 __declspec(dllexport)
01119 #endif
01120
01126 BOOL ilSetLogHeader(CPSTR pszLogHeader);
01127
01128 #ifdef WIN32
01129 __declspec(dllexport)
01130 #endif
01131
01138 BOOL ilSetTimeout(ULONG ulMSec);
01139
01140 #ifdef WIN32
01141 __declspec(dllexport)
01142 #endif
01143
01149 ULONG ilGetTimeout(void);
01150
01151 #ifdef WIN32
01152 __declspec(dllexport)
01153 #endif
01154
01176 long ilGetLastError(ilERR_TYPE eErrType);
01177
01178 #ifdef WIN32
01179 __declspec(dllexport)
01180 #endif
01181
01204 long ilGetLastPortError(ilPORT ilPort, ilERR_TYPE eErrType);
01205
01206 #ifdef WIN32
01207 __declspec(dllexport)
01208 #endif
01209
01223 ilRET ilLocalPrn(ilRQ RqID,ilPORT Port,CPSTR psFmt, ...);
01224
01225 #ifdef WIN32
01226 __declspec(dllexport)
01227 #endif
01228
01249 ilRET ilLocalPrnSelector(char* selector, ilRQ RqID,ilPORT Port,CPSTR psFmt, ...);
01250
01251 #ifdef WIN32
01252 __declspec(dllexport)
01253 #endif
01254
01262 int ilGetCallStatus(ilPORT Port);
01263
01264 #ifdef WIN32
01265 __declspec(dllexport)
01266 #endif
01267
01283 CPSTR ilPrnError(long lErrCode);
01284
01285 #ifdef WIN32
01286 __declspec(dllexport)
01287 #endif
01288
01303 ilRQ ilSRqRouteDone(ilRQ RqID,ilPORT Port);
01304
01305 #ifdef WIN32
01306 __declspec(dllexport)
01307 #endif
01308
01334 ilRQ ilSRqRouteStart(ilRQ RqID,ilPORT Port,CPSTR psRP);
01335
01336 #ifdef WIN32
01337 __declspec(dllexport)
01338 #endif
01339
01355 ilRQ ilGetRequest(ilPORT Port,PSTR psReq,int iReqLen);
01356
01357 #ifdef WIN32
01358 __declspec(dllexport)
01359 #endif
01360
01380 ilRET ilSendReply(ilRQ RqID,BOOL bResult,CPSTR psReply);
01381
01382 #ifdef WIN32
01383 __declspec(dllexport)
01384 #endif
01385
01401 ilRQ ilSRqRouteAbort(ilRQ RqID,ilPORT Port);
01402
01403 #ifdef WIN32
01404 __declspec(dllexport)
01405 #endif
01406
01425 ilRQ ilSRqStatPeek(ilRQ RqID,ilPORT Port,CPSTR psStatName);
01426
01427 #ifdef WIN32
01428 __declspec(dllexport)
01429 #endif
01430
01435 ilRQ ilSRqStatGet(ilRQ RqID,ilPORT Port,CPSTR psSS_Name,CPSTR psObjectType,CPSTR psObjectID,CPSTR psStatType);
01436
01437 #ifdef WIN32
01438 __declspec(dllexport)
01439 #endif
01440
01447 BOOL ilDeinitiate(void);
01448
01449 #ifdef WIN32
01450 __declspec(dllexport)
01451 #endif
01452
01466 ilRET ilDialOutError(ilPORT Port, ilDIALOUTERR _ilDialOutErr);
01467
01468 #ifdef WIN32
01469 __declspec(dllexport)
01470 #endif
01471
01487 ilRQ ilSRqGetDialOutData();
01488
01489 #ifdef WIN32
01490 __declspec(dllexport)
01491 #endif
01492
01512 ilRQ ilSRqDialOutDataInit(ilRQ RqID, ilPORT Port, ilRQ RqID_DialOut);
01513
01514 #ifdef WIN32
01515 __declspec(dllexport)
01516 #endif
01517
01531 ilRET ilCallEstablished(ilPORT Port);
01532
01533 #ifdef WIN32
01534 __declspec(dllexport)
01535 #endif
01536
01552 ilRET ilFailure(ilPORT Port, ilFAILURE _ilFailure);
01553
01554 #ifdef WIN32
01555 __declspec(dllexport)
01556 #endif
01557
01566 ilRET ilGetProcessingState();
01567
01568 #ifdef WIN32
01569 __declspec(dllexport)
01570 #endif
01571
01581 char* ilGetParmValue(char* _key, int _iConvert);
01582
01583
01584
01585
01586 #ifdef __cplusplus
01587 }
01588 #endif
01589
01590 #endif
01591