Commit | Line | Data |
---|---|---|
1da177e4 LT |
1 | |
2 | /* | |
3 | * | |
475be4d8 | 4 | Copyright (c) Eicon Networks, 2002. |
1da177e4 | 5 | * |
475be4d8 JP |
6 | This source file is supplied for the use with |
7 | Eicon Networks range of DIVA Server Adapters. | |
1da177e4 | 8 | * |
475be4d8 | 9 | Eicon File Revision : 2.1 |
1da177e4 | 10 | * |
475be4d8 JP |
11 | This program is free software; you can redistribute it and/or modify |
12 | it under the terms of the GNU General Public License as published by | |
13 | the Free Software Foundation; either version 2, or (at your option) | |
14 | any later version. | |
1da177e4 | 15 | * |
475be4d8 JP |
16 | This program is distributed in the hope that it will be useful, |
17 | but WITHOUT ANY WARRANTY OF ANY KIND WHATSOEVER INCLUDING ANY | |
18 | implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | |
19 | See the GNU General Public License for more details. | |
1da177e4 | 20 | * |
475be4d8 JP |
21 | You should have received a copy of the GNU General Public License |
22 | along with this program; if not, write to the Free Software | |
23 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | |
1da177e4 LT |
24 | * |
25 | */ | |
475be4d8 | 26 | #ifndef _INC_CAPI20 |
1da177e4 | 27 | #define _INC_CAPI20 |
475be4d8 JP |
28 | /* operations on message queues */ |
29 | /* the common device type for CAPI20 drivers */ | |
1da177e4 | 30 | #define FILE_DEVICE_CAPI20 0x8001 |
475be4d8 | 31 | /* DEVICE_CONTROL codes for user and kernel mode applications */ |
1da177e4 LT |
32 | #define CAPI20_CTL_REGISTER 0x0801 |
33 | #define CAPI20_CTL_RELEASE 0x0802 | |
34 | #define CAPI20_CTL_GET_MANUFACTURER 0x0805 | |
35 | #define CAPI20_CTL_GET_VERSION 0x0806 | |
36 | #define CAPI20_CTL_GET_SERIAL 0x0807 | |
37 | #define CAPI20_CTL_GET_PROFILE 0x0808 | |
475be4d8 | 38 | /* INTERNAL_DEVICE_CONTROL codes for kernel mode applicatios only */ |
1da177e4 LT |
39 | #define CAPI20_CTL_PUT_MESSAGE 0x0803 |
40 | #define CAPI20_CTL_GET_MESSAGE 0x0804 | |
475be4d8 JP |
41 | /* the wrapped codes as required by the system */ |
42 | #define CAPI_CTL_CODE(f, m) CTL_CODE(FILE_DEVICE_CAPI20, f, m, FILE_ANY_ACCESS) | |
43 | #define IOCTL_CAPI_REGISTER CAPI_CTL_CODE(CAPI20_CTL_REGISTER, METHOD_BUFFERED) | |
44 | #define IOCTL_CAPI_RELEASE CAPI_CTL_CODE(CAPI20_CTL_RELEASE, METHOD_BUFFERED) | |
45 | #define IOCTL_CAPI_GET_MANUFACTURER CAPI_CTL_CODE(CAPI20_CTL_GET_MANUFACTURER, METHOD_BUFFERED) | |
46 | #define IOCTL_CAPI_GET_VERSION CAPI_CTL_CODE(CAPI20_CTL_GET_VERSION, METHOD_BUFFERED) | |
47 | #define IOCTL_CAPI_GET_SERIAL CAPI_CTL_CODE(CAPI20_CTL_GET_SERIAL, METHOD_BUFFERED) | |
48 | #define IOCTL_CAPI_GET_PROFILE CAPI_CTL_CODE(CAPI20_CTL_GET_PROFILE, METHOD_BUFFERED) | |
49 | #define IOCTL_CAPI_PUT_MESSAGE CAPI_CTL_CODE(CAPI20_CTL_PUT_MESSAGE, METHOD_BUFFERED) | |
50 | #define IOCTL_CAPI_GET_MESSAGE CAPI_CTL_CODE(CAPI20_CTL_GET_MESSAGE, METHOD_BUFFERED) | |
1da177e4 | 51 | struct divas_capi_register_params { |
475be4d8 JP |
52 | word MessageBufferSize; |
53 | word maxLogicalConnection; | |
54 | word maxBDataBlocks; | |
55 | word maxBDataLen; | |
1da177e4 LT |
56 | }; |
57 | struct divas_capi_version { | |
475be4d8 JP |
58 | word CapiMajor; |
59 | word CapiMinor; | |
60 | word ManuMajor; | |
61 | word ManuMinor; | |
1da177e4 LT |
62 | }; |
63 | typedef struct api_profile_s { | |
475be4d8 JP |
64 | word Number; |
65 | word Channels; | |
66 | dword Global_Options; | |
67 | dword B1_Protocols; | |
68 | dword B2_Protocols; | |
69 | dword B3_Protocols; | |
1da177e4 | 70 | } API_PROFILE; |
475be4d8 | 71 | /* ISDN Common API message types */ |
1da177e4 LT |
72 | #define _ALERT_R 0x8001 |
73 | #define _CONNECT_R 0x8002 | |
74 | #define _CONNECT_I 0x8202 | |
75 | #define _CONNECT_ACTIVE_I 0x8203 | |
76 | #define _DISCONNECT_R 0x8004 | |
77 | #define _DISCONNECT_I 0x8204 | |
78 | #define _LISTEN_R 0x8005 | |
79 | #define _INFO_R 0x8008 | |
80 | #define _INFO_I 0x8208 | |
81 | #define _SELECT_B_REQ 0x8041 | |
82 | #define _FACILITY_R 0x8080 | |
83 | #define _FACILITY_I 0x8280 | |
84 | #define _CONNECT_B3_R 0x8082 | |
85 | #define _CONNECT_B3_I 0x8282 | |
86 | #define _CONNECT_B3_ACTIVE_I 0x8283 | |
87 | #define _DISCONNECT_B3_R 0x8084 | |
88 | #define _DISCONNECT_B3_I 0x8284 | |
89 | #define _DATA_B3_R 0x8086 | |
90 | #define _DATA_B3_I 0x8286 | |
91 | #define _RESET_B3_R 0x8087 | |
92 | #define _RESET_B3_I 0x8287 | |
93 | #define _CONNECT_B3_T90_ACTIVE_I 0x8288 | |
94 | #define _MANUFACTURER_R 0x80ff | |
95 | #define _MANUFACTURER_I 0x82ff | |
475be4d8 | 96 | /* OR this to convert a REQUEST to a CONFIRM */ |
1da177e4 | 97 | #define CONFIRM 0x0100 |
475be4d8 | 98 | /* OR this to convert a INDICATION to a RESPONSE */ |
1da177e4 LT |
99 | #define RESPONSE 0x0100 |
100 | /*------------------------------------------------------------------*/ | |
101 | /* diehl isdn private MANUFACTURER codes */ | |
102 | /*------------------------------------------------------------------*/ | |
103 | #define _DI_MANU_ID 0x44444944 | |
104 | #define _DI_ASSIGN_PLCI 0x0001 | |
105 | #define _DI_ADV_CODEC 0x0002 | |
106 | #define _DI_DSP_CTRL 0x0003 | |
107 | #define _DI_SIG_CTRL 0x0004 | |
108 | #define _DI_RXT_CTRL 0x0005 | |
109 | #define _DI_IDI_CTRL 0x0006 | |
110 | #define _DI_CFG_CTRL 0x0007 | |
111 | #define _DI_REMOVE_CODEC 0x0008 | |
112 | #define _DI_OPTIONS_REQUEST 0x0009 | |
113 | #define _DI_SSEXT_CTRL 0x000a | |
114 | #define _DI_NEGOTIATE_B3 0x000b | |
115 | /*------------------------------------------------------------------*/ | |
116 | /* parameter structures */ | |
117 | /*------------------------------------------------------------------*/ | |
475be4d8 | 118 | /* ALERT-REQUEST */ |
1da177e4 | 119 | typedef struct { |
475be4d8 | 120 | byte structs[0]; /* Additional Info */ |
1da177e4 | 121 | } _ALT_REQP; |
475be4d8 | 122 | /* ALERT-CONFIRM */ |
1da177e4 | 123 | typedef struct { |
475be4d8 | 124 | word Info; |
1da177e4 | 125 | } _ALT_CONP; |
475be4d8 JP |
126 | /* CONNECT-REQUEST */ |
127 | typedef struct { | |
128 | word CIP_Value; | |
129 | byte structs[0]; /* Called party number, | |
130 | Called party subaddress, | |
131 | Calling party number, | |
132 | Calling party subaddress, | |
133 | B_protocol, | |
134 | BC, | |
135 | LLC, | |
136 | HLC, | |
137 | Additional Info */ | |
1da177e4 | 138 | } _CON_REQP; |
475be4d8 | 139 | /* CONNECT-CONFIRM */ |
1da177e4 | 140 | typedef struct { |
475be4d8 | 141 | word Info; |
1da177e4 | 142 | } _CON_CONP; |
475be4d8 JP |
143 | /* CONNECT-INDICATION */ |
144 | typedef struct { | |
145 | word CIP_Value; | |
146 | byte structs[0]; /* Called party number, | |
147 | Called party subaddress, | |
148 | Calling party number, | |
149 | Calling party subaddress, | |
150 | BC, | |
151 | LLC, | |
152 | HLC, | |
153 | Additional Info */ | |
1da177e4 | 154 | } _CON_INDP; |
475be4d8 | 155 | /* CONNECT-RESPONSE */ |
1da177e4 | 156 | typedef struct { |
475be4d8 JP |
157 | word Accept; |
158 | byte structs[0]; /* B_protocol, | |
159 | Connected party number, | |
160 | Connected party subaddress, | |
161 | LLC */ | |
1da177e4 | 162 | } _CON_RESP; |
475be4d8 | 163 | /* CONNECT-ACTIVE-INDICATION */ |
1da177e4 | 164 | typedef struct { |
475be4d8 JP |
165 | byte structs[0]; /* Connected party number, |
166 | Connected party subaddress, | |
167 | LLC */ | |
1da177e4 | 168 | } _CON_A_INDP; |
475be4d8 | 169 | /* CONNECT-ACTIVE-RESPONSE */ |
1da177e4 | 170 | typedef struct { |
475be4d8 | 171 | byte structs[0]; /* empty */ |
1da177e4 | 172 | } _CON_A_RESP; |
475be4d8 | 173 | /* DISCONNECT-REQUEST */ |
1da177e4 | 174 | typedef struct { |
475be4d8 | 175 | byte structs[0]; /* Additional Info */ |
1da177e4 | 176 | } _DIS_REQP; |
475be4d8 | 177 | /* DISCONNECT-CONFIRM */ |
1da177e4 | 178 | typedef struct { |
475be4d8 | 179 | word Info; |
1da177e4 | 180 | } _DIS_CONP; |
475be4d8 | 181 | /* DISCONNECT-INDICATION */ |
1da177e4 | 182 | typedef struct { |
475be4d8 | 183 | word Info; |
1da177e4 | 184 | } _DIS_INDP; |
475be4d8 | 185 | /* DISCONNECT-RESPONSE */ |
1da177e4 | 186 | typedef struct { |
475be4d8 | 187 | byte structs[0]; /* empty */ |
1da177e4 | 188 | } _DIS_RESP; |
475be4d8 | 189 | /* LISTEN-REQUEST */ |
1da177e4 | 190 | typedef struct { |
475be4d8 JP |
191 | dword Info_Mask; |
192 | dword CIP_Mask; | |
193 | byte structs[0]; /* Calling party number, | |
194 | Calling party subaddress */ | |
1da177e4 | 195 | } _LIS_REQP; |
475be4d8 | 196 | /* LISTEN-CONFIRM */ |
1da177e4 | 197 | typedef struct { |
475be4d8 | 198 | word Info; |
1da177e4 | 199 | } _LIS_CONP; |
475be4d8 | 200 | /* INFO-REQUEST */ |
1da177e4 | 201 | typedef struct { |
475be4d8 JP |
202 | byte structs[0]; /* Called party number, |
203 | Additional Info */ | |
1da177e4 | 204 | } _INF_REQP; |
475be4d8 | 205 | /* INFO-CONFIRM */ |
1da177e4 | 206 | typedef struct { |
475be4d8 | 207 | word Info; |
1da177e4 | 208 | } _INF_CONP; |
475be4d8 | 209 | /* INFO-INDICATION */ |
1da177e4 | 210 | typedef struct { |
475be4d8 JP |
211 | word Number; |
212 | byte structs[0]; /* Info element */ | |
1da177e4 | 213 | } _INF_INDP; |
475be4d8 | 214 | /* INFO-RESPONSE */ |
1da177e4 | 215 | typedef struct { |
475be4d8 | 216 | byte structs[0]; /* empty */ |
1da177e4 | 217 | } _INF_RESP; |
475be4d8 | 218 | /* SELECT-B-REQUEST */ |
1da177e4 | 219 | typedef struct { |
475be4d8 | 220 | byte structs[0]; /* B-protocol */ |
1da177e4 | 221 | } _SEL_B_REQP; |
475be4d8 | 222 | /* SELECT-B-CONFIRM */ |
1da177e4 | 223 | typedef struct { |
475be4d8 | 224 | word Info; |
1da177e4 | 225 | } _SEL_B_CONP; |
475be4d8 | 226 | /* FACILITY-REQUEST */ |
1da177e4 | 227 | typedef struct { |
475be4d8 JP |
228 | word Selector; |
229 | byte structs[0]; /* Facility parameters */ | |
1da177e4 | 230 | } _FAC_REQP; |
475be4d8 | 231 | /* FACILITY-CONFIRM STRUCT FOR SUPPLEMENT. SERVICES */ |
1da177e4 | 232 | typedef struct { |
475be4d8 JP |
233 | byte struct_length; |
234 | word function; | |
235 | byte length; | |
236 | word SupplementaryServiceInfo; | |
237 | dword SupportedServices; | |
1da177e4 | 238 | } _FAC_CON_STRUCTS; |
475be4d8 | 239 | /* FACILITY-CONFIRM */ |
1da177e4 | 240 | typedef struct { |
475be4d8 JP |
241 | word Info; |
242 | word Selector; | |
243 | byte structs[0]; /* Facility parameters */ | |
1da177e4 | 244 | } _FAC_CONP; |
475be4d8 | 245 | /* FACILITY-INDICATION */ |
1da177e4 | 246 | typedef struct { |
475be4d8 JP |
247 | word Selector; |
248 | byte structs[0]; /* Facility parameters */ | |
1da177e4 | 249 | } _FAC_INDP; |
475be4d8 | 250 | /* FACILITY-RESPONSE */ |
1da177e4 | 251 | typedef struct { |
475be4d8 JP |
252 | word Selector; |
253 | byte structs[0]; /* Facility parameters */ | |
1da177e4 | 254 | } _FAC_RESP; |
475be4d8 | 255 | /* CONNECT-B3-REQUEST */ |
1da177e4 | 256 | typedef struct { |
475be4d8 | 257 | byte structs[0]; /* NCPI */ |
1da177e4 | 258 | } _CON_B3_REQP; |
475be4d8 | 259 | /* CONNECT-B3-CONFIRM */ |
1da177e4 | 260 | typedef struct { |
475be4d8 | 261 | word Info; |
1da177e4 | 262 | } _CON_B3_CONP; |
475be4d8 | 263 | /* CONNECT-B3-INDICATION */ |
1da177e4 | 264 | typedef struct { |
475be4d8 | 265 | byte structs[0]; /* NCPI */ |
1da177e4 | 266 | } _CON_B3_INDP; |
475be4d8 | 267 | /* CONNECT-B3-RESPONSE */ |
1da177e4 | 268 | typedef struct { |
475be4d8 JP |
269 | word Accept; |
270 | byte structs[0]; /* NCPI */ | |
1da177e4 | 271 | } _CON_B3_RESP; |
475be4d8 | 272 | /* CONNECT-B3-ACTIVE-INDICATION */ |
1da177e4 | 273 | typedef struct { |
475be4d8 | 274 | byte structs[0]; /* NCPI */ |
1da177e4 | 275 | } _CON_B3_A_INDP; |
475be4d8 | 276 | /* CONNECT-B3-ACTIVE-RESPONSE */ |
1da177e4 | 277 | typedef struct { |
475be4d8 | 278 | byte structs[0]; /* empty */ |
1da177e4 | 279 | } _CON_B3_A_RESP; |
475be4d8 | 280 | /* DISCONNECT-B3-REQUEST */ |
1da177e4 | 281 | typedef struct { |
475be4d8 | 282 | byte structs[0]; /* NCPI */ |
1da177e4 | 283 | } _DIS_B3_REQP; |
475be4d8 | 284 | /* DISCONNECT-B3-CONFIRM */ |
1da177e4 | 285 | typedef struct { |
475be4d8 | 286 | word Info; |
1da177e4 | 287 | } _DIS_B3_CONP; |
475be4d8 | 288 | /* DISCONNECT-B3-INDICATION */ |
1da177e4 | 289 | typedef struct { |
475be4d8 JP |
290 | word Info; |
291 | byte structs[0]; /* NCPI */ | |
1da177e4 | 292 | } _DIS_B3_INDP; |
475be4d8 | 293 | /* DISCONNECT-B3-RESPONSE */ |
1da177e4 | 294 | typedef struct { |
475be4d8 | 295 | byte structs[0]; /* empty */ |
1da177e4 | 296 | } _DIS_B3_RESP; |
475be4d8 | 297 | /* DATA-B3-REQUEST */ |
1da177e4 | 298 | typedef struct { |
475be4d8 JP |
299 | dword Data; |
300 | word Data_Length; | |
301 | word Number; | |
302 | word Flags; | |
1da177e4 | 303 | } _DAT_B3_REQP; |
475be4d8 | 304 | /* DATA-B3-REQUEST 64 BIT Systems */ |
1da177e4 | 305 | typedef struct { |
475be4d8 JP |
306 | dword Data; |
307 | word Data_Length; | |
308 | word Number; | |
309 | word Flags; | |
310 | void *pData; | |
1da177e4 | 311 | } _DAT_B3_REQ64P; |
475be4d8 | 312 | /* DATA-B3-CONFIRM */ |
1da177e4 | 313 | typedef struct { |
475be4d8 JP |
314 | word Number; |
315 | word Info; | |
1da177e4 | 316 | } _DAT_B3_CONP; |
475be4d8 | 317 | /* DATA-B3-INDICATION */ |
1da177e4 | 318 | typedef struct { |
475be4d8 JP |
319 | dword Data; |
320 | word Data_Length; | |
321 | word Number; | |
322 | word Flags; | |
1da177e4 | 323 | } _DAT_B3_INDP; |
475be4d8 | 324 | /* DATA-B3-INDICATION 64 BIT Systems */ |
1da177e4 | 325 | typedef struct { |
475be4d8 JP |
326 | dword Data; |
327 | word Data_Length; | |
328 | word Number; | |
329 | word Flags; | |
330 | void *pData; | |
1da177e4 | 331 | } _DAT_B3_IND64P; |
475be4d8 | 332 | /* DATA-B3-RESPONSE */ |
1da177e4 | 333 | typedef struct { |
475be4d8 | 334 | word Number; |
1da177e4 | 335 | } _DAT_B3_RESP; |
475be4d8 | 336 | /* RESET-B3-REQUEST */ |
1da177e4 | 337 | typedef struct { |
475be4d8 | 338 | byte structs[0]; /* NCPI */ |
1da177e4 | 339 | } _RES_B3_REQP; |
475be4d8 | 340 | /* RESET-B3-CONFIRM */ |
1da177e4 | 341 | typedef struct { |
475be4d8 | 342 | word Info; |
1da177e4 | 343 | } _RES_B3_CONP; |
475be4d8 | 344 | /* RESET-B3-INDICATION */ |
1da177e4 | 345 | typedef struct { |
475be4d8 | 346 | byte structs[0]; /* NCPI */ |
1da177e4 | 347 | } _RES_B3_INDP; |
475be4d8 | 348 | /* RESET-B3-RESPONSE */ |
1da177e4 | 349 | typedef struct { |
475be4d8 | 350 | byte structs[0]; /* empty */ |
1da177e4 | 351 | } _RES_B3_RESP; |
475be4d8 | 352 | /* CONNECT-B3-T90-ACTIVE-INDICATION */ |
1da177e4 | 353 | typedef struct { |
475be4d8 | 354 | byte structs[0]; /* NCPI */ |
1da177e4 | 355 | } _CON_B3_T90_A_INDP; |
475be4d8 | 356 | /* CONNECT-B3-T90-ACTIVE-RESPONSE */ |
1da177e4 | 357 | typedef struct { |
475be4d8 JP |
358 | word Reject; |
359 | byte structs[0]; /* NCPI */ | |
1da177e4 LT |
360 | } _CON_B3_T90_A_RESP; |
361 | /*------------------------------------------------------------------*/ | |
362 | /* message structure */ | |
363 | /*------------------------------------------------------------------*/ | |
364 | typedef struct _API_MSG CAPI_MSG; | |
365 | typedef struct _MSG_HEADER CAPI_MSG_HEADER; | |
366 | struct _API_MSG { | |
475be4d8 JP |
367 | struct _MSG_HEADER { |
368 | word length; | |
369 | word appl_id; | |
370 | word command; | |
371 | word number; | |
372 | byte controller; | |
373 | byte plci; | |
374 | word ncci; | |
375 | } header; | |
376 | union { | |
377 | _ALT_REQP alert_req; | |
378 | _ALT_CONP alert_con; | |
379 | _CON_REQP connect_req; | |
380 | _CON_CONP connect_con; | |
381 | _CON_INDP connect_ind; | |
382 | _CON_RESP connect_res; | |
383 | _CON_A_INDP connect_a_ind; | |
384 | _CON_A_RESP connect_a_res; | |
385 | _DIS_REQP disconnect_req; | |
386 | _DIS_CONP disconnect_con; | |
387 | _DIS_INDP disconnect_ind; | |
388 | _DIS_RESP disconnect_res; | |
389 | _LIS_REQP listen_req; | |
390 | _LIS_CONP listen_con; | |
391 | _INF_REQP info_req; | |
392 | _INF_CONP info_con; | |
393 | _INF_INDP info_ind; | |
394 | _INF_RESP info_res; | |
395 | _SEL_B_REQP select_b_req; | |
396 | _SEL_B_CONP select_b_con; | |
397 | _FAC_REQP facility_req; | |
398 | _FAC_CONP facility_con; | |
399 | _FAC_INDP facility_ind; | |
400 | _FAC_RESP facility_res; | |
401 | _CON_B3_REQP connect_b3_req; | |
402 | _CON_B3_CONP connect_b3_con; | |
403 | _CON_B3_INDP connect_b3_ind; | |
404 | _CON_B3_RESP connect_b3_res; | |
405 | _CON_B3_A_INDP connect_b3_a_ind; | |
406 | _CON_B3_A_RESP connect_b3_a_res; | |
407 | _DIS_B3_REQP disconnect_b3_req; | |
408 | _DIS_B3_CONP disconnect_b3_con; | |
409 | _DIS_B3_INDP disconnect_b3_ind; | |
410 | _DIS_B3_RESP disconnect_b3_res; | |
411 | _DAT_B3_REQP data_b3_req; | |
412 | _DAT_B3_REQ64P data_b3_req64; | |
413 | _DAT_B3_CONP data_b3_con; | |
414 | _DAT_B3_INDP data_b3_ind; | |
415 | _DAT_B3_IND64P data_b3_ind64; | |
416 | _DAT_B3_RESP data_b3_res; | |
417 | _RES_B3_REQP reset_b3_req; | |
418 | _RES_B3_CONP reset_b3_con; | |
419 | _RES_B3_INDP reset_b3_ind; | |
420 | _RES_B3_RESP reset_b3_res; | |
421 | _CON_B3_T90_A_INDP connect_b3_t90_a_ind; | |
422 | _CON_B3_T90_A_RESP connect_b3_t90_a_res; | |
423 | byte b[200]; | |
424 | } info; | |
1da177e4 LT |
425 | }; |
426 | /*------------------------------------------------------------------*/ | |
427 | /* non-fatal errors */ | |
428 | /*------------------------------------------------------------------*/ | |
429 | #define _NCPI_IGNORED 0x0001 | |
430 | #define _FLAGS_IGNORED 0x0002 | |
431 | #define _ALERT_IGNORED 0x0003 | |
432 | /*------------------------------------------------------------------*/ | |
433 | /* API function error codes */ | |
434 | /*------------------------------------------------------------------*/ | |
435 | #define GOOD 0x0000 | |
436 | #define _TOO_MANY_APPLICATIONS 0x1001 | |
437 | #define _BLOCK_TOO_SMALL 0x1002 | |
438 | #define _BUFFER_TOO_BIG 0x1003 | |
439 | #define _MSG_BUFFER_TOO_SMALL 0x1004 | |
440 | #define _TOO_MANY_CONNECTIONS 0x1005 | |
441 | #define _REG_CAPI_BUSY 0x1007 | |
442 | #define _REG_RESOURCE_ERROR 0x1008 | |
443 | #define _REG_CAPI_NOT_INSTALLED 0x1009 | |
444 | #define _WRONG_APPL_ID 0x1101 | |
445 | #define _BAD_MSG 0x1102 | |
446 | #define _QUEUE_FULL 0x1103 | |
447 | #define _GET_NO_MSG 0x1104 | |
448 | #define _MSG_LOST 0x1105 | |
449 | #define _WRONG_NOTIFY 0x1106 | |
450 | #define _CAPI_BUSY 0x1107 | |
451 | #define _RESOURCE_ERROR 0x1108 | |
452 | #define _CAPI_NOT_INSTALLED 0x1109 | |
453 | #define _NO_EXTERNAL_EQUIPMENT 0x110a | |
454 | #define _ONLY_EXTERNAL_EQUIPMENT 0x110b | |
455 | /*------------------------------------------------------------------*/ | |
456 | /* addressing/coding error codes */ | |
457 | /*------------------------------------------------------------------*/ | |
458 | #define _WRONG_STATE 0x2001 | |
459 | #define _WRONG_IDENTIFIER 0x2002 | |
460 | #define _OUT_OF_PLCI 0x2003 | |
461 | #define _OUT_OF_NCCI 0x2004 | |
462 | #define _OUT_OF_LISTEN 0x2005 | |
463 | #define _OUT_OF_FAX 0x2006 | |
464 | #define _WRONG_MESSAGE_FORMAT 0x2007 | |
465 | #define _OUT_OF_INTERCONNECT_RESOURCES 0x2008 | |
466 | /*------------------------------------------------------------------*/ | |
467 | /* configuration error codes */ | |
468 | /*------------------------------------------------------------------*/ | |
469 | #define _B1_NOT_SUPPORTED 0x3001 | |
470 | #define _B2_NOT_SUPPORTED 0x3002 | |
471 | #define _B3_NOT_SUPPORTED 0x3003 | |
472 | #define _B1_PARM_NOT_SUPPORTED 0x3004 | |
473 | #define _B2_PARM_NOT_SUPPORTED 0x3005 | |
474 | #define _B3_PARM_NOT_SUPPORTED 0x3006 | |
475 | #define _B_STACK_NOT_SUPPORTED 0x3007 | |
476 | #define _NCPI_NOT_SUPPORTED 0x3008 | |
477 | #define _CIP_NOT_SUPPORTED 0x3009 | |
478 | #define _FLAGS_NOT_SUPPORTED 0x300a | |
479 | #define _FACILITY_NOT_SUPPORTED 0x300b | |
480 | #define _DATA_LEN_NOT_SUPPORTED 0x300c | |
481 | #define _RESET_NOT_SUPPORTED 0x300d | |
482 | #define _SUPPLEMENTARY_SERVICE_NOT_SUPPORTED 0x300e | |
483 | #define _REQUEST_NOT_ALLOWED_IN_THIS_STATE 0x3010 | |
484 | #define _FACILITY_SPECIFIC_FUNCTION_NOT_SUPP 0x3011 | |
485 | /*------------------------------------------------------------------*/ | |
486 | /* reason codes */ | |
487 | /*------------------------------------------------------------------*/ | |
488 | #define _L1_ERROR 0x3301 | |
489 | #define _L2_ERROR 0x3302 | |
490 | #define _L3_ERROR 0x3303 | |
491 | #define _OTHER_APPL_CONNECTED 0x3304 | |
492 | #define _CAPI_GUARD_ERROR 0x3305 | |
493 | #define _L3_CAUSE 0x3400 | |
494 | /*------------------------------------------------------------------*/ | |
495 | /* b3 reason codes */ | |
496 | /*------------------------------------------------------------------*/ | |
497 | #define _B_CHANNEL_LOST 0x3301 | |
498 | #define _B2_ERROR 0x3302 | |
499 | #define _B3_ERROR 0x3303 | |
500 | /*------------------------------------------------------------------*/ | |
501 | /* fax error codes */ | |
502 | /*------------------------------------------------------------------*/ | |
503 | #define _FAX_NO_CONNECTION 0x3311 | |
504 | #define _FAX_TRAINING_ERROR 0x3312 | |
505 | #define _FAX_REMOTE_REJECT 0x3313 | |
506 | #define _FAX_REMOTE_ABORT 0x3314 | |
507 | #define _FAX_PROTOCOL_ERROR 0x3315 | |
508 | #define _FAX_TX_UNDERRUN 0x3316 | |
509 | #define _FAX_RX_OVERFLOW 0x3317 | |
510 | #define _FAX_LOCAL_ABORT 0x3318 | |
511 | #define _FAX_PARAMETER_ERROR 0x3319 | |
512 | /*------------------------------------------------------------------*/ | |
513 | /* line interconnect error codes */ | |
514 | /*------------------------------------------------------------------*/ | |
515 | #define _LI_USER_INITIATED 0x0000 | |
516 | #define _LI_LINE_NO_LONGER_AVAILABLE 0x3805 | |
517 | #define _LI_INTERCONNECT_NOT_ESTABLISHED 0x3806 | |
518 | #define _LI_LINES_NOT_COMPATIBLE 0x3807 | |
519 | #define _LI2_USER_INITIATED 0x0000 | |
520 | #define _LI2_PLCI_HAS_NO_BCHANNEL 0x3800 | |
521 | #define _LI2_LINES_NOT_COMPATIBLE 0x3801 | |
522 | #define _LI2_NOT_IN_SAME_INTERCONNECTION 0x3802 | |
523 | /*------------------------------------------------------------------*/ | |
524 | /* global options */ | |
525 | /*------------------------------------------------------------------*/ | |
526 | #define GL_INTERNAL_CONTROLLER_SUPPORTED 0x00000001L | |
527 | #define GL_EXTERNAL_EQUIPMENT_SUPPORTED 0x00000002L | |
528 | #define GL_HANDSET_SUPPORTED 0x00000004L | |
529 | #define GL_DTMF_SUPPORTED 0x00000008L | |
530 | #define GL_SUPPLEMENTARY_SERVICES_SUPPORTED 0x00000010L | |
531 | #define GL_CHANNEL_ALLOCATION_SUPPORTED 0x00000020L | |
532 | #define GL_BCHANNEL_OPERATION_SUPPORTED 0x00000040L | |
533 | #define GL_LINE_INTERCONNECT_SUPPORTED 0x00000080L | |
534 | #define GL_ECHO_CANCELLER_SUPPORTED 0x00000100L | |
535 | /*------------------------------------------------------------------*/ | |
536 | /* protocol selection */ | |
537 | /*------------------------------------------------------------------*/ | |
538 | #define B1_HDLC 0 | |
539 | #define B1_TRANSPARENT 1 | |
540 | #define B1_V110_ASYNC 2 | |
541 | #define B1_V110_SYNC 3 | |
542 | #define B1_T30 4 | |
543 | #define B1_HDLC_INVERTED 5 | |
544 | #define B1_TRANSPARENT_R 6 | |
545 | #define B1_MODEM_ALL_NEGOTIATE 7 | |
546 | #define B1_MODEM_ASYNC 8 | |
547 | #define B1_MODEM_SYNC_HDLC 9 | |
548 | #define B2_X75 0 | |
549 | #define B2_TRANSPARENT 1 | |
550 | #define B2_SDLC 2 | |
551 | #define B2_LAPD 3 | |
552 | #define B2_T30 4 | |
553 | #define B2_PPP 5 | |
554 | #define B2_TRANSPARENT_NO_CRC 6 | |
555 | #define B2_MODEM_EC_COMPRESSION 7 | |
556 | #define B2_X75_V42BIS 8 | |
557 | #define B2_V120_ASYNC 9 | |
558 | #define B2_V120_ASYNC_V42BIS 10 | |
559 | #define B2_V120_BIT_TRANSPARENT 11 | |
560 | #define B2_LAPD_FREE_SAPI_SEL 12 | |
561 | #define B3_TRANSPARENT 0 | |
562 | #define B3_T90NL 1 | |
563 | #define B3_ISO8208 2 | |
564 | #define B3_X25_DCE 3 | |
565 | #define B3_T30 4 | |
566 | #define B3_T30_WITH_EXTENSIONS 5 | |
567 | #define B3_RESERVED 6 | |
568 | #define B3_MODEM 7 | |
569 | /*------------------------------------------------------------------*/ | |
570 | /* facility definitions */ | |
571 | /*------------------------------------------------------------------*/ | |
572 | #define SELECTOR_HANDSET 0 | |
573 | #define SELECTOR_DTMF 1 | |
574 | #define SELECTOR_V42BIS 2 | |
575 | #define SELECTOR_SU_SERV 3 | |
576 | #define SELECTOR_POWER_MANAGEMENT 4 | |
577 | #define SELECTOR_LINE_INTERCONNECT 5 | |
578 | #define SELECTOR_ECHO_CANCELLER 6 | |
579 | /*------------------------------------------------------------------*/ | |
580 | /* supplementary services definitions */ | |
581 | /*------------------------------------------------------------------*/ | |
582 | #define S_GET_SUPPORTED_SERVICES 0x0000 | |
583 | #define S_LISTEN 0x0001 | |
584 | #define S_HOLD 0x0002 | |
585 | #define S_RETRIEVE 0x0003 | |
586 | #define S_SUSPEND 0x0004 | |
587 | #define S_RESUME 0x0005 | |
588 | #define S_ECT 0x0006 | |
589 | #define S_3PTY_BEGIN 0x0007 | |
590 | #define S_3PTY_END 0x0008 | |
591 | #define S_CALL_DEFLECTION 0x000d | |
592 | #define S_CALL_FORWARDING_START 0x0009 | |
593 | #define S_CALL_FORWARDING_STOP 0x000a | |
594 | #define S_INTERROGATE_DIVERSION 0x000b /* or interrogate parameters */ | |
595 | #define S_INTERROGATE_NUMBERS 0x000c | |
596 | #define S_CCBS_REQUEST 0x000f | |
597 | #define S_CCBS_DEACTIVATE 0x0010 | |
598 | #define S_CCBS_INTERROGATE 0x0011 | |
599 | #define S_CCBS_CALL 0x0012 | |
600 | #define S_MWI_ACTIVATE 0x0013 | |
601 | #define S_MWI_DEACTIVATE 0x0014 | |
602 | #define S_CONF_BEGIN 0x0017 | |
603 | #define S_CONF_ADD 0x0018 | |
604 | #define S_CONF_SPLIT 0x0019 | |
605 | #define S_CONF_DROP 0x001a | |
606 | #define S_CONF_ISOLATE 0x001b | |
607 | #define S_CONF_REATTACH 0x001c | |
608 | #define S_CCBS_ERASECALLLINKAGEID 0x800d | |
609 | #define S_CCBS_STOP_ALERTING 0x8012 | |
610 | #define S_CCBS_INFO_RETAIN 0x8013 | |
611 | #define S_MWI_INDICATE 0x8014 | |
612 | #define S_CONF_PARTYDISC 0x8016 | |
613 | #define S_CONF_NOTIFICATION 0x8017 | |
614 | /* Service Masks */ | |
615 | #define MASK_HOLD_RETRIEVE 0x00000001 | |
616 | #define MASK_TERMINAL_PORTABILITY 0x00000002 | |
617 | #define MASK_ECT 0x00000004 | |
618 | #define MASK_3PTY 0x00000008 | |
619 | #define MASK_CALL_FORWARDING 0x00000010 | |
620 | #define MASK_CALL_DEFLECTION 0x00000020 | |
621 | #define MASK_MWI 0x00000100 | |
622 | #define MASK_CCNR 0x00000200 | |
623 | #define MASK_CONF 0x00000400 | |
624 | /*------------------------------------------------------------------*/ | |
625 | /* dtmf definitions */ | |
626 | /*------------------------------------------------------------------*/ | |
627 | #define DTMF_LISTEN_START 1 | |
628 | #define DTMF_LISTEN_STOP 2 | |
629 | #define DTMF_DIGITS_SEND 3 | |
630 | #define DTMF_SUCCESS 0 | |
631 | #define DTMF_INCORRECT_DIGIT 1 | |
632 | #define DTMF_UNKNOWN_REQUEST 2 | |
633 | /*------------------------------------------------------------------*/ | |
634 | /* line interconnect definitions */ | |
635 | /*------------------------------------------------------------------*/ | |
636 | #define LI_GET_SUPPORTED_SERVICES 0 | |
637 | #define LI_REQ_CONNECT 1 | |
638 | #define LI_REQ_DISCONNECT 2 | |
639 | #define LI_IND_CONNECT_ACTIVE 1 | |
640 | #define LI_IND_DISCONNECT 2 | |
641 | #define LI_FLAG_CONFERENCE_A_B ((dword) 0x00000001L) | |
642 | #define LI_FLAG_CONFERENCE_B_A ((dword) 0x00000002L) | |
643 | #define LI_FLAG_MONITOR_A ((dword) 0x00000004L) | |
644 | #define LI_FLAG_MONITOR_B ((dword) 0x00000008L) | |
645 | #define LI_FLAG_ANNOUNCEMENT_A ((dword) 0x00000010L) | |
646 | #define LI_FLAG_ANNOUNCEMENT_B ((dword) 0x00000020L) | |
647 | #define LI_FLAG_MIX_A ((dword) 0x00000040L) | |
648 | #define LI_FLAG_MIX_B ((dword) 0x00000080L) | |
649 | #define LI_CONFERENCING_SUPPORTED ((dword) 0x00000001L) | |
650 | #define LI_MONITORING_SUPPORTED ((dword) 0x00000002L) | |
651 | #define LI_ANNOUNCEMENTS_SUPPORTED ((dword) 0x00000004L) | |
652 | #define LI_MIXING_SUPPORTED ((dword) 0x00000008L) | |
653 | #define LI_CROSS_CONTROLLER_SUPPORTED ((dword) 0x00000010L) | |
654 | #define LI2_GET_SUPPORTED_SERVICES 0 | |
655 | #define LI2_REQ_CONNECT 1 | |
656 | #define LI2_REQ_DISCONNECT 2 | |
657 | #define LI2_IND_CONNECT_ACTIVE 1 | |
658 | #define LI2_IND_DISCONNECT 2 | |
659 | #define LI2_FLAG_INTERCONNECT_A_B ((dword) 0x00000001L) | |
660 | #define LI2_FLAG_INTERCONNECT_B_A ((dword) 0x00000002L) | |
661 | #define LI2_FLAG_MONITOR_B ((dword) 0x00000004L) | |
662 | #define LI2_FLAG_MIX_B ((dword) 0x00000008L) | |
663 | #define LI2_FLAG_MONITOR_X ((dword) 0x00000010L) | |
664 | #define LI2_FLAG_MIX_X ((dword) 0x00000020L) | |
665 | #define LI2_FLAG_LOOP_B ((dword) 0x00000040L) | |
666 | #define LI2_FLAG_LOOP_PC ((dword) 0x00000080L) | |
667 | #define LI2_FLAG_LOOP_X ((dword) 0x00000100L) | |
668 | #define LI2_CROSS_CONTROLLER_SUPPORTED ((dword) 0x00000001L) | |
669 | #define LI2_ASYMMETRIC_SUPPORTED ((dword) 0x00000002L) | |
670 | #define LI2_MONITORING_SUPPORTED ((dword) 0x00000004L) | |
671 | #define LI2_MIXING_SUPPORTED ((dword) 0x00000008L) | |
672 | #define LI2_REMOTE_MONITORING_SUPPORTED ((dword) 0x00000010L) | |
673 | #define LI2_REMOTE_MIXING_SUPPORTED ((dword) 0x00000020L) | |
674 | #define LI2_B_LOOPING_SUPPORTED ((dword) 0x00000040L) | |
675 | #define LI2_PC_LOOPING_SUPPORTED ((dword) 0x00000080L) | |
676 | #define LI2_X_LOOPING_SUPPORTED ((dword) 0x00000100L) | |
677 | /*------------------------------------------------------------------*/ | |
678 | /* echo canceller definitions */ | |
679 | /*------------------------------------------------------------------*/ | |
680 | #define EC_GET_SUPPORTED_SERVICES 0 | |
681 | #define EC_ENABLE_OPERATION 1 | |
682 | #define EC_DISABLE_OPERATION 2 | |
683 | #define EC_ENABLE_NON_LINEAR_PROCESSING 0x0001 | |
684 | #define EC_DO_NOT_REQUIRE_REVERSALS 0x0002 | |
685 | #define EC_DETECT_DISABLE_TONE 0x0004 | |
686 | #define EC_ENABLE_ADAPTIVE_PREDELAY 0x0008 | |
687 | #define EC_NON_LINEAR_PROCESSING_SUPPORTED 0x0001 | |
688 | #define EC_BYPASS_ON_ANY_2100HZ_SUPPORTED 0x0002 | |
689 | #define EC_BYPASS_ON_REV_2100HZ_SUPPORTED 0x0004 | |
690 | #define EC_ADAPTIVE_PREDELAY_SUPPORTED 0x0008 | |
691 | #define EC_BYPASS_INDICATION 1 | |
692 | #define EC_BYPASS_DUE_TO_CONTINUOUS_2100HZ 1 | |
693 | #define EC_BYPASS_DUE_TO_REVERSED_2100HZ 2 | |
694 | #define EC_BYPASS_RELEASED 3 | |
695 | /*------------------------------------------------------------------*/ | |
696 | /* function prototypes */ | |
697 | /*------------------------------------------------------------------*/ | |
698 | /*------------------------------------------------------------------*/ | |
475be4d8 | 699 | #endif /* _INC_CAPI20 */ |