capi20.h 28 KB

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