Typedef.h
Upload User: cheng071
Upload Date: 2015-09-26
Package Size: 12280k
Code Size: 113k
Category:

Audio program

Development Platform:

C/C++

  1. /*-----------------------------------------------------------
  2. *
  3. *       Copyright (C) 1999 AudioCodes Ltd.
  4. *       All rights reserved. Reproduction in whole
  5. *       or in part is prohibited without the written
  6. *       permission of the copyright owner.
  7. *
  8. *------------------------------------------------------------
  9. *------------------------------------------------------------
  10. *
  11. *   FILE:           TypeDef.h
  12. *   
  13. *   DESCRIPTION:    General Types/Const Definitions
  14. *
  15. *   NOTES:          None
  16. *
  17. *----------------------------------------------------------*/
  18. #ifndef TYPEDEF_H
  19. #define TYPEDEF_H 
  20. #include "UserDef.h"    /* VoiceEngines User Settings */
  21. #include "AC48xDrv.h" /* DSP IF User Settings */
  22. #include "AC48xDef.h" /* Include AC48x bit-field definitons */
  23. #include "VoiceMediator.h"
  24. #if FAX_TERMINATION_SUPPORTED
  25. #include "FaxTermDef.h" /* Includes from the Fax Termination stack*/
  26. #endif
  27. /**********************************************************************
  28.      Include to PstnTypeDef.h :   later in 4.2 will be taken out in a smart way...
  29. ************************************************************************/
  30. #include "PstnTypeDef.h" 
  31. #include "SS7TypeDef.h" 
  32. /**********************************************************************
  33.      Include to TpAppVarsTypeDef.h :   later in 4.2 will be approached again ...
  34.  TpAppVarsTypeDef.h  includes the struct TAppVars that Boardparams is using.
  35.  the purpose is that one could use #include to it without needing to get with 
  36.  it all the other 2000 lines that are in Typedef.h
  37.      In 4.2 a "work" will be done in order to define how to approach the "many types of different systems (i.e. - ATM/SS7/Megaco/Smp etc.)
  38.  so that a "methology"  :-) will be better
  39. ************************************************************************/
  40. #include "TpAppVarsTypeDef.h"
  41. /**********************************************************************
  42.   
  43.     Macro Definitions :
  44.   
  45. ************************************************************************/
  46. /* Convert from a Channel ID to the DSP Device Number assigned for this channel : */
  47. #define CID_TO_DEVICE(ch) (((ch>=0) && (ch<acNumberOfDSPChannels)) ? ChInfo[ch].DeviceIndex : 0)
  48. /* Convert from a Channel ID to the DSP channel number assigned for this channel : */
  49. #define CID_TO_CHANNEL(ch) (((ch>=0) && (ch<acNumberOfDSPChannels)) ? ch-DeviceInfo[ChInfo[ch].DeviceIndex].FirstCID : 0)
  50. /* Convert from a DSP Device Number to the first Channel ID associated with this device */
  51. #define DEVICE_TO_CID(dev) (((dev>=0) && (dev<MAX_DSP_DEVICES_CAPACITY)) ? DeviceInfo[dev].FirstCID : 0)
  52. /* Return the number of channels supported by this DSP Device */
  53. #define CHANNELS_IN_DEVICE(dev) (((dev>=0) && (dev<MAX_DSP_DEVICES_CAPACITY)) ? DeviceInfo[dev].NumberOfChannels : DeviceInfo[0].NumberOfChannels)
  54. /* Return the number of channels supported by the first n devices */
  55. #define CHANNELS_IN_DEVICES_0_TO_N(n) (DEVICE_TO_CID(n)+CHANNELS_IN_DEVICE(n))
  56. /**********************************************************************
  57.   
  58.     Constants Definitions :
  59.   
  60. ************************************************************************/
  61. #ifndef NULL
  62. #define NULL         0
  63. #endif
  64. #ifndef OK
  65. #define OK       0
  66. #endif /* OK */
  67. #if 0 /*ndef BOOL */
  68.     #define BOOL int
  69. #endif /* BOOL */
  70. #ifndef TRUE
  71. #define TRUE 1
  72. #endif                          /* TRUE */
  73. #ifndef FALSE
  74. #define FALSE 0
  75. #endif                          /* FALSE */
  76. /* Debug mode selection : */
  77. #if !ZERO_COPY_MODE
  78.  #define USE_DSP_DEBUG_MODE      0
  79. #else
  80.  #define USE_DSP_DEBUG_MODE      0
  81. #endif
  82. #define ENABLE_WATCHDOG 1
  83. #define DISABLE_WEB_SERVER 2
  84. #define DISABLE_SNMP 4
  85. #define DISABLE_WEB_CONFIG 8
  86. #define DISABLE_RS232 16
  87. #define DISABLE_TELNET 32
  88. #define DTMF_PERIOD             20
  89. #define MAX_DTMF_EDGE_LOCATION  19
  90. #define MOD_DTMF_SEQ_NUM        256
  91. #define MAX_DTMF_HANGOVER       3
  92. #define DTMF_GENERATOR_HANGOVER 1000       /*milisec*/
  93. #define LONG_DTMF_PERIOD        2000       /*milisec*/
  94. #define MODEM_DETECTION_PERIOD  12000    /*milisec*/
  95. #define MAX_CALL_PROGRESS_FREQUENCIES     15
  96. #define MAX_CALL_PROGRESS_SIGNALS         16
  97. #define MAX_RING_TYPES                    16
  98. #define MAX_COEF   36
  99. #define CALL_PROGRESS_CMD_LENGTH          234
  100. #define MAX_USER_DIALING_COMMANDS       5
  101. #define HOOK_DEBOUNCE_PERIOD 300 /* Hook debouncer constant (minimum) in msec (40)*/
  102. /* Size of the event buffer in the Tx Channel Info : */
  103. #define EVENT_BUF_SIZE           10
  104. #define DIGIT_BUF_SIZE                    20
  105. #define CAS_BUF_SIZE                      25
  106. #define USER_DIALING_BUF_SIZE   16
  107. #if RAS_IF_SUPPORTED
  108. #define DELAY_JITTER_BUF_MAX_SIZE         1200     /*milisec */
  109. #else
  110. #define DELAY_JITTER_BUF_MAX_SIZE         300     /*milisec */
  111. #endif
  112. #define T38_JITTER_BUFFER_SIZE   200   /* milisec */
  113. #define DELAY_JITTER_BUF_MAX_PACKETS      (DELAY_JITTER_BUF_MAX_SIZE/MIN_DSP_FRAME_TIME) /*pcm packets*/
  114. #define MAX_SUCCESSIVE_REORDERED_PACKETS_DURATION DELAY_JITTER_BUF_MAX_SIZE      
  115.  #define NUM_IP_PACKETS_TO_BUFFER_PER_CH   (DELAY_JITTER_BUF_MAX_SIZE/MIN_IP_PACKET_TIME)
  116. #define INITIAL_JITTER_BUF_DELAY          (DELAY_JITTER_BUF_MAX_SIZE/2)      /*milisec*/
  117. #define BFI_ERROR_WEIGHT_VEC_SIZE         20
  118. #define INTERVAL_FOR_RX_REORDER_CHECK_LOG_2  10    /*packets - check will be performed every 1024 incoming packets*/
  119. #define REORDER_PACKETS_THRESHOLD         128           /*packets*/
  120. #define EM_DEBOUNCE_PERIOD                25   /*milisec*/          
  121. #define CYPHER_MAX_KEY_LENGTH            24    /*Maximum key length in bytes*/
  122. #define CYPHER_MAX_EXPANDED_KEY_SIZE_SHORTS 64
  123. #define CYPHER_BLOCK_SIZE               8    /* basic block size is 64 bits*/
  124. #define RTP_SID_PACKET_PAYLOAD_SIZE   1  /* to be used when sending/processing RTP SID packets */
  125. #define FAX_CED_FREQ                      2100     /*Hz*/
  126. #define MAX_FAX_SEQ_NUM                   16
  127. #define FAX_MODULATION_ON_PAYLOAD_SIZE    6
  128. #define FAX_MODULATION_OFF_PAYLOAD_SIZE   3
  129. #define FAX_V21_DATA_PAYLOAD_SIZE         4
  130. #define FAX_T4_DURATION                   (pCh->VoicePacketLenMiliSec)
  131. #define FAX_T30_DURATION                  (pCh->VoicePacketLenMiliSec)
  132. #define MAX_FAX_TIME_STAMP                32768 
  133. #define FAX_HS_MOD_ON_CORRECTION_PERIOD   30
  134. #define FAX_CMD_PACKET_SIZE               12
  135. #define FAX_RELAY_ERROR_REPORT_BUFFER_SIZE 4
  136. #ifndef MAX_FAX_REDUNDANCY_DEPTH
  137. #define MAX_FAX_REDUNDANCY_DEPTH 4
  138. #endif
  139. #define T38_ENC_BUFFER_SIZE               (450-18-sizeof(struct TPCIPacketHeader))
  140.  /*-=- HDLC*/
  141. #define PCI_HDLC_HEADER_SIZE              2  /*bytes*/
  142. #define CALLER_ID_BUFFER_SIZE 100   /* Size of the Caller ID message buffer */
  143. #define MAX_CALLER_ID_MESSAGE_LENGTH 60   /* Size of the Caller ID message text */
  144. #define MODEM_CED_FREQ                   2100     /*Hz*/
  145. #define MAX_MODEM_SEQ_NUM                16
  146. #define MODEM_MODULATION_ON_PAYLOAD_SIZE 6
  147. #define MODEM_MODULATION_OFF_PAYLOAD_SIZE 3
  148. #define MODEM_V21_DATA_PAYLOAD_SIZE      4
  149. #define MODEM_DATA_FRAME_DURATION        40
  150. #define MAX_MODEM_TIME_STAMP             32768 
  151. #define MODEM_HS_MOD_ON_CORRECTION_PERIOD 30       /*milisec*/
  152. #define MODEM_DATA_MODULATION_TYPE       4  
  153. /* Yuri S. 11/12/01 - RFC1890 - dynamic RTP Pyload types */
  154. /*-------------------------------------------------------*/
  155. #define MAX_NUM_DYNAMIC_RTP_PT               32
  156. #define FIRST_DYNAMIC_RTP_PT                 96   
  157. #define LAST_DYNAMIC_RTP_PT                  127
  158. /* previous event time(ms) offset in IBS packet*/
  159. #define PREV_EV_TIME_OFFSET                   2
  160. /*number of the error message that we want to count */ 
  161. #define MAX_ERROR_MSG_TYPE_INDEX 30
  162. #define DEFAULT_ERROR_MSG_INTERVAL 1000  /* 1 SEC*/
  163. #define MAX_TIME_STAMP_VALUE 0xffffffff
  164. /***********************************************************************
  165.   
  166.     Error Codes Constants Definitions:
  167.   
  168. ************************************************************************/
  169. /*error codes - AC4804IF*/
  170. #define AC4804_BOOT_DL_ERROR            0x1001  /*fatal error*/
  171. #define AC4804_PROGRAM_DL_ERROR         0x1002  /*fatal error*/
  172. #define AC4804_RX_CHECKSUM_ERROR        0x1003
  173. #define AC4804_RX_SEQUENCE_ERROR        0x1004
  174. #define AC4804_TX_ERROR                 0x1005   /*fatal error*/
  175. #define AC4804_RX_PACKET_NOT_READY      0x1006
  176. #define AC4804_INVALID_PACKET_LEN_ERROR 0x1007   /*fatal error*/       
  177. #define AC4804_RX_INVALID_STATUS_ERROR  0x1008 
  178. #define AC4804_INVALID_PROFILE_CONFIGURATION 0x1009 /*fatal error*/
  179. #define AC4804_INVALID_PATTERN_DETECTOR_THRESHOLD 0x100a /*recoverable error*/
  180. /*-=- error codes - RAS */
  181. #define CANT_CHANGE_ACTIVE_L2TP_TUNNEL_PARAMETERS 0x1100 /*recoverable error*/
  182. #define NO_RESOURCE_FOR_NEW_TUNNEL_DATABASE   0x1101 /*recoverable error*/
  183. #define INVALID_L2TP_TUNNEL_ID_ERROR   0x1102 /*recoverable error*/
  184. #define INVALID_L2TP_SESSION_ID_ERROR   0x1103 /*recoverable error*/
  185. /*error codes - VoIPDecoder*/
  186. #define INVALID_CID_ERROR               0x2002  /*recoverable error*/
  187. #define CHANNEL_NOT_ACTIVE_ERROR        0x2003
  188. #define RTP_PAYLOAD_LENGTH_ERROR        0x200c  /*recoverable error*/
  189. #define LOST_RTP_PACKETS_ERROR          0x2100
  190. #define UNKNOWN_RTP_PAYLOAD_TYPE_ERROR  0x2101  /*recoverable error*/
  191. #define LOST_DTMF_PACKETS_ERROR         0x2102 
  192. #define INVALID_FAX_SEQUENCE_ERROR      0x2103  /*recoverable error*/
  193. #define UNRECOGNIZED_FAX_PACKET_ERROR   0x2104  /*recoverable error*/
  194. #define LOST_FAX_PACKETS_ERROR          0x2105 
  195. #define INVALID_G723_CODE_ERROR         0x2106   /*recoverable error*/
  196. #define LOST_MODEM_RELAY_PACKET_ERROR   0x2107  /*recoverable error*/
  197. #define UNRECOGNIZED_MODEM_RELAY_PACKET_ERROR   0x2108  /*recoverable error*/
  198. #define TOO_MANY_REORDERED_PACKETS_ERROR 0x2109  /*recoverable error*/
  199. #define DTMF_FORMAT_CONFIGURATION_ERROR 0x210a   /*recoverable error*/
  200. #define DTMF_DURATION_ROLLOVER_ERROR    0x210b   /*recoverable error*/
  201. #define RTP_SSRC_ERROR 0x210c   /*recoverable error*/
  202. #define INVALID_CELL_CODER_CODE_ERROR    0x210d   /*recoverable error*/
  203. #define INVALID_TFOV_CODER_ERROR  0x210e   /*recoverable error*/
  204. /* error codes - VoATM */
  205. #define INVALID_ATM_HEADER_ERROR        0x2201
  206. #define INVALID_CPS_LENGTH_ERROR        0x2202
  207. #define INVALID_UUI_ERROR               0x2203
  208. #define INVALID_MESSAGE_TYPE_ERROR      0x2204
  209. #define INVALID_PROFILE_CODER_ERROR     0x2205
  210. #define INVALID_CRC_10_PACKET_ERROR     0x2206
  211. #define INVALID_TYPE_1_SERVICE_ERROR    0x2207
  212. #define LOST_AAL2_PACKETS_ERROR         0x2208
  213. #define PRIMARY_PAYLOAD_LENGTH_ERROR    0x2209
  214. #define SID_PAYLOAD_LENGTH_ERROR        0x220a
  215. #define DSP_ERROR_PACKET_ERROR          0x220b
  216. #define VPI_VCI_OF_UNOPENNED_VCC_ERROR  0x220c
  217. #define ATM_PHY_FAILED                  0x220d
  218. #define ATM_SLAVE_MODE_FAX_MODEM_ERROR  0x220e
  219. #define NO_AAL2_SSSAR_BUFFERS 0x220f
  220. #define INVALID_3G_PDU_TYPE_ERROR       0x2210
  221. #define SET_TPNCP_TRANSPORT_LAYER 0x2211
  222. #define QUERY_SAAL_STATISTICS           0x2212
  223. /*error codes - VoIPEncoder*/
  224. #define SPURIOUS_IDLE_ACK_ERROR 0x3001  /*fatal error*/
  225. #define DOUBLE_DTMF_EDGE_ERROR 0x3002   /*recoverable error*/
  226. #define DIGIT_BUFFER_OVERRUN_ERROR 0x3003   /*recoverable error*/
  227. #define AC4804_INVALID_PACKET_ERROR 0x3004  /*fatal error*/
  228. #define AC4804_INVALID_RX_BD_INDEX 0x3005  /*fatal error*/  
  229. #define AC4804_INPUT_BUFFER_OVERRUN_ERROR 0x3007 
  230. #define AC4804_INPUT_BUFFER_UNDERRUN_ERROR 0x3008 
  231. #define AC4804_OUTPUT_BUFFER_OVERRUN_ERROR 0x3009 
  232. #define SPURIOUS_DIAL_ENDED_EVENT_ERROR 0x300a
  233. #define SPURIOUS_CALLER_ID_ENDED_EVENT_ERROR 0x300b
  234. #define BAD_CALLER_ID_MESSAGE_ERROR 0x300c
  235. /*error codes - JitterBuffers*/
  236. #define LEFT_OVER_IN_CAS_BUFFER_ERROR   0x4001
  237. #define JITTER_BUF_INTERNAL_ERROR       0x4002  /*recoverable error*/
  238. #define JITTER_BUF_UNDER_RUN_ERROR      0x4003
  239. #define END_OF_JITTER_BUF               0x4004
  240. #define DSP_HDLC_NOT_READY 0x4005
  241. #define INVALID_JBS_MODE_VALUE 0x4006   /*recoverable error*/
  242. #define JITTER_BUFFER_STATUS_MISMATCH 0x4007  /*fatal error: indicates a customized chip missmatch */
  243. /*error codes - EvntHndl*/
  244. #define STILL_DIALING_ERROR             0x5001   /*recoverable error*/
  245. #define TOO_MANY_DIGITS_ERROR           0x5002
  246. #define SPURIOUS_EVENT_ERROR            0x5003
  247. #define EVENT_BUFFER_OVERRUN_ERROR      0x5004   /*recoverable error*/     
  248. #define TOO_MANY_CAS_CHANGES_ERROR      0x5005
  249. #define INVALID_CALL_PROGRESS_TONE_ERROR 0x5006  /*recoverable error*/  
  250. #define DIALING_WHILE_IDLE_ERROR        0x5007  /*recoverable error*/  
  251. #define IDLE_WHILE_DIALING_ERROR        0x5008  /*recoverable error*/  
  252. #define DIGIT_ON_TIME_ERROR         0x5009  /*recoverable error*/ 
  253. #define USER_DIAL_BUFFER_OVERRUN_ERROR  0x500a   /*recoverable error*/     
  254. #define UNEXPECTED_SIGNAL_INDEX_ERROR 0x500B  /*recoverable error*/
  255. #define TELEPHONY_SIGNAL_WHILE_DTMF_OR_IBS    0x500C  /*recoverable error*/
  256. /*error codes - Init*/
  257. #define SETUP_PARAMETER_INVALID_ERROR   0x6001   /*fatal error*/
  258. #define MEMORY_ALLOCATION_ERROR         0x6002   /*fatal error*/  
  259. #define INVALID_FAX_MODEM_PARAMETERS_SETUP_SEQUENCE 0x6003   /*recoverable error*/
  260. /*error codes - RTCP*/
  261. #define INVALID_RTCP_SDES_PACKET_ERROR  0x7001
  262. #define INVALID_RTCP_PACKET_TYPE_ERROR  0x7002
  263. #define INVALID_RTCP_PACKET_ERROR       0x7003 
  264. #define INVALID_RTCP_EXT_LEN_ERROR      0x7004
  265. #define INVALID_SET_RTCP_EXT_LEN_ERROR  0x7005
  266. /*error codes - VP General */
  267. #define VP_GET_TIME_STEMP_FAILED        0x8001   /*recoverable error*/
  268. /*error codes - Bit*/
  269. #define DSP_BIT_FAILED                  0x10001  /*recoverable error*/
  270. #define BOARD_TEMP_BIT_FAILED 0x10002  /*recoverable error*/
  271.  
  272. /*error codes - Main*/
  273. #define TIMER_INITIATION_ERROR          0x20001  /*fatal error*/
  274. #define SOCKET_CREATION_ERROR           0x20002  /*fatal error*/
  275. #define ARP_ERROR                       0x20003  /*recoverable error*/
  276. #define DESTINATION_IP_ADDRESS_UNREACHABLE_ERROR 0x20004 /*recoverable error*/
  277. #define NI_TX_OVERFLOW_ERROR            0x20005
  278. #define PCI_PACKET_TOO_BIG_ERROR        0x20006  /*recoverable error*/
  279. #define RTP_PACKET_TOO_LARGE_ERROR      0x20007  /*recoverable error*/
  280. #define RTCP_PACKET_TOO_LARGE_ERROR     0x20008  /*recoverable error*/
  281. #define I_CACHE_LOCK_FAILED_ERROR       0x20009  /*recoverable error*/
  282. #define D_CACHE_LOCK_FAILED_ERROR       0x2000a  /*recoverable error*/
  283. #define TEST_IP_CONNECTION_FAILED       0x2000b  /*recoverable error*/ 
  284. #define ILLEGAL_TDM_BUS_TYPE_ERROR      0x2000c  /*recoverable error*/
  285. #define PSOS_EVENT_MESSAGING_ERROR      0x2000d  /*recoverable error*/
  286. #define TIMER_CONFIGURATION_ERROR       0x2000e  /*recoverable error*/
  287. #define TP200_HW_CONFIGURATION_ERROR    0x2000f  /*fatal error*/
  288. #define SC_BUS_ERROR                    0x20010  /*fatal error*/
  289. #define MVIP_BUS_ERROR                  0x20011  /*fatal error*/
  290. #define INVALID_TDM_BUS_SPEED_ERROR     0x20012  /*fatal error*/
  291. #define RX_OVERFLOW_ERROR               0x20013  /*info message*/
  292. #define RESTARTING_DSP_DUE_TO_CRASH     0x20014  /*recoverable error*/
  293. #define MGCP_CALL_AGENT_UNREACHABLE_ERROR 0x20015 /*recoverable error*/
  294. #define INVALID_MGCP_CALL_AGENT_ERROR   0x20016  /*fatal error*/
  295. #define MGCP_PACKET_TOO_LARGE_ERROR     0x20017  /*recoverable error*/ 
  296. #define LATE_IDLE_ACK_ERROR             0x20018  /*fatal error*/
  297. #define WATCHDOG_ERROR                  0x20019  /*fatal error*/
  298. #define INVALID_NAT_CONFIGURATION_ERROR 0x2002a  /*recoverable error*/
  299. #define TPNCP_PACKET_TOO_LARGE_ERROR    0x20020  /*recoverable error*/ 
  300. #define TPNCP_IP_UNREACHABLE_ERROR      0x20021  /*recoverable error*/ 
  301. #define CHANNEL_CLOSED_INTERNALLY_ERROR 0x2002b  /*recoverable error*/
  302. #define TP400_HW_CONFIGURATION_ERROR    0x2002c  /*fatal error*/
  303. #define PSOS_TASK_ERROR                 0x2002d  /*fatal error*/
  304. #define INVALID_PCM_TIMESLOT_ERROR 0x2002e  /*fatal error*/
  305. #define AGG_IP_UNREACHABLE_ERROR        0x2002f  /*recoverable error*/ 
  306. /* Guys - 0x20030 - it's free... */ 
  307. #define L2TP_PACKET_TOO_LARGE_ERROR     0x20031  /*recoverable error*/
  308. #define L2TP_PACKET_UNKNOWN_TYPE_ERROR  0x20032  /*recoverable error*/
  309. #define TPNCP_ATM_USER_TYPE_ERROR       0x20033  /*fatal error */  
  310. #define HB_IP_UNREACHABLE_ERROR         0x20034  /*recoverable error*/ 
  311. #define TPNCP_VERSION_ERROR 0x20035  /*recoverabel error*/
  312. /*error codes - PCIIF*/
  313. #define PACKET_BD_RING_OVERRUN_ERROR    0x21001  /*recoverable error*/
  314. #define PACKET_BUFFER_OVERRUN_ERROR     0x21002  /*recoverable error*/
  315. #define STATUS_BD_RING_OVERRUN_ERROR    0x21003  /*recoverable error*/
  316. #define STATUS_BUFFER_OVERRUN_ERROR     0x21004  /*recoverable error*/
  317. #define VOICE_PROMPT_TOO_BIG_ERROR      0x21005  /*recoverable error*/
  318. #define OPEN_CHANNEL_CMD_FAILURE        0x21006  /*recoverable error*/
  319. #define CLOSE_CHANNEL_CMD_FAILURE       0x21007  /*recoverable error*/
  320. #define ACTIVATE_RTP_CMD_FAILURE        0x21008  /*recoverable error*/
  321. #define DIAL_CMD_FAILURE                0x21009  /*recoverable error*/
  322. #define ADD_VOICE_PROMPT_CMD_FAILURE    0x2100a  /*recoverable error*/
  323. #define PLAY_VOICE_PROMPT_CMD_FAILURE   0x2100b  /*recoverable error*/
  324. #define CHANGE_CHANNEL_CMD_FAILURE      0x2100c  /*recoverable error*/
  325. #define UNKOWNEN_PCI_CMD_ERROR          0x2100d  /*recoverable error*/
  326. #define RTCP_SET_EXT_FAILURE            0x2100e  /*recoverable error*/ 
  327. #define ARP_WAITING_LIST_FULL_ERROR     0x2100f  /*recoverable error*/ 
  328. #define ISDN_PLACE_CALL_CMD_ERROR       0x21010  /*recoverable error*/  
  329. #define ISDN_ANSWER_CALL_CMD_ERROR      0x21011  /*recoverable error*/ 
  330. #define ISDN_RELEASE_CALL_CMD_ERROR     0x21012  /*recoverable error*/ 
  331. #define ISDN_INIT_CMD_ERROR             0x21013  /*recoverable error*/ 
  332. #define ISDN_SEND_ALERT_CMD_ERROR       0x21014  /*recoverable error*/ 
  333. #define ISDN_SEND_CALL_PROCEEDING_CMD_ERROR 0x21015  /*recoverable error*/ 
  334. #define ISDN_SEND_LINE_INFO_CMD_ERROR   0x21016  /*recoverable error*/ 
  335. #define PSTN_SEND_ALARM_CMD_ERROR       0x21017  /*recoverable error*/ 
  336. #define SEND_CAS_CMD_FAILURE            0x21018  /*recoverable error*/  
  337. #define PSTN_ACTIVATE_LOOP_CMD_ERROR    0x21019  /*recoverable error*/  
  338. #define SUM_ADDITIONAL_TS_CMD_FAILED    0x2101a  /*recoverable error*/
  339. #define STOP_SUM_ADDITIONAL_TS_CMD_FAILED 0x2101b  /*recoverable error*/
  340. #define CHANNEL_ADDITIONAL_TS_OCCUPIED  0x2101c  /*recoverable error*/
  341. #define ISDN_DISCONNECT_CALL_CMD_ERROR  0x21020  /*recoverable error*/ 
  342. #define ISDN_RESTART_RQUEST_CMD_ERROR   0x21021  /*recoverable error*/ 
  343. #define TRUNK_CONFIGURATION_ERROR       0x21022  /*recoverable error*/  
  344. #define FATAL_ERROR_SIMULATION          0x21023  /*Fatal Error*/
  345. #define CONFIGURATION_TABLE_DOWNLOAD_ERROR  0x21024  /*fatal error*/
  346. #define CONFIGURATION_TABLE_MALLOC_ERROR    0x21025  /*fatal error*/
  347. #define PLAY_CALL_PROGRESS_TONE_CMD_FAILURE 0x21026  /*recoverable error*/
  348. #define INVALID_PCI_CMD_SEQUENCE_ERROR  0x21027  /*recoverable error*/
  349. #define TEST_IP_CONECTION_CMD_FAILURE   0x21028  /*recoverable error*/
  350. #define GET_BOARD_STATUS_CMD_FAILURE   0x21029  /*recoverable error*/
  351. #define SET_TPNCP_SERVER_CMD_FAILURE   0x2102a  /*recoverable error*/
  352. #define RESET_BOARD_CMD_FAILURE   0x2102b  /*recoverable error*/
  353. #define STOP_DIAL_CMD_FAILURE           0x2102c  /*recoverable error*/
  354. #define STOP_CALL_PROGRESS_TONE_CMD_FAILURE 0x2102d /*recoverable error*/
  355. #define STOP_SENDING_CAS_CMD_FAILURE    0x2102e  /*recoverable error*/
  356. #define STOP_VOICE_PROMPT_CMD_FAILURE   0x2102f  /*recoverable error*/
  357. #define TPNCP_MALLOC_ERROR              0x21030  /*fatal error*/
  358. /* the rest of the errors begin with 0x41000*/
  359. /*error codes - TDMSwitching*/
  360. #define MAKE_LOCAL_TO_H110_CONNECTION_ERROR   0x21031  /*recoverable error*/
  361. #define MAKE_H110_TO_LOCAL_CONNECTION_ERROR   0x21032  /*recoverable error*/
  362. #define MAKE_LOCAL_TO_LOCAL_CONNECTION_ERROR  0x21033  /*recoverable error*/
  363. #define BREAK_H110_TO_LOCAL_CONNECTION_ERROR  0x21034  /*recoverable error*/
  364. #define BREAK_LOCAL_TO_LOCAL_CONNECTION_ERROR 0x21035  /*recoverable error*/
  365. #define BREAK_LOCAL_TO_H110_CONNECTION_ERROR  0x21036  /*recoverable error*/
  366. #define BREAK_INPUT_BUS_ERROR           0x21037  /*recoverable error*/
  367. #define BREAK_OUTPUT_ERROR              0x21038  /*recoverable error*/
  368. #define MAKE_TDM_CON_CMD_FAILURE        0x21039  /*recoverable error*/
  369. #define BREAK_TDM_CON_CMD_FAILURE       0x21040  /*recoverable error*/
  370. #define TDM_QUERY_CON_CMD_FAILURE       0x21041  /*recoverable error*/
  371. #define TDM_QUERY_CONNECTION_ERROR      0x21042  /*recoverable error*/
  372. #define END_OF_TAG_LIST_ERROR           0x21043  /*recoverable error*/
  373. #define MAKE_CONNECTION_ERROR           0x21044  /*recoverable error*/
  374. #define BREAK_H110_TO_H110_CONNECTION_ERROR   0x21045  /*recoverable error*/
  375. #define TDM_SWITCHING_CID_CONVERT_ERROR   0x21046  /*recoverable error*/
  376. #define TDM_INJECT_PATTERN_CMD_FAILURE  0x21047  /*recoverable error*/
  377. #define TDM_SAMPLE_INPUT_CMD_FAILURE    0x21048  /*recoverable error*/ 
  378. #define SET_HOOK_CMD_FAILURE            0x21050  /*recoverable error*/
  379. #define PCI_SET_BOOTP_AND_RESET_BOARD_CMD_FAILURE 0x21051  /*recoverable error*/
  380. #define GENERATE_CALLER_ID_CMD_FAILURE  0x21052  /*recoverable error*/
  381. #define CLOSE_TPNCP_SERVER_CMD_FAILURE  0x21053  /*recoverable error*/
  382. #define PCI_LOAD_NEW_BOOT_CMD_FAILURE   0x21054   /*recoverable error*/
  383. #define STOP_CALLER_ID_CMD_FAILURE 0x21055  /*recoverable error*/
  384. /*error codes - PSTNPCIIF*/
  385. #define CAS_PLACE_CALL_CMD_ERROR 0x22000  /*recoverable error*/
  386. #define CAS_ANSWER_CALL_CMD_ERROR 0x22001  /*recoverable error*/
  387. #define CAS_RELEASE_CALL_CMD_ERROR 0x22002  /*recoverable error*/
  388. #define CAS_DISCONNECT_CALL_CMD_ERROR 0x22003  /*recoverable error*/
  389. #define CAS_INIT_CMD_ERROR 0x22004  /*recoverable error*/
  390. #define CAS_RESTART_RQUEST_CMD_ERROR 0x22005  /*recoverable error*/
  391. #define CAS_BLOCK_CHANNEL_RQUEST_CMD_ERROR 0x22006  /*recoverable error*/
  392. #define CAS_COUNTER_ERROR 0x22007  /*recoverable error*/
  393. #define CREATE_AUDIT_PACKETS_QUEUE_ERROR 0x22008  /*recoverable error*/
  394. #define CREATE_AUDIT_PACKETS_TASK_ERROR 0x22009  /*recoverable error*/
  395. #define START_AUDIT_PACKETS_TASK_ERROR 0x22010  /*recoverable error*/
  396. #define RECEIVE_AUDIT_PACKETS_ERROR 0x22011  /*recoverable error*/
  397. #define PSTN_QUERY_CALL_STATE_CMD_ERROR 0x22012  /*recoverable error*/
  398. #define PSTN_DBG_INFO 0x22013  /* info message */
  399. #define PSTN_SET_TRACE_LEVEL_ERROR 0x22014  /*recoverable error*/
  400. #define PSTN_MODIFY_E1T1_SPAN_ERROR 0x22015  /*recoverable error*/
  401. #define PSTN_CHANGE_CLOCK_SOURCE_ERROR 0x22016  /*recoverable error*/
  402. #define PSTN_QUERY_D_CH_STATE_CMD_ERROR 0x22017  /*recoverable error*/
  403. /*error codes PSTN library CAS and initialization */
  404. #define PSTN_DIFFERENT_PROTOCOLS_ERROR 0x23001  /* g recoverable error*/
  405. #define PSTN_DELETE_TASKS_ERROR 0x23002  /* g recoverable error*/
  406. #define PSTN_CREATE_TASKS_ERROR 0x23003  /* g recoverable error*/
  407. #define CAS_DIAL_METHOD_NOT_SUPPORTED_ERROR 0x23004  /* g recoverable error*/
  408. #define ISDN_STARTED_FAIL 0x23005  /* g recoverable error*/
  409. #define CAS_SIGNALING_TASK_ERROR 0x23006  /* g recoverable error*/
  410. #define PH_BG_Task_ERROR 0x23007  /* g recoverable error*/
  411. #define WRONG_D_CHANNEL_CONFIGURATION 0x23008  /* g recoverable error*/
  412. #define ILLEGAL_D_CHANNEL_CONFIG_FOR_PROTOCOL 0x23009  /* g recoverable error*/
  413. #define SEND_CAS_AUDIT_PACKET_ERROR 0x23010  /*recoverable error*/
  414. #define INCOMPATIBLE_CAS_TABLE_ERROR            0x23011  /*recoverable error*/ 
  415. #define LOOP_DETECTION_TASK_ERROR 0x23012  /* g recoverable error*/
  416. #define PSTN_WRONG_COMMAND_ERROR             0x23013  /*recoverable error*/ 
  417. #define PSTN_TRUNK_CONFIGURATION_ERROR          0x23013  /*recoverable error*/ 
  418. /*error codes PSTN library ISDN call control */
  419. #define ISDN_PLACE_IMP_CONNID_ERROR 0x23101  /*  recoverable error*/
  420. #define ISDN_PLACE_IMP_TRUNK_ERROR 0x23102  /*  recoverable error*/
  421. #define ISDN_PLACE_IMP_BCHANNEL_ERROR 0x23103  /*  recoverable error*/
  422. #define ISDN_PLACE_IMP_STATE_ERROR 0x23104  /*  recoverable error*/
  423. #define ISDN_ANSWER_IMP_STATE_ERROR 0x23105  /*  recoverable error*/
  424. #define ISDN_RELEASE_IMP_STATE_ERROR 0x23106  /*  recoverable error*/
  425. #define ISDN_ALERT_IMP_STATE_ERROR 0x23107  /*  recoverable error*/
  426. #define ISDN_PROCEEDING_IMP_STATE_ERROR 0x23108  /*  recoverable error*/
  427. #define ISDN_DISCONNECT_IMP_STATE_ERROR 0x23109  /*  recoverable error*/
  428. #define ISDN_RCV_DISCONNECT_IMP_STATE_ERROR 0x23110  /*  recoverable error*/
  429. #define ISDN_RCV_RELEASED_IMP_STATE_ERROR 0x23111  /*  recoverable error*/
  430. #define ISDN_RCV_CONNECTACK_IMP_STATE_ERROR 0x23112  /*  recoverable error*/
  431. #define ISDN_RCV_SETUP_IMP_STATE_ERROR 0x23113  /*  recoverable error*/
  432. #define ISDN_RCV_ALERT_IMP_STATE_ERROR 0x23114  /*  recoverable error*/
  433. #define ISDN_RCV_PROCEEDING_IMP_STATE_ERROR 0x23115  /*  recoverable error*/
  434. #define ISDN_RCV_PROGRESS_IMP_STATE_ERROR 0x23116  /*  recoverable error*/
  435. #define ISDN_RCV_PROCEEDING_PROGRESS_TYPE_ERROR 0x23117  /*  recoverable error*/
  436. #define ISDN_OVLP_DIGIT_IN_IMP_STATE_ERROR 0x23118  /*  recoverable error*/
  437. #define ISDN_PROGRESS_IMP_STATE_ERROR 0x23119  /*  recoverable error*/
  438. #define ISDN_OVERLAP_IMP_STATE_ERROR 0x23120  /*  recoverable error*/
  439. #define SEND_ISDN_AUDIT_PACKET_ERROR 0x23121  /*recoverable error*/
  440. #define ISDN_WRONG_NFAS_CONFIGURATION_ERROR 0x23122  /*recoverable error*/
  441. #define ISDN_VARNIANT_NOT_IN_RAMHEX_ERROR  0x23123  /*recoverable error*/
  442. #define ISDN_TERMINATION_SIDE_BOARDPARAMS_ERROR 0x23124  /*recoverable error*/
  443. #define ISDN_RAW_DATA_Q931_IN_ERROR 0x23125  /*  recoverable error*/
  444. #define ISDN_FACILITY_IN_ERROR 0x23126  /*  recoverable error*/
  445. #define ISDN_ERROR_IND 0x23127  /*  recoverable error*/
  446. /*error codes PSTN library CAS call control */
  447. #define CAS_ADD_EVENT_OVERRUN_ERROR 0x23150  /* g recoverable error*/
  448. #define CAS_TIMER_LINKED_LIST_ERROR 0x23151  /* g recoverable error*/
  449. #define CAS_SIGNALING_EXPECTED_NUM_OF_DIGIT_ERROR 0x23152  /* g recoverable error*/
  450. #define CAS_SIGNALING_DIGIT_ERROR 0x23153  /* g recoverable error*/
  451. #define CAS_DIGIT_TOO_LONG_ERROR 0x23154 /* g recoverable error*/
  452. #define CAS_DIGIT_TOO_SHORT_ERROR 0x23155  /* g recoverable error*/
  453. #define CAS_DIAL_DTMF_ADDRESS_ERROR 0x23156  /* g recoverable error*/
  454. #define CAS_DIAL_MF_ADDRESS_ERROR 0x23157  /* g recoverable error*/
  455. #define CAS_RECEIVE_MF_FWD_ERROR 0x23158  /* g recoverable error*/
  456. #define CAS_RECEIVE_MF_BWD_ERROR 0x23159  /* g recoverable error*/
  457. #define CAS_SEND_MF_FWD_ADDRESS_ERROR 0x23160  /* g recoverable error*/
  458. #define CAS_SEND_SPECIFIC_MF_ADDRESS_ERROR 0x23161  /* g recoverable error*/
  459. #define CAS_SEND_MF_ADDRESS_GO_BACK_INDEX_ERROR 0x23162  /* g recoverable error*/
  460. #define CAS_SEND_MF_FWD_ANI_ERROR 0x23163  /* g recoverable error*/
  461. #define CAS_DIAL_MF_ERROR 0x23164  /* g recoverable error*/
  462. #define CAS_SEND_MF_SOURCE_CATEGORY_ERROR 0x23165  /* g recoverable error*/
  463. #define CAS_START_PLAY_PROGRESS_TONE_ERROR 0x23166  /* g recoverable error*/
  464. #define CAS_STOP_PLAY_PROGRESS_TONE_ERROR 0x23167  /* g recoverable error*/
  465. #define CAS_WRONG_PROCESS_PROGRESS_TONE 0x23168  /* g recoverable error*/
  466. #define CAS_SEND_CHANGE_CAS_DURING_DEST_ADDRESS 0x23169  /* g recoverable error*/
  467. #define CAS_DISCONNECT_CALL_ERROR 0x23170  /* g recoverable error*/
  468. #define CAS_ACCEPT_CALL_ERROR 0x23171  /* g recoverable error*/
  469. #define CAS_RELEASE_CALL_ERROR 0x23172  /* g recoverable error*/
  470. #define CAS_ANSWER_CALL_ERROR 0x23173  /* g recoverable error*/
  471. #define CAS_SEND_MF_TRANSFER_CAPABILITY_ERROR 0x23174  /* g recoverable error*/
  472. #define CAS_CHANGE_COLLECT_TPYE_ERROR 0x23175  /* g recoverable error*/
  473. #define CAS_USING_CID_ERROR 0x23176  /* g recoverable error*/
  474. #define CAS_INVALID_CHANNEL 0x23177
  475. #define CAS_RESTART_CHANNEL_ERROR 0x23178
  476. #define CAS_SEND_SS5_SIGNAL_ERROR 0x23179
  477. /*error codes PSTN library LoopBack control */
  478. #define PSTN_LOOPBACK_RELAYED_ERROR 0x23201  /*  recoverable error*/
  479. #define PSTN_TRAP_FATAL_ERROR 0x23141  /* g recoverable error*/
  480. #define PSTN_ACCEPT_CALL_ERROR 0x23142  /* g recoverable error*/
  481. /*error codes PSTN library V5 call control */
  482. #define V5_PLACE_CALL_ERROR 0x23251  /* recoverable error */
  483. #define V5_ESTABLISH_ACK_ERROR 0x23252  /* recoverable error */
  484. #define V5_ALLOC_CO_ERROR 0x23253  /* recoverable error */
  485. #define V5_DE_ALLOC_CO_ERROR 0x23254  /* recoverable error */
  486. #define V5_SEND_SIGNAL_ERROR 0x23255  /* recoverable error */
  487. #define V5_SEND_RESOURCE_UNAVAILABLE_SIGNAL_ERROR 0x23256  /* recoverable error */
  488. #define V5_AN_FAULT_ERROR 0x23257  /* recoverable error */
  489. #define V5_GET_ALARM_STATUS_ERROR 0x23258  /* recoverable error */
  490. #define V5_GET_PORT_STATUS_ERROR 0x23259  /* recoverable error */
  491. #define V5_PORT_CONTROL_REQUEST_ERROR 0x23260  /* recoverable error */
  492. /*error codes - MGCPHal*/
  493. #define INVALID_MGCP_COMMAND_ERROR      0x24000  /*recoverable error*/
  494. #define MGCP_SOCKET_ERROR               0x24001  
  495. /*error codes - MEGACOHal*/
  496. #define MEGACO_SOCKET_ERROR             0x24100
  497. #define INVALID_MEGACO_COMMAND_ERROR    0x24101
  498. /*error codes for fax relay*/
  499. #define EIGHT_SEC_TIMEOUT_BEFORE_DCN_ERROR   0x25001
  500. #define ILLEGAL_COMMAND_ERROR                0x25002
  501. #define RECEIVER_OUTPUT_OVERFLOW_ERROR       0x25004
  502. #define TRANSMITTER_DATA_ENDED_ERROR         0x25008
  503. #define TRANSMITTER_INPUT_OVERFLOW_ERROR     0x25010
  504. #define JITTER_TOO_BIG_ERROR                 0x25020
  505. #define ILLEGAL_ERROR_CODE_ERROR             0x25040
  506. /* error codes for TFTP and configuration file loading */
  507. #define CONFIG_FILE_HANDLER_ERROR_FLOOR      0x26000
  508. #define TFTP_FAIL_TO_INITIALIZE_ERROR        0x26000 /*fatal error*/
  509. #define TFTP_FAIL_TO_OPEN_ERROR              0x26001 /*fatal error*/
  510. #define TFTP_FAIL_TO_READ_ERROR  0x26002 /*fatal error*/
  511. #define TFTP_FAIL_TO_CLOSE_ERROR             0x26003 /*fatal error*/
  512. #define TFTP_FAIL_TO_LOAD_CPT_FILE_ERROR  0x26004 /*fatal error*/
  513. #define TFTP_FAIL_TO_LOAD_CAS_FILE_ERROR  0x26005 /*fatal error*/
  514. #define TFTP_FAIL_TO_LOAD_VP_FILE_ERROR  0x26006 /*fatal error*/
  515. #define TFTP_FAIL_TO_LOAD_FXO_COEF_FILE_ERROR 0x26007 /*fatal error*/
  516. #define TFTP_FAIL_TO_LOAD_FXS_COEF_FILE_ERROR 0x26008 /*fatal error*/
  517. #define TFTP_FAIL_TO_LOAD_BOOT_FILE_ERROR    0x26009 /*Recoverable error*/
  518. #define TFTP_INVALID_PARAMETER_ERROR         0x26100 /*Recoverable error*/
  519. #define TFTP_INVALID_VALUE_ERROR  0x26200 /*Recoverable error*/
  520. /* error codes for FLASH Errors */
  521. #define FLASH_FAIL_TO_ERASE_ERROR 0x27000 /*fatal error*/
  522. #define FLASH_FAIL_TO_READ_ERROR  0x27001 /*fatal error*/
  523. #define FLASH_FAIL_TO_WRITE_ERROR 0x27002 /*fatal error*/
  524. #define FLASH_FAIL_TO_READ_CPT_FILE_ERROR 0x27003 /*fatal error*/
  525. #define FLASH_FAIL_TO_READ_VP_FILE_ERROR 0x27004 /*fatal error*/
  526. #define FLASH_FAIL_TO_READ_CAS_FILE_ERROR 0x27005 /*fatal error*/
  527. #define FLASH_TRYING_TO_WRITE_1MB_FLASH_ERROR 0x27006 /*fatal error*/
  528. #define FLASH_VERSION_MISMATCH_ERROR 0x27007 /*recoverable error*/
  529. #define FLASH_CMP_FILE_ERROR 0x27008 /*recoverable error*/
  530. /* error codes for EEPROM Errors */
  531. #define EEPROM_NO_BOOT_PARAMETERS_ERROR 0x28000 /*fatal error*/
  532. #define EEPROM_NO_SYSVARS_PARAMETERS_ERROR 0x28001 /*recoverable error*/
  533. #define EEPROM_NO_BSPVARS_PARAMETERS_ERROR 0x28002 /*recoverable error*/
  534. #define EEPROM_NO_APPVARS_PARAMETERS_ERROR 0x28003 /*recoverable error*/
  535. #define CONFIG_FILE_HANDLER_ERROR_ROOF 0x28FFF
  536. /* error codes for T8100 Errors */
  537. #define WRITE_TO_T8100_REGISTER_CMD_ERROR    0x29000 /*  recoverable error*/
  538. #define READ_FROM_T8100_REGISTER_CMD_ERROR   0x29001 /*  recoverable error*/
  539. /* ATM error codes */
  540. #define ATM_OPEN_VCC_CMD_FAILURE  0x33000 /*recoverable error*/
  541. #define ATM_MODIFY_VCC_CMD_FAILURE      0x33001 /*recoverable error*/
  542. #define ATM_CLOSE_VCC_CMD_FAILURE  0x33002 /*recoverable error*/
  543. #define ATM_TX_OVERRUN  0x33003    /* An over-run condtion occured in transmit */
  544. #define ATM_TX_OUT_OF_BUFFERS  0x33004
  545. #define ATM_INIT_FAILED      0x33005
  546. #define ACTIVATE_ATM_CMD_FAILURE             0x33006 /*recoverable error*/
  547. #define ATM_SEND_OAM_LP_FAILED               0x33007   /*recoverable error*/
  548. #define ATM_PHY_POLLING_FAILED  0x33008 /*recoverable error*/
  549. #define ATM_TX_AAL5_OVERRUN  0x33009 /*recoverable error*/
  550. #define ATM_CLOSE_VCC_FAILED                0x3300A /*recoverable error*/
  551. #define ATM_QUERY_VCC_STAT_FAILED           0x3300B /*recoverable error*/
  552. /* FileToIP/MCC error codes */
  553. #define FILE_PLAY_TO_IP_CMD_FAILURE  0x34000 /*recoverable error*/
  554. #define FILE_RECORD_FROM_IP_CMD_FAILURE  0x34001 /*recoverable error*/
  555. #define FILE_STOP_PLAY_TO_IP_CMD_FAILURE  0x34002 /*recoverable error*/
  556. #define FILE_STOP_RECORD_FROM_IP_CMD_FAILURE 0x34003 /*recoverable error*/
  557. #define FILE_PLAY_TO_IP_UNDERUN_ERROR  0x34004 /*recoverable error*/
  558. /* Conference error codes */
  559. #define OPEN_CONFERENCE_CMD_FAILURE 0x35000 /*recoverable error*/
  560. #define CLOSE_CONFERENCE_CMD_FAILURE 0x35001 /*recoverable error*/
  561. #define CHANGE_CONFERENCE_PARAMS_CMD_FAILURE 0x35002 /*recoverable error*/
  562. #define ADD_CONFERENCE_PARTICIPANT_CMD_FAILURE 0x35003 /*recoverable error*/
  563. #define DELETE_CONFERENCE_PARTICIPANT_CMD_FAILURE 0x35004 /*recoverable error*/
  564. #define DELETE_ALL_CONFERENCE_PARTICIPANTS_CMD_FAILURE 0x35005 /*recoverable error*/
  565. #define MUTE_CONFERENCE_PARTICIPANT_CMD_FAILURE 0x35006 /*recoverable error*/
  566. #define CHANGE_CONFERENCE_PARTICIPANT_PARAMS_CMD_FAILURE 0x35007 /*recoverable error*/
  567. #define MAX_MASTER_USERS_OVERFLOW_ERROR 0x35008 /*recoverable error*/
  568. #define COACH_CONFERENCE_PARTICIPANT_CMD_FAILURE 0x35009 /*recoverable error*/
  569. #define QUERY_CONFERENCE_INFO_CMD_FAILURE 0x3500A /*recoverable error*/
  570. #define QUERY_CONFERENCE_PARTICIPANT_INFO_CMD_FAILURE 0x3500B /*recoverable error*/
  571. #define QUERY_CONFERENCE_GENERAL_REPORT_CMD_FAILURE 0x3500C /*recoverable error*/
  572. /*error codes for fax relay*/
  573. #define EIGHT_SEC_TIMEOUT_BEFORE_DCN   0x0001
  574. #define ILLEGAL_COMMAND            0x0002
  575. #define RECEIVER_OUTPUT_OVERFLOW   0x0004
  576. #define TRANSMITTER_DATA_ENDED     0x0008
  577. #define TRANSMITTER_INPUT_OVERFLOW 0x0010
  578. #define JITTER_TOO_BIG             0x0020
  579. #define ILLEGAL_ERROR_MASK         0xFFC0
  580. #if FAX_TERMINATION_SUPPORTED
  581. /* IP_MEDIA Fax Termination */
  582. /* Error Base code for Fax Termination */
  583. #define T30_FAX_TERM_ERR_BASE   0x35100
  584. /* T30_FAX_TERM_ERR_ definitions */
  585. /***********************************************************
  586. General Errors - from P30_DEF.h
  587. ***********************************************************/
  588. #define T30_FAX_TERM_ERR_RESOURCE                    T30_FAX_TERM_ERR_BASE + 0  /*  recoverable error*/
  589. #define T30_FAX_TERM_CONNECT_FAILED                  T30_FAX_TERM_ERR_BASE + 1  /*  recoverable error*/
  590. #define T30_FAX_TERM_ALREADY_ACTIVE                  T30_FAX_TERM_ERR_BASE + 2  /*  recoverable error*/
  591. #define T30_FAX_TERM_NOT_ACTIVE                      T30_FAX_TERM_ERR_BASE + 3  /*  recoverable error*/
  592. #define T30_FAX_TERM_NEGOTIATION_FAILED              T30_FAX_TERM_ERR_BASE + 4  /*  recoverable error*/
  593. #define T30_FAX_TERM_NO_MORE_LICENSES                T30_FAX_TERM_ERR_BASE + 5  /*  recoverable error*/
  594. #define T30_FAX_TERM_NO_LICENSE                      T30_FAX_TERM_ERR_BASE + 6  /*  recoverable error*/
  595. #define T30_FAX_TERM_LICENSE_ALREADY_ALLOC           T30_FAX_TERM_ERR_BASE + 7  /*  recoverable error*/
  596. #define T30_FAX_TERM_ERR_QUEUE_EMPTY                 T30_FAX_TERM_ERR_BASE + 8  /*  recoverable error*/
  597. #define T30_FAX_TERM_ERR_FILE_EXISTS                 T30_FAX_TERM_ERR_BASE + 9  /*  recoverable error*/
  598. #define T30_FAX_TERM_ERR_FILE_NOT_FOUND              T30_FAX_TERM_ERR_BASE + 10  /*  recoverable error*/
  599. #define T30_FAX_TERM_ERR_BAD_FILE_FORMAT             T30_FAX_TERM_ERR_BASE + 11  /*  recoverable error*/
  600. #define T30_FAX_TERM_ERR_INVALID_DOC                 T30_FAX_TERM_ERR_BASE + 12  /*  recoverable error*/
  601. #define T30_FAX_TERM_ERR_QUEUE_TOO_LATE              T30_FAX_TERM_ERR_BASE + 13  /*  recoverable error*/
  602. #define T30_FAX_TERM_ERR_SESSION_FAILED              T30_FAX_TERM_ERR_BASE + 14  /*  recoverable error*/
  603. #define T30_FAX_TERM_ERR_UNSUPPORTED                 T30_FAX_TERM_ERR_BASE + 15  /*  recoverable error*/
  604. #define T30_FAX_TERM_ERR_OPEN_QUEUE_FAILED           T30_FAX_TERM_ERR_BASE + 16  /*  recoverable error*/
  605. #define T30_FAX_TERM_ERR_BAD_PAGE_SIZE               T30_FAX_TERM_ERR_BASE + 17  /*  recoverable error*/
  606. #define T30_FAX_TERM_ERR_FILE_IO_FAILURE             T30_FAX_TERM_ERR_BASE + 18  /*  recoverable error*/
  607. #define T30_FAX_TERM_ERR_CONVERSION_REQUIRED         T30_FAX_TERM_ERR_BASE + 19  /*  recoverable error*/
  608. #define T30_FAX_TERM_ERR_CHECK_BAD_LINES             T30_FAX_TERM_ERR_BASE + 20  /*  recoverable error*/
  609. #define T30_FAX_TERM_ERR_CHECK_DIFF_ATTRIB           T30_FAX_TERM_ERR_BASE + 21  /*  recoverable error*/
  610. #define T30_FAX_TERM_ERR_NO_MORE_DOCUMENTS           T30_FAX_TERM_ERR_BASE + 22  /*  recoverable error*/
  611. #define T30_FAX_TERM_ERR_INCORRECT_LIBRARY_VER       T30_FAX_TERM_ERR_BASE + 23  /*  recoverable error*/
  612. #define T30_FAX_TERM_ERR_RATE_TOO_LOW                T30_FAX_TERM_ERR_BASE + 24  /*  recoverable error*/
  613. #define T30_FAX_TERM_ERR_QUEUE_OVERFLOW              T30_FAX_TERM_ERR_BASE + 25  /*  recoverable error*/
  614. #define T30_FAX_TERM_ERR_ALREADY_ATTACHED            T30_FAX_TERM_ERR_BASE + 26  /*  recoverable error*/
  615. #define T30_FAX_TERM_ERR_IMAGE_RECEIVE_FAIL          T30_FAX_TERM_ERR_BASE + 27  /*  recoverable error*/
  616. #define T30_FAX_TERM_ERR_OUT_OF_MEMORY               T30_FAX_TERM_ERR_BASE + 28  /*  recoverable error*/
  617. #define T30_FAX_TERM_ERR_INVALID_SESSION             T30_FAX_TERM_ERR_BASE + 29  /*  recoverable error*/
  618. #define T30_FAX_TERM_ERR_BAD_ARGUMENT                T30_FAX_TERM_ERR_BASE + 30  /*  recoverable error*/
  619. #define T30_FAX_TERM_ERR_NO_FAX_RESOURCES            T30_FAX_TERM_ERR_BASE + 31  /*  recoverable error*/
  620. #define T30_FAX_TERM_ERR_INVALID_QUEUE               T30_FAX_TERM_ERR_BASE + 32  /*  recoverable error*/
  621. #define T30_FAX_TERM_ERR_DOCUMENT_NOT_FOUND          T30_FAX_TERM_ERR_BASE + 33  /*  recoverable error*/
  622. #define T30_FAX_TERM_ERR_QUEUE_CORRUPTED             T30_FAX_TERM_ERR_BASE + 34  /*  recoverable error*/
  623. #define T30_FAX_TERM_ERR_INVALID_Q_TYPE              T30_FAX_TERM_ERR_BASE + 35  /*  recoverable error*/
  624. #define T30_FAX_TERM_ERR_FUNCTION_NOT_IMPLEMENTED    T30_FAX_TERM_ERR_BASE + 36  /*  recoverable error*/
  625. #define T30_FAX_TERM_ERR_INVALID_EVENT               T30_FAX_TERM_ERR_BASE + 37  /*  recoverable error*/
  626. #define T30_FAX_TERM_ERR_INVALID_CH_ID               T30_FAX_TERM_ERR_BASE + 38  /*  recoverable error*/
  627. #define T30_FAX_TERM_INFO_TRACE                      T30_FAX_TERM_ERR_BASE + 39  /*  Info */ 
  628. /****************************************************************
  629. Security or resource related errors
  630. may need modification for some implemenations
  631. ****************************************************************/
  632. #define T30_FAX_TERM_ERR_CPCD_BUSY                   T30_FAX_TERM_ERR_BASE + 100  /*  recoverable error*/
  633. #define T30_FAX_TERM_ERR_FAILURE                     T30_FAX_TERM_ERR_BASE + 101  /*  recoverable error*/
  634. #define T30_FAX_TERM_ERR_NO_RESOURCE_ASSIGNED        T30_FAX_TERM_ERR_BASE + 102  /*  recoverable error*/
  635. #define T30_FAX_TERM_ERR_NO_CPCD_PORT                T30_FAX_TERM_ERR_BASE + 103  /*  recoverable error*/
  636. #define T30_FAX_TERM_ERR_NO_PASSWORD                 T30_FAX_TERM_ERR_BASE + 104  /*  recoverable error*/
  637. #define T30_FAX_TERM_ERR_MONITOR_MISSING             T30_FAX_TERM_ERR_BASE + 105  /*  recoverable error*/
  638. #define T30_FAX_TERM_ERR_MSEC_WAS_ALLOCATED          T30_FAX_TERM_ERR_BASE + 106  /*  recoverable error*/
  639. /****************************************************************
  640.  FAX TERMINATION Error Codes - command failure
  641. ****************************************************************/
  642. #define    T30_FAX_TERMINATION_SEND_FAX_CMD_FAILURE              T30_FAX_TERM_ERR_BASE + 150  /*  recoverable error*/
  643. #define    T30_FAX_TERMINATION_RECEIVE_FAX_CMD_FAILURE           T30_FAX_TERM_ERR_BASE + 151  /*  recoverable error*/
  644. #define    T30_FAX_TERMINATION_ANSWER_FAX_POLL_CMD_FAILURE       T30_FAX_TERM_ERR_BASE + 152  /*  recoverable error*/
  645. #define    T30_FAX_TERMINATION_CANCEL_FAX_CMD_FAILURE            T30_FAX_TERM_ERR_BASE + 153  /*  recoverable error*/
  646. #define    T30_FAX_TERMINATION_GET_SESSION_STATUS_CMD_FAILURE    T30_FAX_TERM_ERR_BASE + 154  /*  recoverable error*/
  647. #define    T30_FAX_TERMINATION_GET_DOC_STATUS_CMD_FAILURE        T30_FAX_TERM_ERR_BASE + 155  /*  recoverable error*/
  648. #define    T30_FAX_TERMINATION_OPEN_FAX_SESSION_CMD_FAILURE      T30_FAX_TERM_ERR_BASE + 156  /*  recoverable error*/
  649. #define    T30_FAX_TERMINATION_CLOSE_FAX_SESSION_CMD_FAILURE     T30_FAX_TERM_ERR_BASE + 157  /*  recoverable error*/
  650. #define    T30_FAX_TERMINATION_SET_PARAMS_CMD_FAILURE            T30_FAX_TERM_ERR_BASE + 158  /*  recoverable error*/
  651. #define    T30_FAX_TERMINATION_GET_PARAMS_CMD_FAILURE            T30_FAX_TERM_ERR_BASE + 159  /*  recoverable error*/
  652. #define    T30_FAX_TERMINATION_ADD_DOC_CMD_FAILURE               T30_FAX_TERM_ERR_BASE + 160  /*  recoverable error*/
  653. #define    T30_FAX_TERMINATION_RESET_QUEUE_CMD_FAILURE           T30_FAX_TERM_ERR_BASE + 161  /*  recoverable error*/
  654. #define    T30_FAX_TERMINATION_INFO                              T30_FAX_TERM_ERR_BASE + 162  /*  Info message */
  655. #define    T30_FAX_TERMINATION_SET_RDR_DATA_CMD_FAILURE          T30_FAX_TERM_ERR_BASE + 163  /*  recoverable error*/
  656. /****************************************************************
  657. Conversion Errors
  658. ****************************************************************/
  659. #define T30_FAX_TERM_ERR_INVALID_HANDLE              T30_FAX_TERM_ERR_BASE + 200  /*  recoverable error*/
  660. #define T30_FAX_TERM_ERR_FONT_ERROR                  T30_FAX_TERM_ERR_BASE + 201  /*  recoverable error*/
  661. #define T30_FAX_TERM_ERR_FONT_BMP_TOO_LARGE          T30_FAX_TERM_ERR_BASE + 202  /*  recoverable error*/
  662. #define T30_FAX_TERM_ERR_FONT_TOO_LARGE              T30_FAX_TERM_ERR_BASE + 203  /*  recoverable error*/
  663. #define T30_FAX_TERM_ERR_FONT_NOT_FOUND              T30_FAX_TERM_ERR_BASE + 204  /*  recoverable error*/
  664. #define T30_FAX_TERM_ERR_INVALID_PAGE_LENGTH         T30_FAX_TERM_ERR_BASE + 205  /*  recoverable error*/
  665. #define T30_FAX_TERM_ERR_INVALID_PAGE_TYPE           T30_FAX_TERM_ERR_BASE + 206  /*  recoverable error*/
  666. #define T30_FAX_TERM_ERR_INVALID_RESOLUTION          T30_FAX_TERM_ERR_BASE + 207  /*  recoverable error*/
  667. #define T30_FAX_TERM_ERR_INVALID_ENCODING            T30_FAX_TERM_ERR_BASE + 208  /*  recoverable error*/
  668. #define T30_FAX_TERM_ERR_CONVERT                     T30_FAX_TERM_ERR_BASE + 209  /*  recoverable error*/
  669. #define T30_FAX_TERM_ERR_MACRO_BAD_COMMAND           T30_FAX_TERM_ERR_BASE + 210  /*  recoverable error*/
  670. #define T30_FAX_TERM_ERR_MACRO_BAD_SYNTAX            T30_FAX_TERM_ERR_BASE + 211  /*  recoverable error*/
  671. #endif /* FAX_TERMINATION_SUPPORTED */
  672. /*error codes for analog IF */
  673. #define ANALOG_IF_HOOK_CMD_FAILURE 0x36000 /*recoverable error*/
  674. #define ANALOG_IF_FLASH_CMD_FAILURE 0x36001 /*recoverable error*/
  675. #define SEND_QUERY_STATUS_CMD_FAILURE 0x36002 /*recoverable error*/
  676. #define SEND_LOOP_CMD_FAILURE 0x36003 /*recoverable error*/
  677. #define SEND_REGISTER_CMD_FAILURE 0x36004 /*recoverable error*/
  678. #define SEND_MSG_WAIT_CMD_FAILURE 0x36005 /*recoverable error*/
  679. #define METERING_TONE_CMD_FAILURE 0x36006 /*recoverable error*/
  680. #define REVERSAL_POLARITY_CMD_FAILURE 0x36007 /*recoverable error*/
  681. #define FORCE_DISCCONECT_CMD_FAILURE 0x36008 /*recoverable error*/
  682. #define GENERATE_FLASH_CMD_FAILURE 0x36009 /*recoverable error*/
  683. #define ANIC_INIT_FAILED 0x3600a /*fatel error*/
  684. #define GEN_DIST_RING_CMD_FAILURE 0x3600b /*recoverable error*/
  685. #define DUSLIC_INIT_FAILED 0x3600c /*fatel error*/
  686. #define RING_WHILE_OFF_HOOK 0x3600d /*recoverable error*/
  687. #define DUSLIC_CHECKSUM_READ_ERROR 0x3600e /*recoverable error*/
  688. #define GEN_DIST_RING_CALLER_ID_CMD_FAILURE 0x3600f /*recoverable error*/
  689. #define ACTIVE_HIGH_LOW_INFO 0x36010 /*infomsg*/
  690. #define SPI_CONNECTION_ERROR 0x36011 /*fatel error*/
  691. /* Voice Packetizer Recorder error codes */
  692. #define RECORDER_SEND_TO_IO_FAILED           0x37000    /*recoverable error*/
  693. #define RECORDER_GET_NEW_FRAME_PTR_FAILED    0x37001    /*recoverable error*/
  694. #define RECORDER_DSP_RX_HANDLER_ERROR        0x37003    /*recoverable error*/
  695. #define RECORDER_DSP_TX_HANDLER_ERROR        0x37004    /*recoverable error*/
  696. #define RECORDER_RTP_HANDLER_ERROR           0x37005    /*recoverable error*/
  697. #define RECORDER_EVENT_HANDLER_ERROR         0x37006    /*recoverable error*/
  698. #define RECORDER_MALLOC_ERROR                0x37007    /*recoverable error*/
  699. #define RECORDER_BUFFER_OVERRUN_ERROR        0x37008    /*recoverable error*/
  700. #define RECORDER_INIT_PARAMS_FAILED          0x37009    /*recoverable error*/
  701. #define RECORDER_CONTROL_HANDLER_FAILED      0x3700a    /*recoverable error*/
  702. #define RECORDER_PAYLOAD_LENGTH_TOO_BIG      0x3700b    /*recoverable error*/
  703. #define RECORDER_INVALID_BUFFER_SIZE         0x3700c    /*recoverable error*/
  704. /* SCTP */
  705. #define SCTP_BUFFER_ALLREADY_FREED           0x38000    /*recoverable error*/
  706. #define SCTP_BUFFER_FULL  0x38001    /*recoverable error*/
  707. #define SCTP_INVALID_BUFFER_ID  0x38002 /* info error    */
  708. #define SCTP_OPEN_PORT_FAILED  0X38003 /*recoverable error*/
  709. #define SCTP_SETPROT_FAILED  0x38004 /*recoverable error*/
  710. #define SCTP_INIT_FAILED  0x38005 /*recoverable error*/
  711. #define SCTP_SEND_FAILED  0x38006 /*recoverable error*/
  712. #define SCTP_ABORT_FAILED  0x38007 /*recoverable error*/
  713. #define SCTP_BIND_FAILED  0x38008 /*recoverable error*/
  714. #define SCTP_INVALID_EVENT  0x38009 /*recoverable error*/
  715. /* LAN Query */
  716. #define PCI_LAN_QUERY_CMD_FAILURE  0x39000
  717. /*Error Message Counter*/
  718. #define TOO_MANY_CHANNALS_WITH_ERROR         0x3A000    /*recoverable error*/
  719. #define ERROR_MESSAGE_TOO_LONG  0x3A001    /*recoverable error*/
  720. #define ERROR_MESSAGE_STRING  0x3A002 /*recoverable error*/
  721. /* Mediation error codes */
  722. #define MEDIEATION_INVALID_END_POINT  0x40000 /* info error      */
  723. #define MEDIEATION_INVALID_USER_END_POINT    0x40001 /*recoverable error*/
  724. /* http */
  725. #define HTTP_FAIL_TO_LOAD_CPT_FILE_ERROR  0x40000 /*fatal error*/
  726. #define HTTP_FAIL_TO_LOAD_CAS_FILE_ERROR  0x40001 /*fatal error*/
  727. #define HTTP_FAIL_TO_LOAD_VP_FILE_ERROR  0x40002 /*fatal error*/
  728. #define HTTP_FAIL_TO_LOAD_FXO_COEF_FILE_ERROR 0x40003 /*fatal error*/
  729. #define HTTP_FAIL_TO_LOAD_FXS_COEF_FILE_ERROR 0x40004 /*fatal error*/
  730. #define HTTP_FAIL_TO_LOAD_BOOT_FILE_ERROR    0x40005 /*Recoverable error*/
  731. #define HTTP_FAIL_TO_READ_CPT_FILE_ERROR 0x40006
  732. #define HTTP_FAIL_TO_READ_CAS_FILE_ERROR  0x40007 /*fatal error*/
  733. #define HTTP_FAIL_TO_READ_VP_FILE_ERROR  0x40008 /*fatal error*/
  734. #define HTTP_FAIL_TO_READ_FXO_COEF_FILE_ERROR 0x40009 /*fatal error*/
  735. #define HTTP_FAIL_TO_READ_FXS_COEF_FILE_ERROR 0x4000A /*fatal error*/
  736. #define HTTP_FAIL_TO_READ_BOOT_FILE_ERROR    0x4000B /*Recoverable error*/
  737. #define HTTP_FAIL_TO_READ_INI_FILE_ERROR    0x4000C /*Recoverable error*/
  738. /*error codes - PCIIF -- Continue ...*/
  739. #define DELETE_VOICEPROMPT_CMD_FAIL 0x41000 /*recoverable error*/
  740. #define CHANGE_PLAYBACK_PARAMS_CMD_FAILURE 0x41001 /*recoverable error*/
  741. /***********************************************************************
  742.     Error-handler type declerations :
  743.   
  744. ************************************************************************/
  745. #ifndef T_ERROR_MSG_TYPE
  746. #define T_ERROR_MSG_TYPE
  747. enum TErrorMsgType
  748. {
  749.         FatalErrorMsg,
  750.         RecoverableErrorMsg,
  751.         InfoMsg,
  752.         DbgMsg
  753. };
  754. #endif
  755. #ifndef T_ERROR_MSG_SOURCE
  756. #define T_ERROR_MSG_SOURCE
  757. enum acTErrorMsgSourceModule
  758. {
  759. acUnknownOrigin=0,
  760. acDSPOrigin=1,
  761. acDSPFirmwareOrigin=2,
  762. acInvalidUserInputOrigin=3,
  763. acASN1EncDecOrigin=4,
  764. acVoicePacketizerOrigin=5,
  765. acNetworkIFOrigin=6,
  766. acRTOSOrigin=7,
  767. acTDMBusIFOrigin=8,
  768. acPCIIFOrigin=9,
  769. acRTPDecOrigin=10,
  770. acMissingHWOrigin=11,
  771. acOmnitelStack=12,
  772. acPSTNCAS=13,
  773. acPSTNAPLI=14,
  774. acFaxRelayOrigin=15,
  775. acISDNAPI=16,
  776. acVoiceAtomizerOrigin=17,
  777. acPlayFileToIPOrigin=18,
  778.     acVpRecorderOrigin=19,
  779.     acFaxTerminationOrigin=21,
  780.   acV5API=22,
  781. acSCTPOrigin=23,
  782.     acSAALCP=24,
  783.     acSAALAplic=25,
  784.     acMediationOrigin=26    
  785. };
  786. #endif
  787. /***********************************************************************
  788.     General Declerations:
  789.   
  790. ************************************************************************/
  791. struct TExtendedVoiceParams
  792. {
  793. char SITDetectionEnable;
  794. };
  795. typedef enum
  796. {
  797.   STATUS_OK = 0,
  798.   STATUS_ERROR = (-1)
  799. } RETURN_STATUS;
  800. typedef enum
  801. {
  802.   CAS_DETECTION_ENABLE  = 0,
  803.   CAS_DETECTION_DISABLE = 1
  804.   
  805. } CAS_DETECTION; 
  806. typedef enum 
  807. {
  808. CAS_GENERATION_SOURCE_USER = 0,
  809. CAS_GENERATION_SOURCE_NETWORK = 1
  810. } CASGenerationSource;
  811.  
  812. typedef enum 
  813. {
  814. FAX_RELAY_T38_SUPPORTED=0,
  815. RECEIVED_FAX_PAGES_NUMBER=1,
  816. FAX_RELAY_CALLING_SIDE=2,
  817. FAX_RELAY_ANSWERING_SIDE=3
  818. }FaxRelayInfoQueryIndex;
  819. typedef enum
  820. {
  821.   NOT_REQUIRED = 0,
  822.   REQUIRED     = 1
  823. } CMD_CH_SEND; 
  824. /* value for BoardInitializationMethod */
  825. enum {
  826. INITIALIZE_NOT_BY_PCI,
  827. INITIALIZE_BY_PCI
  828. }; 
  829. /* value for setting the TPNCP transport layer */
  830. enum acTpncpTransportLayer
  831. {
  832. TCP_TRANSPORT,
  833. UDP_TRANSPORT,
  834. ATM_TRANSPORT
  835. }; 
  836. /********************************************************
  837.    Fax Relay Definitions :
  838. *********************************************************/
  839. struct TFaxRelayErrorReport
  840. {
  841. unsigned short FlowError;
  842. unsigned short FlowState;
  843. unsigned short BadCmd1;
  844. unsigned short BadCmd2;
  845. };
  846. /********************************************************
  847.    Call Progress and User Defined Tones Definitions :
  848. *********************************************************/
  849. typedef struct
  850. {
  851. unsigned int TotalEnergyThreshold;
  852. unsigned int LowEnergyThreshold;
  853. unsigned int HighEnergyThreshold;
  854.   unsigned int Twist;
  855. } acTThresholds;
  856. typedef struct
  857. {
  858. unsigned int NumberOfFrequencies;
  859. unsigned int NumberOfSignals;
  860. } acTFreqAndSigQuantity;
  861. typedef struct
  862. {
  863. unsigned int FrequencyLsb;
  864. unsigned int FrequencyMsb;
  865. } acTExtendedSignalingFrequency;
  866. enum acTCallProgressToneType
  867. {
  868.     acCallProgressDialTone                 = 1,
  869.     acCallProgressRingingTone              = 2,
  870.     acCallProgressBusyTone                 = 3,
  871.     acCallProgressCongestionTone           = 4,
  872.     acCallProgressSpecialInfoTone          = 5,
  873.     acCallProgressWarningTone              = 6,
  874.     acCallProgressReorderTone              = 7,
  875. acCallProgressConfirmationTone         = 8,
  876. acCallProgressWaitingTone              = 9,    /* don't cancel the voice stream */
  877. acUserDefinedCo1Tone                   = 10,
  878. acUserDefinedCo2Tone                   = 11,
  879. acUserDefinedOldMilliwattTone          = 12,
  880. acUserDefinedNewMilliwattTone          = 13,
  881. acUserDefinedMessageWaitingIndicator   = 14,
  882. acUserDefinedStutterDialTone           = 15,
  883. acUserDefinedStutterOffHookWarningTone = 16,
  884. acCallProgressWaitingTone1             = 17,   /* don't cancel the voice stream */
  885.     acCallProgressComfortTone              = 18,
  886.     acCallProgressNAKTone                  = 19,   /* "negative indication tone" */
  887.     acCallProgressVacantNumberTone         = 20,
  888.     acCallProgressSpecialConditionTone     = 21,
  889.     acCallProgressDialTone2                = 22,   /* "second dial tone" (Recall dial tone */
  890.     acCallProgressOnHoldTone               = 23,
  891.     acCallProgressCallTransferDialTone     = 24,
  892.     acCallProgressCallForwardTone          = 25,
  893.     acCallProgressCreditCardServiceTone    = 26,
  894.     acCallProgressSpecialRecallDialTone    = 27,
  895. acCallProgressAlertingTone             = 28,
  896. acCallProgressNetworkCongestionTone    = 29,
  897. acCallProgressWaitingTone2    = 30,   /* don't cancel the voice stream */
  898. acCallProgressWaitingTone3    = 31,   /* don't cancel the voice stream */
  899. acCallProgressWaitingTone4    = 32    /* don't cancel the voice stream */
  900. };
  901. typedef struct
  902. {
  903. enum acTCallProgressToneType ToneType; 
  904. unsigned int LowFrequencyIndex; 
  905. unsigned int HighFrequencyIndex;
  906. unsigned int FirstTOnLsb;
  907. unsigned int FirstTOnMsb;
  908. unsigned int FirstTOffLsb;
  909. unsigned int FirstTOffMsb;
  910. unsigned int SecondTOnLsb;
  911. unsigned int SecondTOnMsb;
  912. unsigned int SecondTOffLsb;
  913. unsigned int SecondTOffMsb;
  914. } acTCallProgressSignalAttributes;
  915. typedef struct
  916. {
  917. unsigned int LowFrequencyIndex; 
  918. unsigned int HighFrequencyIndex;
  919. } acTUserDefinedTonesAttributes;
  920. typedef struct
  921. {
  922. unsigned int LowFrequencyLevel;
  923. unsigned int HighFrequencyLevel;
  924. } acTExtendedSignalingSignalLevels;
  925. typedef struct
  926. {
  927. acTThresholds Thresholds;
  928. acTFreqAndSigQuantity FreqAndSigQuantity;
  929. acTExtendedSignalingFrequency ExtendedSignalingFrequency[MAX_CALL_PROGRESS_FREQUENCIES];
  930. acTUserDefinedTonesAttributes UserDefinedTonesAttributes[MAX_CALL_PROGRESS_SIGNALS];
  931. acTExtendedSignalingSignalLevels ExtendedSignalingSignalLevels[MAX_CALL_PROGRESS_SIGNALS];
  932. } acTUserDefinedTonesDB;
  933. typedef struct
  934. {
  935. acTThresholds Thresholds;
  936. acTFreqAndSigQuantity FreqAndSigQuantity;
  937. acTExtendedSignalingFrequency ExtendedSignalingFrequency[MAX_CALL_PROGRESS_FREQUENCIES];
  938. acTCallProgressSignalAttributes CallProgressSignalAttributes[MAX_CALL_PROGRESS_SIGNALS];
  939. acTExtendedSignalingSignalLevels ExtendedSignalingSignalLevels[MAX_CALL_PROGRESS_FREQUENCIES];
  940. } acTCallProgressDB;
  941. /***********************************************************************
  942.     Common Types Declerations:
  943.   
  944. ************************************************************************/
  945. enum SignalIndex
  946. {
  947. FREQ_1100_CNG   = 0,    /*CNG*/
  948. /*SIGNAL_V21      = 3,    /*V21 (1650)  -Not Supported by the DSP*/
  949. FREQ_2100       = 7,    /*FAX/V21/V22/V23/V32   */
  950. FREQ_2002_1375  = 10,        /*V8bis(V90/V34)   */
  951. FREQ_1200 = 11,    /*Caller Id   */
  952. FREQ_2100_AM = 12,    /*V34 FAX/V34/V90   */
  953. FREQ_2100_PHASE_REVERSALS =13,    /*V34 FAX/V32/V34/V90   */
  954. DCN = 14,    /*V21 Disconnect Fax Frame */
  955. PREAMBLE = 15,                /*Fax   */
  956. V8_V34 = 18    /*V8 - Fax V.34 Answering side*/
  957. };
  958. enum CurrentState
  959. {
  960. STATE_VOICE = 0,
  961. STATE_FAX = 1,
  962. STATE_MODEM = 2,
  963. STATE_MODEM_ROCK_WELL = 3,
  964. /*STATE_CALLER_ID = 4 -Not Supported by the DSP*/
  965. STATE_FAX_OR_MODEM = 4
  966. };
  967. /* Mediation end points enumarator */
  968. typedef enum 
  969. {
  970. TDM_END_POINT=0,
  971. IP_END_POINT=1,
  972. ATM_END_POINT=2
  973. } TEndPoint;
  974. /* The basic frame time (for PCM/ADPCM only) to which TxM relates */
  975. enum TSampleBasedCodersRTPPacketInterval
  976. {
  977. PACKET_INTERVAL_DEFAULT=0,
  978. PACKET_INTERVAL_5_MSEC=1,
  979. PACKET_INTERVAL_10_MSEC=2,
  980. PACKET_INTERVAL_20_MSEC=3
  981. };
  982. /* Network codes */
  983. typedef enum
  984. {
  985. VoIP_BOARD = 0,
  986. RAS_BOARD  = 1
  987. } acBoardFuncType;
  988. /* HR! Changed Network types to Channel types */
  989. typedef enum
  990. {
  991. VoIP_CHANNEL=0,
  992. VoATM_CHANNEL=1,
  993. RAS_CHANNEL=2,
  994.       VoIPOverATM_CHANNEL=3,
  995. SS7_CHANNEL=4
  996. } acTNetwork;
  997. typedef enum
  998. {
  999. FILE2NI_NONE = 0x0,
  1000. FILE2NI_PLAY = 0x1,
  1001. FILE2NI_RECORD = 0x2
  1002. } acTFile2NI;
  1003. enum TUserDialing /* bit wise */
  1004. {
  1005.     USER_DIALING_NONE = 0x0,
  1006.     USER_DIALING_DIAL = 0x1,
  1007.     USER_DIALING_CALL_PROGRESS = 0x2,
  1008.     USER_DIALING_RX_VOICE_PROMPT = 0x4,
  1009.     USER_DIALING_TX_VOICE_PROMPT = 0x8,
  1010.     USER_DIALING_CALLER_ID = 0x10
  1011. };
  1012. typedef enum acTTelephonySignalCode /*AC37691 -the signal code should match RFC2833 specifications*/
  1013. {
  1014. DTMF_EVENT_0 = 0,
  1015. DTMF_EVENT_1 = 1,
  1016. DTMF_EVENT_2 = 2,
  1017. DTMF_EVENT_3 = 3,
  1018. DTMF_EVENT_4 = 4 ,
  1019. DTMF_EVENT_5 = 5,
  1020. DTMF_EVENT_6 = 6,
  1021. DTMF_EVENT_7 = 7,
  1022. DTMF_EVENT_8 = 8,
  1023. DTMF_EVENT_9 = 9,
  1024. DTMF_EVENT_10 = 10,
  1025. DTMF_EVENT_11 = 11, 
  1026. DTMF_EVENT_A = 12,
  1027. DTMF_EVENT_B = 13,
  1028. DTMF_EVENT_C = 14,
  1029. DTMF_EVENT_D = 15,
  1030. ANALOG_HOOKFLASH = 16,
  1031. ANALOG_NONE = 17 /* code 17 is not part of RFC2833 */
  1032. } acTTelephonySignalCode;
  1033. enum TFaxRate
  1034. {
  1035. Rate2400bps=0,
  1036. Rate4800bps=1,
  1037. Rate7200bps=2,
  1038. Rate9600bps=3,
  1039. Rate12000bps=4,
  1040. Rate14400bps=5
  1041. };     
  1042. enum TFaxProtocol
  1043. {
  1044. CompFRF11=0,   /*Fully backward compatible FRF.11 mode*/
  1045. NonCompFRF11=1,/*Non backward compatible FRF.11 mode*/
  1046. T38TCP=2,      /*T.38 TCP mode*/
  1047. T38UDP=3       /*T.38 UDP mode*/
  1048. };     
  1049. enum TFaxMode
  1050. {
  1051.         NotFax=0,
  1052.         CallingFax=1,
  1053.         AnsweringFax=2,
  1054. FaxBypass=3,
  1055. ModemBypass=4,
  1056. ModemRelay=5,
  1057. UnknownFaxSide=6 /*Incase of Answering Fax with no CED,we can't be sure about the Calling or The Answering Side*/
  1058. };     
  1059. enum TTCFMode
  1060. {
  1061. TransferredTCF=0,
  1062. LocalTCF=1
  1063. };
  1064. enum TIFPTransport
  1065. {
  1066. IFP_UDP=0,
  1067. IFP_TCP=1
  1068. };
  1069. enum TFaxDetectionEventOrigin
  1070. {
  1071. NO_FAX_DETECTED  = -1,
  1072. FAX_DETECTION_ORIGIN_CNG = 0,
  1073. FAX_DETECTION_ORIGIN_V21_PREAMBLE = 1,
  1074. FAX_DETECTION_ORIGIN_V8_V34 = 2,
  1075. FAX_DETECTION_ORIGIN_FROM_NETWORK = 3
  1076. };
  1077. enum veNAnswerToneDetectionOrigin 
  1078. {
  1079. NO_ANSWER_TONE_DETECTED   = -1,
  1080. ANSWER_TONE_ORIGIN_CED   = 0 ,  /*2100 HZ*/
  1081. ANSWER_TONE_ORIGIN_ANS_AM = 1 
  1082. };
  1083. /*SID*/
  1084. typedef enum
  1085. {
  1086. SID_NUM_NO_COEFF = 0,
  1087. SID_NUM_4_COEFF = 4,
  1088. SID_NUM_6_COEFF = 6,
  1089. SID_NUM_8_COEFF = 8,
  1090. SID_NUM_10_COEFF = 10
  1091. } TSIDNumberCoefficients;
  1092. /* IP-MEDIA Fax Termination*/
  1093. enum TFaxEngineMode
  1094. {
  1095.     Disabled,
  1096. Sending,
  1097. Receiving,
  1098. Polling
  1099. };
  1100. enum TToneDirection
  1101. {
  1102. GENERATE_TO_LOCAL_SIDE=0,
  1103. GENERATE_TO_NETWORK_SIDE=1
  1104. };
  1105. enum TIBSDirection
  1106. {
  1107. DETECT_FROM_LOCAL_SIDE=0,
  1108. DETECT_FROM_NETWORK_SIDE=1,
  1109. BOTH_SIDE_DETECTION
  1110. };
  1111. enum TCallerIDMessageTypes
  1112. {
  1113.     CALLER_ID_SDMF_CND           = 0x04,
  1114.         CALLER_ID_SDMF_VMWI          = 0x06,
  1115. CALLER_ID_MDMF_CALL_SETUP    = 0x80,
  1116. CALLER_ID_MDMF_VMWI          = 0x82,
  1117. CALLER_ID_MDMF_PRE_COMM_DATA = 0x40
  1118. };
  1119. enum TCallerIDDataTypes
  1120. {
  1121. CALLID_NO_TYPE,
  1122. CALLID_MSG_TYPE,
  1123. CALLID_MSG_LENGTH,
  1124. CALLID_CHECKSUM_VALID,
  1125. CALLID_CHECKSUM_INVALID,
  1126. CALLID_PARAMETER_TYPE,
  1127. CALLID_PARAMETER_LENGTH,
  1128. CALLID_TIME_STRING,
  1129. CALLID_DATE_STRING,
  1130. CALLID_NUMBER_STRING,
  1131. CALLID_VMWI,
  1132. CALLID_NAME_STRING,
  1133. CALLID_NUMBER_ABSENCE,
  1134. CALLID_NAME_ABSENCE,
  1135. CALLID_INVALID_TYPE,
  1136. CALLID_RECEIVE_END,
  1137. CALLID_CALLED_ID,
  1138. CALLID_COMPLMNTRY_CALLING,
  1139. CALLID_CALL_TYPE,
  1140. CALLID_FIRST_CALLED,
  1141. CALLID_NETWORK_STATUS,
  1142. CALLID_FORWARD_CALL,
  1143. CALLID_CALLING_USER,
  1144. CALLID_REDIRECTING_NUM,
  1145. CALLID_EXTENSION_NET,
  1146. CALLID_COUNTRY_CODE,
  1147. CALLID_NETWORK_CODE,
  1148. CALLID_VERSION,
  1149. CALLID_ORIGIN_NUM_EXPAN,
  1150. CALLID_HEAD_FOOT
  1151. };
  1152. enum TCallerIDIndicatorStatus
  1153. {
  1154. CALLER_ID_MDMF_VMWI_OFF = 0x00,
  1155.         CALLER_ID_SDMF_VMWI_OFF = 'o',
  1156. CALLER_ID_MDMF_VMWI_ON = 0xFF,
  1157. CALLER_ID_SDMF_VMWI_ON = 'B'
  1158. };
  1159. enum TCallerIDAvailReason
  1160. {
  1161.         CALLID_AVAILABLE,
  1162.     CALLID_PRIVATE = 'P',
  1163. CALLID_OUT_OF_RANGE = 'O'
  1164. };
  1165. enum TCallerIDAvailReasonNTT
  1166. {
  1167. CALLID_UserDenial = 'P',
  1168. CALLID_UnableProvide = 'O',
  1169. CALLID_PublicPhone = 'C',
  1170. CALLID_ServiceConflict = 'S'
  1171. };
  1172. /* Used to control geenration of Caller ID */
  1173. enum TCallerIDProgressState
  1174. {
  1175. CALLER_ID_INACTIVE,
  1176. CALLER_ID_STARTED,
  1177. CALLER_ID_PROGRESS = 4,
  1178. CALLER_ID_RELAY_RX,
  1179. CALLER_ID_ENDED
  1180. };
  1181. enum TCallerIDParameterTypes
  1182. {
  1183. CALLER_ID_DATE_AND_TIME  = 0x01,
  1184. CALLER_ID_DIR_NUM  = 0x02,
  1185. CALLER_ID_CALLED_LINE_IDENTITY   = 0X03,
  1186. CALLER_ID_REASON_FOR_DN  = 0x04,
  1187. CALLER_ID_NAME  = 0x07,
  1188.     CALLER_ID_REASON_FOR_NM  = 0x08,
  1189.     CALLER_ID_VMWI_STATUS  = 0x0B,
  1190. CALLER_ID_COMPLEMENTARY_CALLING_LINE_IDENTITY = 0x10,
  1191. CALLER_ID_CALL_TYPE    = 0x11,
  1192. CALLER_ID_FIRST_CALLED_LINE_IDENTITY   = 0x12,
  1193. CALLER_ID_NETWORK_SYSTEM_MESAAGE_SATUS = 0x13,
  1194. CALLER_ID_TYPE_OF_FORWARDED_CALL = 0x15,
  1195. CALLER_ID_TYPE_OF_CALLING_USER  = 0x16,
  1196. CALLER_ID_ORIGINATING_NUMBER_EXPANTION = 0x21,
  1197. CALLER_ID_REDIRECTING_NUMBER  = 0x1A,
  1198. CALLER_ID_CHARGE  = 0x20,
  1199. CALLER_ID_EXTENTION_FOR_NETWORK_OPERATOR_USE  = 0xE0
  1200. };
  1201. enum TCallerIDCallTypeParam
  1202. {
  1203. VoiceCall      = 0,
  1204. CLIRingBack    = 1,
  1205. CallingName    = 2,
  1206. CallingNameDelivery = 3,
  1207. MessageWaiting = 0x81
  1208. };
  1209. enum TCallerIDTypeOfForwardCall
  1210. {
  1211. Unavailble  = 0,
  1212. Busy = 1,
  1213. NoReply = 2,
  1214. Unconditional    = 3,
  1215. DeflectedAfetrAlerting = 4,
  1216. DeflectedImmediate    = 5,
  1217. InabilityReachMobile   = 6
  1218. };
  1219. enum TCallerIDCallingUserParam
  1220. {
  1221. Unkown = 0,
  1222. VPN    = 3,
  1223. Mobile = 4,
  1224. MobileAndVPN = 5,
  1225. OrdinarySubscriber = 0x0A,
  1226. PrioritySubscriber = 0x0B,
  1227. DataCall     = 0x0C,
  1228. TestCall     = 0x0D,
  1229. Payphone     = 0x0F
  1230. };
  1231. struct Extention_Net
  1232. {
  1233. char FirstDigitCountryCode ;
  1234. char SecondDigitCountryCode ;
  1235. char ThirdDigitCountryCode ;
  1236. char NetworkCode[4];
  1237. char Version[3];
  1238. };
  1239. enum TEventType
  1240. {
  1241. EV_NONE=0,
  1242. EV_ERROR=1,
  1243. EV_DIGIT=2,
  1244. EV_TONE=3,
  1245. EV_END_DIAL=4,
  1246. EV_END_TONE=5,
  1247. EV_END_VOICE_PROMPT=6,
  1248. EV_DEBUG=7,
  1249. EV_RTCP=8,
  1250. EV_RTCP_CLOSE = 42,
  1251. EV_DETECT_FAX=10,
  1252. EV_END_FAX=11,          
  1253. EV_DETECT_MODEM=12,
  1254. EV_END_MODEM=13,          
  1255. EV_ON_HOOK=14,
  1256. EV_OFF_HOOK=15,
  1257. EV_DETECT_FAX_PAGE=16,
  1258. EV_CAS_CHANGED=17,
  1259. EV_DETECT_CALL_PROGRESS_TONE=18,
  1260. EV_END_CALL_PROGRESS_TONE=19,
  1261. EV_BOARD_STARTED=20,
  1262. EV_RTCP_EXT_RECEIVED=21,
  1263. EV_DESTINATION_IP_FOUND=22,
  1264. EV_DSP_SOFTWARE_REPLACEMENT_DONE=23,
  1265. EV_DSP_RESTARTED=24,
  1266. EV_DETECT_ANSWER_TONE=25,
  1267. EV_DETECT_MODEM_RETRAIN=26,
  1268. EV_END_MODEM_RETRAIN=27,
  1269. EV_END_SENDING_CAS=28,
  1270. EV_END_PLAYING_CALL_PROGRESS_TONE=29,
  1271. EV_END_BIT=32,
  1272. EV_KEEP_ALIVE=33,
  1273. EV_DETECT_CALLER_ID=34,
  1274. EV_FLASH_HOOK=35,
  1275.     EV_FAX_MODULATION_TYPE_CHANGE=36,
  1276. EV_PING_DESTINATION_IP_FOUND=37,
  1277.     EV_LONG_DIGIT=41,
  1278.     EV_BROKEN_CONNECTION = 38,
  1279. EV_CONNECTION_REESTABLISHED=39,
  1280.     EV_CALLER_ID_END=40,
  1281. EV_GET_RESPONSE=43,
  1282. EV_COMMAND_ACK=45,
  1283. EV_SIT_DETECTED=46,
  1284. EV_TELEPHONY_SIGNAL=47,
  1285. EV_TELEPHONY_SIGNAL_END=48,
  1286.     /* IPMedia */
  1287.     EV_START_OF_SPEECH=50,
  1288.     EV_END_OF_SPEECH=51,
  1289.     EV_STOP_PLAY_ON_BARGE_IN=52,
  1290.     EV_SIGNAL_BELOW_THRESHOLD = 53,
  1291.     EV_SIGNAL_ABOVE_THRESHOLD = 54,
  1292.     EV_PATTERN_DETECTED = 55,
  1293.     EV_PATTERN_STOPPED = 56,
  1294. EV_TFO_SYNC_PATERN_DETECTED = 57,
  1295. EV_PLAYBACK_ENDED = 58,
  1296.     /* PSTN */
  1297. EV_PSTN_INTERNAL_ERROR=64,
  1298. EV_PSTN_CALL_CONNECTED=65,
  1299. EV_PSTN_INCOMING_CALL_DETECTED=66,
  1300. EV_PSTN_CALL_DISCONNECTED=67,
  1301. EV_PSTN_CALL_RELEASED=68,
  1302. EV_PSTN_REMOTE_ALERTING=69,
  1303. EV_PSTN_STARTED=70,
  1304. EV_ISDN_PROGRESS_INDICATION=72, /* ISDN only */
  1305. EV_PSTN_PROCEEDING_INDICATION=73,
  1306. EV_PSTN_ALARM=74,
  1307. EV_RESERVED=75,
  1308. EV_PSTN_LINE_INFO=76,
  1309. EV_PSTN_LOOP_INFO=77,
  1310. EV_PSTN_RESTART_CONFIRM=78,
  1311. EV_ISDN_SERVICE_CHANGE=79, /* ISDN only */
  1312. EV_PSTN_ERROR=80,
  1313. EV_PSTN_WAITING_FOR_BG=81,
  1314. EV_ISDN_DCHANNEL_STATUS=82,
  1315. EV_ISDN_OVLP_DIGIT_IN=83,
  1316. EV_ISDN_SETUP_ACK_IN=84,
  1317. EV_PSTN_CALL_INFORMATION=85,
  1318. EV_PSTN_DBG_INFO=86,
  1319. EV_PSTN_CLOCK_SOURCE_CHANGED=87,
  1320. EV_ISDN_RAW_DATA_Q931_IN=88,
  1321. EV_ISDN_Q931_Relay_Mode=89,
  1322. EV_PSTN_RESERVED_2=90,
  1323. EV_PSTN_CONN_ID_USAGE_PERORT=91,
  1324. EV_ISDN_FACILITY_IN=92,
  1325. EV_ISDN_GENERIC_MSG=95,
  1326. EV_ISDN_TRUNK_DISABLE=96,
  1327. EV_PSTN_LAST_RECEIVED_CAS = 97,
  1328. EV_PSTN_METERING =98,
  1329. EV_TDM_QUERY_INFORMATION=100, /* switching module */
  1330. EV_V5_INCOMING_CALL_DETECTED=110, /* V5 only - Start */
  1331. EV_V5_ALLOC_INDICATION=111,
  1332. EV_V5_DE_ALLOC_INDICATION=112,
  1333. EV_V5_SIGNAL_REQUEST=113,
  1334. EV_V5_CALL_RELEASED=114,
  1335. EV_V5_ALARM=115,
  1336. EV_V5_USER_PORT_STATUS=116,
  1337. EV_V5_BCHANNEL_STATUS=117, /* V5 only - End */
  1338. EV_CARRIER_SENSE_LOST=120,
  1339. EV_CARRIER_SEND_GAINED=121,
  1340. EV_CAS_SEIZURE_DETECTED=128,
  1341. EV_CAS_CHANNEL_BLOCKED=129,
  1342. EV_PSTN_TRACE_BUFFER=130,
  1343. EV_PSTN_CALL_STATE_RESPONSE=131,
  1344. EV_CAS_SEIZURE_ACK=132,
  1345. EV_CAS_AKNOWLEDGE_WK=133,
  1346. EV_CAS_START_WK=134,
  1347. EV_CAS_CONTINUE_WK=135,
  1348. EV_CAS_FLASH_HOOK=136,
  1349.     EV_NETWORK_CAS_CHANEGE=150,
  1350.     EV_NETWORK_VOICE_PACKET_CID_NOT_ACTIVE=151,
  1351. EV_NETWORK_OAM=152,
  1352. EV_ATM_OC3_ALARM_STATUS=153,
  1353.     EV_ATM_VCC_STATISTICS=154,
  1354.     EV_ATM_3G_RATE_CONTROL=155,
  1355.     EV_CHANNEL_INFO=160,
  1356. EV_L2TP_CLOSE_SESSION=170,
  1357. EV_L2TP_OPEN_SESSION=171,
  1358. EV_L2TP_OUTGOING_CALL_REQUEST=172,
  1359. EV_L2TP_TUNNEL_STAT=173, 
  1360. EV_L2TP_SESSION_STAT=174, 
  1361. EV_L2TP_QUERY_TUNNEL_PARAMETERS=175,
  1362. EV_MODEM_CONNECT=180,
  1363. EV_MODEM_DISCONNECT=181,
  1364. EV_MODEM_DEBUG=182,
  1365. EV_MODEM_STATUS=183,
  1366.     /* IP-MEDIA Fax Termination */
  1367.     /* EVENTS for the IP-Media Fax Termination */
  1368.     EV_FAX_TERMINATION_EVENT          = 190,
  1369.     EV_FAX_TERMINATION_STATUS         = 191,
  1370.     EV_FAX_TERMINATION_LOG_PRINT      = 199,
  1371.     EV_RETURN_VALUE_OF_T8100_REGISTER=200,
  1372.     EV_RETURN_VALUE_OF_TDM_SAMPLE=201,
  1373. EV_REMOTE_BOARD_REMOVAL_PENDING = 210,
  1374. EV_TER_PSTN_REDUNDANT_RESET_ACK = 211,
  1375. EV_H100_CLK_ERROR = 214,
  1376. EV_H100_CLK_STATUS = 215,
  1377. EV_QUERY_CONFERENCE_INFO = 219,
  1378. EV_QUERY_CONFERENCE_PARTICIPANT_INFO = 220,
  1379. EV_QUERY_CONFERENCE_GENERAL_REPORT = 221,
  1380. /* from 223 will be reserved to analog */
  1381. EV_ANALOG1_RES = 223,
  1382. EV_ANALOG2_RES = 224,
  1383. EV_ANALOG3_RES = 225,
  1384. EV_ANALOG_IF_GROUND_KEY_POLARITY_DETECTION=226,
  1385. EV_ANALOG_IF_GROUND_KEY_DETECTION=227,
  1386. EV_ANALOG_IF_EM_STATUS=228,
  1387. EV_ANALOG_IF_FXO_STATUS=229,
  1388. EV_ANALOG_IF_FXS_STATUS=230,
  1389. EV_ANALOG_IF_FORCED_DISCONNECT_DETECTED=231,
  1390. EV_ANALOG_IF_PCM_SYNC_FAIL=232,
  1391. EV_ANALOG_IF_DETECT_METERING_TONE=233,
  1392. EV_ANALOG_IF_END_METERING_TONE=234,
  1393. EV_ANALOG_IF_OUT_OF_SERVICE=235,
  1394. EV_ANALOG_IF_CONNECTED=236,
  1395. EV_ANALOG_IF_REVERSAL_POLARITY_DETECTED=237,
  1396. EV_ANALOG_IF_WINK=238,
  1397. EV_ANALOG_IF_SEIZURE_DETECTED=239,
  1398. EV_ANALOG_IF_REMOTE_DISCONNECT=240,
  1399. EV_ANALOG_IF_DETECT_SIGNATURE_TEST=241,
  1400. EV_ANALOG_IF_END_SIGNATURE_TEST=242,
  1401. EV_ANALOG_IF_DETECT_WAITING_MESSAGE=243,
  1402. EV_ANALOG_IF_END_WAITING_MESSAGE=244,
  1403. EV_ANALOG_IF_RING_START=245,
  1404. EV_ANALOG_IF_RING_END=246,
  1405. EV_ANALOG_IF_FXO_CHECKSUM_FAILED=247,
  1406. EV_ANALOG_IF_LOOP_CMD_DONE=248,
  1407. EV_ANALOG_IF_REGISTER_CMD_DONE=249,
  1408. EV_ANALOG_IF_READ_REGISTER_CMD_DONE=250,
  1409. EV_PHY_LINK_UP = 251,
  1410. EV_PHY_LINK_DOWN = 252,
  1411. EV_LAN_QUERY_REPLY = 253,
  1412. EV_LAN_PORT_SWITCHED_TO_REDUNDANT = 254,
  1413. /*   Events 251-255 reserved for backward competability to 3.8 */
  1414.     EV_SAAL_ERROR_REPORT=256,
  1415.     EV_SAAL_STATUS_REPORT=257,
  1416.     EV_SAAL_INFO_REPORT=258,
  1417. EV_PSTN_SHORT_GENERIC_MSG=270,
  1418. EV_PSTN_LONG_GENERIC_MSG=271,
  1419. EV_PSTN_OMNITEL_MSG=272,
  1420. EV_PSTN_SS7_MTP2_RESPOND_REPORT =280,
  1421. EV_PSTN_SS7_MTP2_RESERVED_1 =281,
  1422. EV_PSTN_SS7_MTP2_RESERVED_2 =282,
  1423. EV_PSTN_SS7_MTP2_RESERVED_3 =283,
  1424. EV_PSTN_SS7_MTP2_RESERVED_4 =284,
  1425. EV_CMDSHELL_OUTPUT = 310,
  1426. EV_PSTN_PERFORMANCE_MONITORING_RESPONSE = 320,
  1427. EV_MGCP_TPNCP_AS_RSIP = 311
  1428. };
  1429. typedef enum 
  1430. {
  1431.     Link0ConnectID=0,
  1432.     Link1ConnectID=1
  1433. } acTSAALConnID;
  1434. typedef enum 
  1435. {
  1436. S_IDLE=1, /* Idle state */
  1437. S_OUT_CONN=2, /* Outgoing connection pending state */
  1438. S_IN_CONN=3, /* Incoming connection pending state */
  1439. S_OUT_DISC=4, /* Outgoing disconnection pending state */
  1440. S_OUT_RESYNC=5, /* Outgoing resynchronization pending state */
  1441. S_IN_RESYNC=6, /* Incoming resynchronization pending state */
  1442. S_OUT_RECOV=7, /* Outgoing recovery pending state */
  1443. S_RS_RECOV=8, /* Recovery response pending state */
  1444. S_IN_RECOV=9, /* Incoming recovery pending state */
  1445. S_DATA_TRF_READY=10/* Data transfer ready state */
  1446. } acTSSCOPState;
  1447. typedef enum 
  1448. {
  1449. S_OUT_OF_SERVICE=1,          /* out of service */
  1450. S_ALIGNMENT=2,             /* alignment */
  1451. S_IN_SERVICE_3=3,            /* in service  at NNI */
  1452. S_PROVING=3,           /* proving at UNI */
  1453. S_ALIGN_READY=4,          /* aligned ready */
  1454. S_IN_SERVICE_5=5                  /* in service */
  1455. } acTSSCFState;
  1456. typedef enum 
  1457. {
  1458. LBC_NNI_EMPTY=0,  /* no value */
  1459. LBC_NNI_LR =11, /* Local release */
  1460. LBC_NNI_RR =12, /* Remote release*/
  1461. LBC_NNI_SR =13 /*SSCOP release*/
  1462. } acTSAALReportLbc;/* Low Boundry Conditions */
  1463. typedef enum 
  1464. {
  1465. REASON_NNI_EMPTY=0, /* no value */
  1466. REASON_NNI_ANS =7,/* Alignment not successful */
  1467. REASON_NNI_CC=15, /* Congestion ceased */
  1468. REASON_NNI_CD =16,/* Congestion detected */
  1469. REASON_NNI_PDUT=17, /* PDU transmitted */
  1470. REASON_NNI_PE=9, /* Protocol error*/
  1471. REASON_NNI_SREC=18, /* SSCOP recover*/
  1472. REASON_NNI_UDR=19, /* UNIT DATA received */
  1473. /* The following values are SSCF-PDU (SSCOP-UU) */
  1474. REASON_SSCF_NNI_OOS=1,/* Out of service */
  1475. REASON_SSCF_NNI_PO =2,/* Processor outage */
  1476. REASON_SSCF_NNI_INS =3,/* In service */
  1477. REASON_SSCF_NNI_NM =4,/* Normal */
  1478. REASON_SSCF_NNI_EM =5, /* emergency*/
  1479. REASON_SSCF_NNI_ANS =7,/* Alignment not successful */
  1480. REASON_SSCF_NNI_MI=8, /* Management Initiated */
  1481. REASON_SSCF_NNI_PE =9,/* Protocol error*/
  1482. REASON_SSCF_NNI_PNS =10/*Proving not successful*/
  1483. } acTSAALReportReason;
  1484. typedef enum 
  1485. {
  1486. /* Receipt of unsolicited or inappropriate PDU */
  1487. ER_SD_PDU ='A' ,
  1488. ER_BGN_PDU ='B',
  1489. ER_BGAK_PDU ='C',
  1490. ER_BGREJ_PDU ='D',
  1491. ER_END_PDU ='E',
  1492. ER_ENDAK_PDU ='F', 
  1493. ER_POLL_PDU ='G',
  1494. ER_STAT_PDU ='H',
  1495. ER_USTAT_PDU ='I', 
  1496. ER_RS_PDU ='J',
  1497. ER_RSAK_PDU ='K',
  1498. ER_ER_PDU ='L',
  1499. ER_ERAK_PDU ='M',
  1500. /* Unsuccessful retransmission */
  1501. ER_VT_CC='O',  /* VT(CC) >= MaCC */
  1502. ER_Timer_No_Resp='P',  /* Timer NO_RESPONSE expiry */
  1503. /* other list element error type */
  1504. ER_NS='Q', /* SD, POLL N(S) error */
  1505. ER_STAT_NPS='R', /* STAT N(PS) error */
  1506. ER_STAT_NR='S',   /* STAT N(R) or list elements error */
  1507. ER_USTAT='T',        /* USTAT N(R) or list elements error */
  1508. ER_PDU_LEN='U',  /* PDU length violation */
  1509. /* SD loss */
  1510. ER_RET='V',        /* SD PDUs must be retransmitted */
  1511. /* Credit condition*/
  1512. ER_LACK_CREDIT='W', /* Lack of credit */
  1513. ER_CREDIT_OBT='X' /* Credit obtained */
  1514. } acTSAALErrCode;
  1515. typedef enum 
  1516. {
  1517. UBC_NNI_EMPTY=0, /* no value*/
  1518. UBC_NNI_ALN=14,  /*Alignment*/
  1519. UBC_NNI_INS= 3,/* In service*/
  1520. UBC_NNI_OOS =1/*Out of service*/
  1521. } acTSAALReportUbc;/* Upper  Boundry Conditions */
  1522. typedef enum 
  1523. {
  1524.     CASRelayDisable=0,
  1525.     CASRelayTransparent=1,
  1526.     CASRelayTranslated1=2,
  1527.     CASRelayTranslated2=3,
  1528.     CASRelayTranslated3=4,
  1529.     CASRelayTranslated4=5,
  1530.     CASRelayTranslated5=6,
  1531.     CASRelayTranslated6=7
  1532. } acTAAL2CASRelayMode;
  1533. typedef enum 
  1534. {
  1535. CASEventsOnly = 0,
  1536. CASRFC2833Relay = 1
  1537. } acTCASMode;
  1538. typedef enum 
  1539. {
  1540. MFEventsOnly = 0,
  1541. MFRFC2833Relay = 1
  1542. } acTMFMode;
  1543. /*LAN Query Info*/
  1544. struct acTLanQuery
  1545. {
  1546. char * InfoPtr;
  1547. int InfoLen;
  1548. };
  1549. /* Caller ID detection and transport control */
  1550. enum acTCallerIDTransport
  1551. {
  1552. CALLER_ID_DISABLE=0,
  1553. CALLER_ID_RELAY=1,
  1554. CALLER_ID_BYPASS=2,
  1555. CALLER_ID_MUTE=3
  1556. };
  1557. struct acTSpecialInformationTone
  1558. {
  1559. unsigned int firstToneDuration;
  1560. unsigned int secondToneDuration;
  1561. unsigned int thirdToneDuration;
  1562. };
  1563. struct acTRelayTelephonySignalInfo
  1564. {
  1565. char isRelayTelephonySignalActive; /*Set to 1 on begin, Reset after duration ends  */
  1566. char StartSignal; /*Indicating that a Telephony signal started*/
  1567. int SignalOnTime; /*[milisec] period of active signal*/
  1568. char TelephonySignal; /*Signal Code according to RFC 2833*/
  1569. int SignalingSystem; /*signaling system to generate/detect this signal according to enum TSignalingType*/
  1570. };
  1571. struct acTDigit
  1572. {
  1573. int      DigitOnTime;       /*[milisec] period of active digit*/
  1574. int      InterDigitTime;    /*[milisec] time of silence between last and current digit*/
  1575. int      Digit;             /*Digit Code, -1 if to be ignored*/
  1576. int      SignalingSystem;   /*signaling system to generate/detect this digit according to enum TSignalingType*/
  1577.     int      DetectionDirection; /*=0 detection from the PCM, =1 detection from the Network*/
  1578. };     
  1579. struct acTTelephonySignal
  1580. {
  1581.     acTTelephonySignalCode   SignalCode; /*Signal Code according to RFC2833*/
  1582. int      DetectionDirection; /*=0 detection from the PCM, =1 detection from the Network*/
  1583. short  Duration; /*duration of the signal [msec]*/
  1584. };
  1585. struct acTCAS
  1586. {
  1587. int      InterCASTime;     /*[msec] time between last & current CAS change*/
  1588. int      CASValue;         /*value of CAS nibble - 0x0->0xF (D bit is LSB)*/ 
  1589. };
  1590. struct acLastReceivedCAS
  1591. {
  1592. int TrunkId;
  1593. int BChannel;
  1594. int LastCas;
  1595. };
  1596. struct acTNetworkCASReport
  1597. {
  1598. unsigned short VPI;
  1599. unsigned short VCI;
  1600. int      NetworkCID;       /*Network Channel Id*/
  1601. int      CASValue;         /*value of CAS nibble - 0x0->0xF (D bit is LSB)*/ 
  1602. };
  1603. struct acTNetworkVoice
  1604. {
  1605. unsigned short VPI;
  1606. unsigned short VCI;
  1607. int      NetworkCID;       /*Network Channel Id*/
  1608. };
  1609. struct acTNetworkOAM
  1610. {
  1611. unsigned short VPI;
  1612. unsigned short VCI;
  1613. int     OAMType; /*Type of OAM event*/
  1614. char     LLID[16]; /*Loop Location Identifier*/
  1615. };
  1616. struct acT3GRateControl
  1617. {
  1618. unsigned char NumberOfRFCI;
  1619. unsigned char AMRCodersEnable[20];
  1620. };
  1621. struct acTATMTXAAL5FrameFromHost
  1622. {
  1623.     unsigned short VPI;
  1624.     unsigned short VCI;
  1625.     int LastLength;
  1626. };
  1627. struct acTAAL5FrameMsg
  1628. {
  1629. int VccId;
  1630.         int VPI;
  1631.         int VCI;
  1632. int LastLength; /* 0 : this is a middle part of the AAL5 frame */
  1633. /* n !=0 : this is the last part of the AAL5 frame, the frame size is N */ 
  1634. };
  1635. struct acTPHYStatus
  1636. {
  1637. int OutOfFrame;
  1638. int LossOfFrame;
  1639. int LossOfSignal;
  1640. int L_RDI;
  1641. int L_AIS;
  1642. int UNEQ;
  1643. int PLM;
  1644.         int P_RDI;
  1645.         int P_AIS;
  1646.         int LOP;
  1647. int LCD;
  1648. int UnlockedClock;
  1649.         int RESERVED[4];
  1650. };
  1651. struct acTVccStatistics
  1652. {
  1653.     unsigned short VPI;
  1654.     unsigned short VCI;
  1655.     short TxOverRunCnt;
  1656.     short RxDumpedPcktsCnt;
  1657.     short Reserved[12];
  1658.     union
  1659.     {
  1660.         struct {
  1661.         unsigned short AAL2ParityErrCnt;
  1662.         unsigned short AAL2HecErrCnt;
  1663.         unsigned short AAL2UnprovisionedCIDCnt;
  1664.         short Reserved[11];
  1665.         } VccAAL2Stat;
  1666.         struct {
  1667.         unsigned short Temp1;
  1668.         unsigned short Temp2;
  1669.         short Reserved[12];
  1670.         } VccAAL5Stat;
  1671.     }AALSpecificStat;
  1672. };
  1673. typedef enum 
  1674. {
  1675. ATM_AAL2_PROTOCOL_SSCS=0,
  1676. ATM_AAL2_PROTOCOL_SSSAR_TRANSPARENT_MODE=1,
  1677. ATM_AAL2_PROTOCOL_SSSAR_SUPPORT_MODE=2
  1678. } acTAAL2ProtocolType;
  1679. struct acTCallProgressTone
  1680. {
  1681. enum acTCallProgressToneType ToneType; /*the "logical" tone type*/
  1682. int      LowFreq;          /*[Hz] freq of the lower component of the daul tone*/ 
  1683. int      HighFreq;         /*[Hz] freq of the higher component of the daul tone*/ 
  1684. int      LowFreqLevel;     /*[-dBm] generation level of the lower component of the daul tone*/ 
  1685. int      HighFreqLevel;    /*[-dBm] generation level of the higher component of the daul tone*/ 
  1686. int      TOn1;             /*[10msec] first signal on time interval*/
  1687. int      TOff1;            /*[10msec] first signal off time interval*/
  1688. int      TOn2;             /*[10msec] second signal on time interval*/
  1689. int      TOff2;            /*[10msec] second signal off time interval*/
  1690. };
  1691. struct RingState
  1692. {
  1693. int      RingOnTime;       /*[10msec] ring on time interval*/
  1694. int      RingOffTime;      /*[10msec] ring off time interval*/
  1695. int      NextState;
  1696. };
  1697. struct acTRingTypes
  1698. {
  1699. int               RingType;         /*the "logical" ring type */
  1700. int               Freq;             /*[Hz] freq Ring */ 
  1701. struct RingState  RingStateMachine[4];
  1702. };
  1703. struct acTFxsCoef
  1704. {
  1705. char ac_coef[110]; 
  1706. char dc_coef[90];
  1707. char gen_coef[6];
  1708. };
  1709. struct acTCallProgressDetectionEventInfo
  1710. {
  1711. enum acTCallProgressToneType ToneType; /*the "logical" tone type*/
  1712. int      ToneIndex;         /*tone index*/ 
  1713.     int      DetectionDirection; /*=0 detection from the PCM, =1 detection from the Network*/
  1714. };
  1715. struct acTFaxStatusInfo
  1716. {
  1717. int  Relay_Bypass;        /*=1 if using FaxRelay, =0 if using FaxBypass*/
  1718. int  Calling_Answering;   /*=1 if this is the Calling Fax, =0 if this is the answering Fax (relevant only if using FaxRelay)*/
  1719. int  NumberOfFaxPages;    /*Number of pages received/sent (invalid in ECM mode)*/
  1720. enum TFaxRate ModulationType; /*Fax Data transmit modulation type (used for fax-rate information) */ 
  1721. };
  1722. enum acTUserDialTiming
  1723. {
  1724. USER_DIAL_TIMING_DEFAULT = 0,
  1725. USER_DIAL_TIMING_IMMEDIATELY = 1,
  1726. USER_DIAL_TIMING_CONCATENATE = 2
  1727. }; 
  1728. struct acTDialCmd
  1729. {
  1730. char DigitBuf[DIGIT_BUF_SIZE];
  1731. int  DigitOnTime;       /*[milisec] period of active digit*/
  1732. int  InterDigitTime;    /*[milisec] time of silence between last and current digit*/
  1733. int  SignalingSystem;   /*signaling system to generate/detect this digit according to enum TSignalingType*/
  1734. int  NumDigits;
  1735. };
  1736. struct acTPlayCallProgressToneCmd
  1737. {
  1738. int CallProgressToneIndex;
  1739. int Duration;
  1740. };
  1741. struct acTPlayVoicePromptCmd
  1742. {
  1743. char *VoicePromptBufPtr;
  1744. int VoicePromptBufLength;
  1745. unsigned int VoicePromptCoder; /*TBD*/
  1746. };
  1747. typedef struct
  1748. {
  1749. enum TUserDialing DialingType;     /* dialing type */
  1750. enum TToneDirection ToneDirection;
  1751. union {
  1752. struct acTDialCmd Dial;
  1753. struct acTPlayCallProgressToneCmd CallProgressTone;
  1754. struct acTPlayVoicePromptCmd VoicePrompt;
  1755. struct acTCallerIDMessage *CallerID;
  1756. } u;
  1757. } acTUserDialingCmd;
  1758. struct acTPlayBackPacketRequest
  1759. {
  1760. short NumPacketRequest;
  1761. /* //short PayloadSize; */
  1762. };
  1763. typedef enum {
  1764. DURING_PLAYBACK,
  1765. BARGEIN_HAPPENED_DURING_PLAYBACK,
  1766. BARGEIN_TREATED_DURING_PLAYBACK,
  1767. NO_PLAYBACK,
  1768. ENDING_NI_PLAYBACK
  1769. } TPlayBackState;
  1770. #if FAX_TERMINATION_SUPPORTED
  1771. /* IP-MEDIA Fax Termination */
  1772. struct acTFaxTermReport  /* used for Fax Term Events */
  1773. {
  1774.     int  CID;            
  1775.     char EventName[40];
  1776. int  EventID;
  1777. };
  1778. struct acTFaxTermStatus /* used for Fax Term Session status event */
  1779. {
  1780.     int CID;           
  1781. acTFaxTermSessionStatus APIStatus; 
  1782. };
  1783. struct acTFaxTerminationLogPrint /* used for Fax Term Session status event */
  1784. {
  1785.     char log[300];
  1786. };
  1787. struct acTFaxTerminationFileWrite /* used for Fax Term Session status event */
  1788. {
  1789.     int CID;         
  1790.     int size;
  1791.     int count;
  1792.     int offset;
  1793.     char buffer[300];
  1794. };
  1795. struct acTFaxTerminationFileOpen /* used for Fax Term Session status event */
  1796. {
  1797.     int CID;         /* Channel ID */
  1798.     char mode;       /* Open for read/Write */
  1799. };
  1800. struct acTFaxTerminationFileClose /*used for Fax Term Session status event */
  1801. {
  1802.     int CID;         /* Channel ID */
  1803. };
  1804. struct acTFaxTerminationFileSeek /*used for Fax Term Session status event */
  1805. {
  1806.     int CID;         /* Channel ID */
  1807.     long offset;
  1808.     int origin;
  1809. };
  1810. struct acTFaxTerminationFileRead /* used for Fax Term Session status event */
  1811. {
  1812.     int CID;         /* Channel ID */
  1813.     int size;
  1814.     int count;
  1815. };
  1816. #endif /* FAX_TERMINATION_SUPPORTED */
  1817. struct acTModemConnectAttr
  1818. {
  1819. short   Standard;
  1820. short RxRate;
  1821. short TxRate;
  1822. short Protocol;
  1823. } ;
  1824. struct acTModemEndOfCallInfo
  1825. {
  1826.     char RASDebugMode;
  1827. int     TxData;
  1828. int RxData;
  1829. int DataReq;
  1830.     int CRCErr;
  1831. int OutOfSequenceErr;
  1832. char    ModemCallInfo[208];
  1833.   /* Tx debug params */
  1834. int TxDataErrPackets;
  1835. int TxStatusPackets;
  1836. int TxPPPErrPacket;
  1837. int TxRxErrPacket;
  1838. int TxOverLengthFragment;
  1839. int TxStartFragment;
  1840. int TxStartFragmentErr;
  1841. int TxWholeFragment;
  1842. int TxWholeFragmentErr;
  1843. int TxMidFragment;
  1844. int TxMidFragmentErr;
  1845. int TxEndFragment;
  1846. int TxEndFragmentErr;
  1847.   /* Rx debug params */
  1848.    int RxStartFragment;
  1849. int RxStartFragmentErr;
  1850. int RxEndFragment;
  1851.    int RxWholeFragment;
  1852.    int RxMidFragment;
  1853.    int RxMidFragmentErr;
  1854.    int RxFragmentErr;
  1855. } ;
  1856. typedef struct
  1857. {
  1858. int wm_level;
  1859. }
  1860. TUserModemSetupInfo;
  1861. /*-=-*/
  1862. struct acTModemDebugInfo
  1863. {
  1864. unsigned short InfoSize;
  1865.     unsigned char  DebugInfo[500];
  1866. };
  1867. struct acTL2TPSessionInfo
  1868. {
  1869. char RASDebugMode;
  1870. int status;
  1871. short CId;
  1872. short SId;
  1873.  /* Tx */
  1874. int RxPPPPacket;
  1875.  /* Rx */
  1876. int DiscardFromFIFO;
  1877. int FIFOFullInd;
  1878. int TXPacketsToFIFO;
  1879.  /* Rx debug */
  1880. int NumErrPackets;
  1881. short RxBDFull;
  1882. short RxBufFull;
  1883. int   TxBufFull;
  1884. };
  1885. /* Caller ID (Calling Number Delivery) information */
  1886. struct acTCallerIDMessage
  1887. {
  1888. char Date[5]; /* The caller ID date field (ASCII - MMDD) */
  1889. char Time[5]; /* The caller ID time field (ASCII - HHMM) */
  1890. char Number[21]; /* The calling directory number */
  1891. char Name[51]; /* The caller ID name */
  1892. char Status; /* Caller ID message status */
  1893. char NumberPresent; /* Enumeration for availability of Number */
  1894. char NamePresent;   /* Enumeration for availability of Name */
  1895. int  CIDType; /* Type = 1,2*/
  1896. char IsVMWI;        /* Visual Indicator instead of a message */
  1897. unsigned char VMWIIndicatorStatus; /* Visual Indicator Status ON/OFF */
  1898. int DetectedCallerIDType; /* Caller Id Type (1,2) */ 
  1899. int DetectedCallerIDStandard ; /*Bellcore,ETSI,NTT*/
  1900. /*ETSI*/
  1901. char Called_line_identity[21];
  1902. char Complementary_calling_line_identity[21];
  1903. char Call_type ;/*Enumeration - Call type parameter*/
  1904. char First_call_line_identity[21];
  1905. char Network_system_message_status;
  1906. char Type_of_forwarded_call;/*Enumeration - Type of forwarded call parameter*/
  1907. char Type_of_calling_user ; /*Enumeration - Type of calling user  parameter*/
  1908. char Redirecting_number[21]; 
  1909. struct Extention_Net ExtentionNet;
  1910. int ETSI_Type; /*0=Before_Rings;1=Between_Rings*/
  1911. /*NTT*/
  1912. char Type_of_number;
  1913. char Numbering_plan_identifier[2]; 
  1914. };
  1915. /* Answer Detector event info */
  1916. struct acTAnswerDetectorEventInfo
  1917. {
  1918.     long int TimeSec;
  1919.     short TimeMilliSec;
  1920. };
  1921. /* Pattern Detector event info */
  1922. struct acTPatternDetectorEventInfo
  1923. {
  1924.     int PatternIndex;
  1925.     long int TimeSec;
  1926.     short TimeMilliSec;
  1927. };
  1928. /* Energy Detector event info */
  1929. struct acTEnergyDetectorEventInfo
  1930. {
  1931.     long int TimeSec;
  1932.     short TimeMilliSec;
  1933. };
  1934. typedef enum 
  1935. {
  1936. UPDATED = 0, /*at least one new error message*/
  1937. RTP_PACKET_LOST_MSG = 1,
  1938. DSP_JB_UNDER_RUN_MSG = 2,
  1939. DSP_JB_OVER_RUN_MSG = 3,
  1940. INVALID_G723_CODE_MSG = 4,
  1941. INVALID_SID_LENGTH_MSG = 5,
  1942. HOST_RECEIVE_OVERRUNS_MSG = 6,
  1943. COMMAND_CHECKSUM_ERROR_MSG = 7,
  1944. COMMAND_SEQUENCE_ERROR_MSG = 8,
  1945. MISALIGNMENT_ERROR_MSG = 9,
  1946. PACKET_HEADER_ERROR_MSG = 10,
  1947. INVALID_CID_ERROR_MSG = 11,
  1948. INVALID_RTCP_PACKET_ERROR_MSG = 12,
  1949. RTP_SSRC_ERROR_MSG = 13,
  1950. UNKNOWN_RTP_PAYLOAD_TYPE_ERROR_MSG = 14,
  1951. INVALID_HDLC_PAYLOAD_LEN_MSG = 15,
  1952. INVALID_CELL_CODER_CODE_ERROR_MSG = 16,
  1953. UNRECOGNIZED_FAX_PACKET_ERROR_MSG = 17,
  1954. LOST_FAX_PACKETS_ERROR_MSG = 18,
  1955. UNRECOGNIZED_MODEM_RELAY_PACKET_ERROR_MSG = 19,
  1956. LOST_MODEM_RELAY_PACKET_ERROR_MSG = 20,
  1957. ILLEGAL_COMMAND_ERROR_MSG = 21,
  1958. EIGHT_SEC_TIMEOUT_BEFORE_DCN_ERROR_MSG = 22,
  1959. RTP_PACKET_DUPLICATED_MSG = 23,
  1960. RTP_REORDER_MSG = 24,
  1961. INVALID_CODER_CODE_ERROR_MSG = 25
  1962. } ErrorMessageType;
  1963. /* Caller ID Status fields values (status can also be CALLER_ID_BAD_CHECKSUM + CALLER_ID_NOT_ENDED) */
  1964. #define CALLER_ID_OK 1
  1965. #define CALLER_ID_BAD_CHECKSUM 2
  1966. #define CALLER_ID_NOT_ENDED 3
  1967. /***********************************************************************
  1968.                     SAAL Related Information
  1969. ***********************************************************************/
  1970. struct   AcTSAALEventReport 
  1971. {
  1972.    acTSAALConnID  ConnectionId;  /* ID of connection*/
  1973.    acTSAALReportLbc ReportLbc;/* lower boundry conditions */
  1974.    acTSAALReportUbc ReportUbc; /* Upper boundry conditions */
  1975.    acTSAALReportReason  ReportReason; /* reason parameter value */
  1976. };
  1977. struct acTSAALInfoReport
  1978. {
  1979.      acTSAALConnID  ConnectionId;   /* ID of connection*/
  1980.      unsigned long  RxBytes; /*number of received bytes in valid SD(MU) PDU  */
  1981.      unsigned long  TxBytes;    /*number of transmitted bytes in SD(MU) PDU */
  1982.      unsigned long  error_counter[26]; /* error counters table for errors A..Z */
  1983.      acTSSCOPState SSCOPState;      /* SSCOP current state */
  1984.      acTSSCFState SSCFState; /* SSCF current state */
  1985.      unsigned char  MaalState;   /*MAAL current state*/
  1986.      unsigned long  Vts;           /* VT(S) */
  1987.      unsigned long  Vtps;           /*PT(PS)*/
  1988.      unsigned long  Vta;       /* VT(A)*/
  1989.      unsigned long  Vtpa;        /*VT(PA)*/
  1990.      unsigned long  Vtms;        /*VT(MS)*/
  1991.      unsigned long  Vrr;       /*VR(R)*/
  1992.      unsigned long  Vrh;        /* VR(H)*/
  1993.  unsigned long  Vrmr;        /*VR(MR)*/
  1994. };
  1995. struct acTSAALErrReport
  1996. {
  1997. acTSAALConnID  ConnectionId; /* ID of connection*/
  1998. acTSAALErrCode      Code;        /* error code */
  1999. unsigned long  GapCount;     /* gap sequence count (for error code V only) */
  2000. acTSSCOPState  SSCOPState;  /* SSCOP state */
  2001. };
  2002. /* The Event information union. */
  2003. /* This structure contains the event information for all event types. */
  2004. typedef struct
  2005. {
  2006.     int Type;     /* event type */
  2007.     union {
  2008. struct acTTelephonySignal TelephonySignalInfo;/* TelephonySignal information */
  2009.         struct acTDigit                             DigitInfo;          /* DTMF information */
  2010.         struct acTCallProgressDetectionEventInfo    CallProgressInfo;   /* Call Progress information */
  2011.         struct acTCAS                               CASInfo;            /* CAS information */
  2012. struct acLastReceivedCAS LastReceivedCAS;
  2013.         struct acTFaxStatusInfo                     FaxInfo;            /* Fax Information */
  2014.         struct acTNetworkCASReport                  NetworkCASInfo;     /* Network CAS Information */
  2015. struct acTCallerIDMessage CallerID; /* Caller ID information */
  2016.         struct acTNetworkVoice                      NetworkVoiceInfo;   /* Network Voice Information */
  2017.         struct acTNetworkOAM        NetworkOAM;     /* Network OAM information */
  2018. struct acTPHYStatus PHYStatus; /* ATM PHY error status */
  2019.         struct acT3GRateControl                     RateControlInfo;    /* 3G Rate Control Information */
  2020. #if (AC48X_CURRENT_CONFIG == AC48X_CONFIG_TPAPP)
  2021.         struct acTAnalogFXOStatus AnalogAnicStatus; /* Analog Status information */
  2022.         struct acTAnalogFXSStatus AnalogDuSLICStatus; /* Analog Status information */
  2023. struct acTAnalogReadRegisterStatus AnalogReadRegisterStatus;
  2024. struct acTAnalogGroundKeyDetectionStatus AnalogGroundKeyDetectionStatus;
  2025. struct acTAnalogReversalPolarityStatus AnalogReversalPolarityStatus;
  2026. #endif
  2027.         struct acTVccStatistics                     VccStatistics;
  2028.         struct acTSAALInfoReport                    AtmSAALInfoReport;
  2029.         struct AcTSAALEventReport                   AtmSAALEventReport;
  2030.         struct acTSAALErrReport                     AtmSAALErrReport;
  2031.         struct acTAnswerDetectorEventInfo           AnswerDetectorInfo; /* Answer Detector information */
  2032.         struct acTPatternDetectorEventInfo          PatternDetectorInfo;/* Pattern Detector Information */
  2033.         struct acTEnergyDetectorEventInfo           EnergyDetectorInfo; /* Energy Detector event info */
  2034.    struct acTModemConnectAttr                  ModemConnectAttr;
  2035. struct acTModemEndOfCallInfo                ModemEndOfCallInfo;
  2036. struct acTL2TPSessionInfo                   L2TPSessionInfo;
  2037. struct acTLanQuery LanQueryInfo; /* LAN Query Info*/
  2038. struct acTSpecialInformationTone SpecialInformationTone; /* SIT detection information */
  2039. #if FAX_TERMINATION_SUPPORTED
  2040.         /* IP-MEDIA Fax Termination */
  2041.         struct acTFaxTermReport              FaxTermReport;         /* FaxTermination Events */    
  2042.         struct acTFaxTermStatus       FaxTermSessionStatus; /* FaxTermination session status */
  2043. #endif /* FAX_TERMINATION_SUPPORTED */
  2044.     } u;
  2045. } acTEventInfo;
  2046. /* Event Buffer : */
  2047. typedef struct
  2048. {
  2049.     acTEventInfo    EventBuf[EVENT_BUF_SIZE];   /* event buffer */
  2050. acTEventInfo    *EventBufWrPtr;             /* write pointer to Event buffer */
  2051. acTEventInfo    *EventBufRdPtr;             /* read pointer to Event buffer */
  2052. acTEventInfo    *EventBufEndPtr;            /* end of Event buffer */
  2053. } acTEventBuffer;
  2054. struct TSignalingDetectorsControl
  2055. {
  2056. unsigned MFR1DetectorEnable              : 1;  /*MF R1 register signaling detector*/
  2057. unsigned MFSS5DetectorEnable             : 1;  /*MF SS5 register signaling detector*/
  2058. unsigned MFR2ForwardDetectorEnable       : 1;  /*MF R2 Forward register signaling detector*/
  2059. unsigned MFR2BackwardDetectorEnable      : 1;  /*MF R2 Backward register signaling detector*/
  2060. unsigned R1LineDetectorEnable            : 1;  /*R1 line signaling  detector*/
  2061. unsigned AC15DetectorEnable              : 1;  /*AC15 line Signaling System (2280hz) detector*/
  2062. unsigned SS4DetectorEnable               : 1;  /*Signaling System 4 detector*/
  2063. unsigned SS5DetectorEnable               : 1;  /*Signaling System 5 detector*/
  2064. unsigned R2LineDetectorEnable            : 1;  /*R2 line signaling detector*/
  2065. unsigned DTMFDetectorEnable              : 1;  /*DTMF signaling detector*/
  2066. unsigned CallProgressDetectorEnable      : 1;  /*Call Progress tones detector*/
  2067. unsigned                                 : 1;
  2068. unsigned UserDefinedToneDetectorEnable   : 1;  /*User defined tones detector*/
  2069. unsigned CasDetectionDisable             : 1;  /*CAS Detection enable or Disable */
  2070. };
  2071. struct TUDPAddr
  2072. {
  2073. unsigned long  IPAddr;  /*IP address*/
  2074. unsigned short UDPPort; /*UDP port*/
  2075. };
  2076. /***********************************************************************
  2077.                     PSTN Related Definitions
  2078. ***********************************************************************/
  2079. struct TTrunkPackCfg
  2080. {        
  2081. int    ActiveDevice[MAX_DSP_DEVICES_CAPACITY]; /*number of active AC48x devices;*/
  2082. };
  2083. struct VoicePromptParameters 
  2084. {
  2085. int    VoicePromptSamplesLeft;    /*number of samples left to be played*/
  2086. char   *VoicePromptRdPtr;       /*Read Ptr to next sample to be played*/
  2087. short  VoicePromptPayloadSize;   /*Voice Prompt sample payload size*/
  2088. short  VoicePromptCoder;          /*Voice Prompt coder type */
  2089. };
  2090. /***********************************************************************
  2091.                 Application Related Definitions
  2092. ***********************************************************************/
  2093. enum TCPConectionControl
  2094. {
  2095.     NoTestin=0,
  2096.     InitMGCP=1,
  2097.     TestMGCPConection=2,
  2098.     InitTPNCP=3,
  2099. InitAgg=4,
  2100. InitHB=5
  2101. };
  2102. enum TPCIPacketType
  2103. {
  2104.     PCIVoicePacket=0,
  2105. PCIFaxPacket=2,
  2106. PCIFaxBypassPacket=3,
  2107. PCIModemBypassPacket=4,
  2108. PCIModemPacket=5,
  2109.     PCIT38FaxPacket=6,
  2110.     PCISIDPacket=7,
  2111.     PCIDummyPacket=8,
  2112. Dsp2HostDebugPacket=10,
  2113. Host2DspDebugPacket=11,
  2114. StatisticsDebugPacket=12,
  2115. IncomingRTPDebugPacket=13,
  2116. OutgoingRTPDebugPacket=14,
  2117. OutgoingOMNITELPacket=16,
  2118. Profile2HostDebugPacket=17,
  2119. acChStatusPacket=18,
  2120. acRxChStatusPacket=19,
  2121. acTxChStatusPacket=20,
  2122. OutgoingCASPacket=21,
  2123. acPCIPlayBackPacket=22,
  2124. acPCILastPlayBackPacket=23,
  2125. acPCIPlayBackRequest = 24,
  2126. PCICASConfigurationTable=65,
  2127. PCILastCASConfigurationTable=66,
  2128. PCICallProgressConfigurationTable=67,
  2129. PCILastCallProgressConfigurationTable=68,
  2130. PCIlapdToHost = 69, /* dl2host */
  2131. PCIFXOCoeffientsConfigurationTable=70,
  2132. PCILastFXOCoeffientsConfigurationTable=71,
  2133. PCIFXSCoeffientsConfigurationTable=72,
  2134. PCILastFXSCoeffientsConfigurationTable=73,
  2135. PCIAddVoicePrompt=77,
  2136. PCIAddVoicePromptLastPacket=78,
  2137. PCITAAL5Frame=80,
  2138. /*-=- HDLC*/
  2139. PCIHDLCFrame=81,
  2140. PCIDataTerminalPacket=82,                    
  2141. PCIDataL2TPPacket=83,                    
  2142. /*IP-MEDIA*/
  2143. PCIPlayFileToIP=90,
  2144. PCIPlayFileToIPLastPacket=91,
  2145. PCIRecordFileFromIP=92,
  2146. PCIRecordFileFromIPDummyPacket=93,
  2147. PCIStopPlayFileToIP=94,
  2148. PCIStopRecordFileFromIP=95,
  2149. PCIPlayFileToIPDummyPacket=96,
  2150. acPCIPlayBackPackeToIP=97,
  2151. acPCILastPlayBackPacketToIP=98,
  2152. acPCIPlayBackPacketRequestToIP=99,
  2153.     PCIDBGRecordPacket=100,
  2154.     
  2155. /* IP-MEDIA Fax Termination */
  2156.     PCIFaxTermPacket       = 102,
  2157.     PCIFaxTermSetChParams  = 103,
  2158.     PCIFaxTermGetSessionStatus  = 104,
  2159.     PCIFaxTermSendFax      = 105,
  2160.     PCIFaxTermReceiveFax   = 106,
  2161.     PCIFaxTermAnswerPoll   = 107,
  2162.     PCIFaxTermFileOpen     = 108,
  2163.     PCIFaxTermFileClose    = 109,
  2164.     PCIFaxTermFileSeek     = 110,
  2165.     PCIFaxTermFileRead     = 111,
  2166.     PCIFaxTermFileWrite    = 112,
  2167.     PCIFaxTermTracePacket  = 113,
  2168.     PCIFaxTermDIOReadImage = 114,
  2169.     PCIFaxTermInitSendFax  = 115,
  2170.     PCIFaxTermCancelFax    = 116,
  2171.     PCIFaxTermOpenSession  = 117,
  2172.     PCIFaxTermCloseSession = 118,
  2173.     PCIFaxTermSetRdrData1  = 119,
  2174.     PCIFaxTermSetRdrData2  = 120,
  2175.     PCIFaxTermFileDioImageData1 = 121,
  2176.     PCIFaxTermFileDioImageData2 = 122,
  2177. PCIFaxTermSetUserStatusEvents = 123,
  2178. PCIFaxTermSetNextPageAttrib = 124
  2179.     
  2180. };
  2181. enum TNIPacketType
  2182. {
  2183.     RTPPacketType=0,
  2184. RTCPPacketType=1,
  2185. T38FaxPacketType=2
  2186. };
  2187. /* Not Used ... */
  2188. enum acTConfigurationTablesCatalogBits
  2189. {
  2190.     acCallProgressCatalogBit=1,
  2191.     acCASProtocolCatalogBit=2,
  2192. acFXOCoeffientsCatalogBit=4,
  2193. acFXSCoeffientsCatalogBit=8
  2194. };
  2195. enum acTPlayBargeIn
  2196. {
  2197.     acPlayBargeInOff          = 0,
  2198.     acPlayDTMFBargeIn         = 1,
  2199.     acPlayVoiceBargeIn        = 2,
  2200.     acPlayVoiceAndDTMFBargeIn = 3
  2201. };
  2202. struct TICMPEchoMsg
  2203. {
  2204. unsigned char  MsgType; /*Msg Type (8)*/
  2205. unsigned char  MsgCode; /*Msg Error Code (0)*/
  2206. unsigned short MsgCS;   /*Msg CheckSum*/
  2207. unsigned short ID;      /*Sender's ID (0)*/
  2208. unsigned short SeqNum;  /*Sequence num (0)*/
  2209. unsigned long  Data;    /*Msg Data (can be longer) (0)*/
  2210. };
  2211. struct TPCIPacketHeader
  2212. {
  2213. unsigned char CID;
  2214. unsigned char Length;
  2215. unsigned char SeqNum;
  2216. unsigned char Type;    /*following PCIPacketType*/
  2217. };
  2218. enum ControlMethod
  2219. {
  2220. PCI_CONTROLMETHOD=0,
  2221. TPNCPUDP_CONTROLMETHOD=1,
  2222. TPNCPTCP_CONTROLMETHOD=2
  2223. };
  2224. typedef enum
  2225. {
  2226.   VoicePayloadFormatRTP     = 0,
  2227.   VoicePayloadFormatATM     = 1,
  2228.   VoicePAyloadFormatIllegal = 2
  2229. } TVoicePayloadFormat;
  2230. /***********************************************************************
  2231. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  2232. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  2233. ***********************************************************************
  2234. struct TAppVars was taken out and put into : TpAppVarsTypeDef.h
  2235.                     
  2236. see #include in the beggining of this file
  2237. /***********************************************************************
  2238. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  2239. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  2240. **********************************************************************/
  2241. /***********************************************************************
  2242.                     Channel Related Information
  2243. ***********************************************************************/
  2244. #include "vpTypeDef.h"
  2245. #if (AC48X_CURRENT_CONFIG == AC48X_CONFIG_TPAPP)
  2246. #include "vaTypeDef.h"
  2247. #endif
  2248. #if RAS_IF_SUPPORTED
  2249. #include "rasTypeDef.h"
  2250. #endif
  2251. #include "ACModemDef.h"
  2252. struct  TxChannelEvents
  2253. {
  2254. unsigned PendingIdle : 1; /*=1 if idle command was sended to this channel and the next received packet should be idle.*/  
  2255. unsigned DTMFActivity : 1; /*=1 if DTMF activity session is on.*/
  2256. unsigned CallProgressActive : 1; /*=1 if call progress tone is currently being detected*/
  2257. unsigned BypassNIC : 1; /*=1 in case we want the driver to loopback self originating packets without sending them to MAC*/
  2258. unsigned MonitorSignalingChangesOnly : 1; /*=1 if we are invoking the encoder only to monitor changes in Signaling (CAS,IBS,DTMF)*/
  2259. unsigned BypassOptimizedTx : 1; /* In OPTIMIZED mode: =0 Normal operation, =1 skipthe optimized operation and go to RegularTx() */
  2260. unsigned IBSEventsDetected : 8; /*Indicates that one or more IBS event have been detected within last voice frame */
  2261. unsigned DisablePacketsTransmissionToDSPFlag :1; /* disable Packet transmission to the DSP*/
  2262. unsigned padding : 1;
  2263. };
  2264. struct RxChannelEvents
  2265. {
  2266. unsigned SilencePeriod : 1; /*=1 if we are in silence period due to VAD*/
  2267. unsigned DTMFHangOverStarted : 1; /*=1 after digit turned off*/
  2268. unsigned BrokenConnection : 1; /*=1 if broken connection was detected*/
  2269. unsigned LastDTMF : 1; /*=0 if last packet's DTMF was off, =1 if last packet's DTMF was on*/
  2270.     unsigned BypassOptimizedRx : 1; /* In OPTIMIZED mode: =0 Normal operation, =1 skip the optimized operation and go to RTPDecoder() */
  2271. unsigned ReorderDetected : 1;
  2272. unsigned padding : 10;
  2273. };
  2274. /* Host -> Network (Transmit) Channel Information : */
  2275. struct TTxChannelInfo
  2276. {
  2277. /* Common Channel Info : */
  2278. short  CID; /*channel ID - always the index in RxInfoCh array*/
  2279. char   DTMFRelayEnable; /*=1 if DTMFs should be relayed to remote side (only if DTMFTransportType=1)*/
  2280. char   MFRelayEnable; /*=1 if MFs should be relayed to remote side (only if MFTransportType=1)*/
  2281. char   TelephonySignalRelayEnable;/*=1 if Telephony Signals should be relayed to remote side (only if TelephonySignalType=1)*/
  2282. unsigned short ChannelPacketCount; /*count of DSP packets in 0.5 Sec intervals*/
  2283. short  LastCallProgressTone;/*Last call progress tone that was detected*/
  2284. unsigned short PCISeqNum;   /*PCI Sequence number*/
  2285. /* during playback flag */
  2286. TPlayBackState PlayBackState;
  2287. /* IBS relates parameters */
  2288.     unsigned int LastIBSPcktTimeStamp;  /* Previous IBS packet Time Stamp */
  2289. unsigned int LastSignalCode;        /* DTMF , MF , CPT etc */
  2290. unsigned int LastInterDigitTime;    /* off time between events */
  2291. /* information for Relay Telephony Signals */
  2292. struct acTRelayTelephonySignalInfo RelayTelephonySignalInfo;
  2293. /* Fax related fields */
  2294. enum   TFaxModulation FaxModulationType; /* Fax Data transmit modulation type */
  2295. enum   TFaxMode FaxMode; /*is this calling/answering fax (or not fax at all)*/
  2296. int    NumberOfFaxPages; /*counter for transmitted fax pages (invalid in ECM mode)*/
  2297. /* Channel Event Buffer : */
  2298. acTEventInfo    EventBuf[EVENT_BUF_SIZE];   /* event buffer */
  2299. acTEventInfo    *EventBufWrPtr;             /* write pointer to Event buffer */
  2300. acTEventInfo    *EventBufRdPtr;             /* read pointer to Event buffer */
  2301. acTEventInfo    *EventBufEndPtr;            /* end of Event buffer */
  2302. int             BaseEventMask;              /* only events masked here will signal the user */
  2303. int             EventMask;                  /* Temp Event mask */
  2304. union {
  2305. int channelEventsStatus;
  2306. struct TxChannelEvents channelEventsFlags;
  2307. } channelEvents;
  2308. short FirstV21PreambleDetected; /*we  already  detetect V21 Preamble - added because of bug in the DSP 
  2309.   the 7E Preamble event is generated more than one time*/
  2310. /* Stack-Dependant Channel Info */
  2311. union {
  2312. struct vpTTxChannelInfo vp; /* VoicePacketizer data part */ 
  2313. #if (AC48X_CURRENT_CONFIG == AC48X_CONFIG_TPAPP)
  2314. struct vaTTxChannelInfo va; /* VoiceAtomizer data part */
  2315. #endif
  2316. /* HR! Add RAS dependant structure */
  2317. #if RAS_IF_SUPPORTED
  2318. struct rasTTxChannelInfo ras; /* RAS data part */
  2319. #endif
  2320. } u;
  2321. /*Error Message buffer*/
  2322. unsigned long ErrorMsg[MAX_ERROR_MSG_TYPE_INDEX];
  2323. };
  2324. /* Network -> Host (Receive) Channel Information : */
  2325. struct TRxChannelInfo
  2326. {
  2327. /* Common Channel Info : */
  2328. short  CID;       /*channel ID - always the index in RxInfoCh array*/
  2329. struct VoicePromptParameters   VoicePromptParam ;/* relevant voice prompt parameters*/
  2330. enum   TFaxMode FaxMode;   /* is this calling/answering fax (or not fax at all) */
  2331. /* User Dialing :*/
  2332. enum   TUserDialing UserDialing;  /* User Dialing progress (Dial() or CallProgres() or VoicePrompts() */
  2333. acTUserDialingCmd  UserDialBuf[USER_DIALING_BUF_SIZE];   /* user dialing buffer */
  2334. acTUserDialingCmd  *UserDialBufWrPtr;     /* write pointer to user dialing buffer */
  2335. acTUserDialingCmd  *UserDialBufRdPtr;     /* read pointer to user dialing buffer */
  2336. acTUserDialingCmd  *UserDialBufEndPtr;    /* end of user dialing buffer */
  2337. struct acTCallerIDMessage UserCallerIDBuf;
  2338. /*-=- HDLC*/
  2339. unsigned int HdlcDSPBufferSize;
  2340. union {
  2341. int channelEventsStatus;
  2342. struct RxChannelEvents channelEventsFlags;
  2343. } channelEvents;
  2344. /* Stack-Dependant Channel Info */
  2345. union {
  2346. struct vpTRxChannelInfo vp; /* VoicePacketizer data part */ 
  2347. #if (AC48X_CURRENT_CONFIG == AC48X_CONFIG_TPAPP)
  2348. struct vaTRxChannelInfo va; /* VoiceAtomizer data part */
  2349. #endif
  2350. /* HR! Add RAS dependant structure */
  2351. #if RAS_IF_SUPPORTED
  2352. struct rasTRxChannelInfo ras; /* RAS data part */
  2353. #endif
  2354. } u;
  2355. };
  2356. struct  TVoiceInfo
  2357. {
  2358.         unsigned Coder        : 6;  /*Coder*/
  2359.         unsigned ECE          : 1;  /*Echo Cancler enable*/
  2360.         unsigned SCE          : 2;  /*Silence Compresion Enable*/
  2361.         unsigned PFE          : 1;  /*Post Filter Enable*/
  2362.         unsigned HPFE         : 1;  /*High Pass Filter Enabled*/
  2363.         unsigned FRF_IP       : 1;  /*=0 if FRF.11 compliance, =1 for VoIP IA Compliance*/
  2364.         unsigned M            : 2;  /*Packet multiplication factor-1*/
  2365. unsigned ECHybridLoss : 2;  /*Echo Cancler Hybrid Loss*/
  2366.         unsigned ECNlpMode    : 2;  /*Echo Cancler - Non Linear Processor Mode*/
  2367. unsigned ECLength     : 5;  /*Echo Cancler Length*/
  2368. unsigned ECNBDEnable  : 1;  /*Echo Cancler Narrow Band Enable*/
  2369.         unsigned ECFreeze     : 1;  /*Echo Cancler Freeze*/
  2370. };
  2371. /* Agc Information */
  2372. struct TAgcInfo
  2373. {
  2374.     char   Activate;            /* Agc Enable */
  2375.     char   GainSlope;           /* Gain changing ratio (enum TacAgcEnergySlope) */
  2376.     char   Redirection;         /* Determines the Direction that the AGC works on (1=Network) */
  2377.     char   TargetEnergy;        /* The AGC Target Energy [-dBm] */
  2378. };
  2379. /* Energy detector Information */
  2380. struct TEnergyDetectorInfo
  2381. {
  2382.     char   Activate;            /* Energy Detector Enable */
  2383.     char   QualityFactor;       /* Quality Factor for the Energy Detector (0 - 10) */
  2384.     char   Threshold;           /* Energy detector Threshold */
  2385. };
  2386. /* Energy Detector Quality Factor related DSP parameters */
  2387. struct TEnergyDetectorDSPChannelConfiguration
  2388. {
  2389.     int EnergyDetect_P_MajorityThreshold;
  2390.     int EnergyDetect_N_MajorityFrames;
  2391.     int EnergyDetect_M_AverageDcBuffers;
  2392.     int EnergyDetect_K_ContinuesVoice;
  2393. };
  2394. /* Pattern Detector Information */
  2395. struct TPatternDetectorInfo
  2396. {
  2397.     char   Activate;            /* Pattern Detector Enable */
  2398. };
  2399. /* Answer Detector Information */
  2400. struct TAnswerDetectorInfo
  2401. {
  2402.     char   Activate;            /* Activates the Answer Detector */    
  2403.     char   Redirection;         /* Determine the direction of the Answer Detector (1=Network) */ 
  2404.     int    SilenceTime;         /* Silence duration to decide if End Of Speech [100ms] */
  2405.     int    ActivityDelay;       /* Answer Detector module activation delay [100ms] */
  2406. };
  2407. /* Mediation between Channels structure declarations */
  2408. struct TMediationChannelInfo
  2409. {
  2410. TEndPoint DestEndPoint; /* The Destination End Point type */
  2411. int DestCID; /* The Destination CID */
  2412. char Transcode; /* Is Transcoding required */
  2413. };
  2414. /* 3 Way Conference  */
  2415. struct T3WayConferenceInfo
  2416. {
  2417. Tac3WayConferenceMode ThreeWayConferenceMode; /* The Conference Mode */
  2418. int ConferenceChannel;   /* the channel with whom the conference is performed */
  2419. };
  2420. /* Channel Setup Information : */
  2421. struct TChannelInfo
  2422. {
  2423. int    Active;         /*=1 if active ,=0 if idle*/
  2424. int    RTPActive;      /*=1 if packets are to be sent/received to/from IP*/
  2425.     unsigned int RTPActivateStartTime;  /* Absolute start time of the last RTP Session */
  2426. enum TTestCode TestMode;    /*Voice Test Mode */
  2427. int    PCMTimeSlot;    /*PCM time slot that channel is tuned to*/
  2428. int    TriStateEnable;   /*=1 sets DSP PCM output to 3state between the run command and activation*/
  2429. int    DisableAndTriStateChannelPCMOutput; /* Disable channel output and set to a constant TriState mode (for unused channels) */
  2430. struct TVoiceInfo VoiceCmd;    /*Voice settings for the channel (Coder,SCE etc)*/
  2431. int    TxM;            /*multi frames packing factor - relative to VoIP frame definition (All coders=20msec, G723=30msec)*/
  2432. enum   TSampleBasedCodersRTPPacketInterval SampleBasedCodersRTPPacketInterval; /* The basic frame time (for PCM/ADPCM only) to which TxM relates */
  2433. int    VoiceVolume;    /*Voice Volume*/
  2434. int    InputGain;      /*PCM input gain*/ 
  2435. int    DTMFVolume;     /*DTMF Volume*/
  2436. struct TExtendedFaxModemCmd FaxCmd; /*Fax settings for the channel (Coder,max rate, etc) for 4814*/
  2437. int    FaxBypassM;     /*multi frames packing factor for Fax Bypass- relative to VoIP frame definition*/
  2438. int    FaxRedundancyDepth; /*amount of redundancy for fax relay HS packets*/
  2439. int    EnhancedFaxRedundancyDepth; /*amount of redundancy for fax relay low speed packets*/
  2440. int    ModemRedundancyDepth; /*amount of redundancy for modem relay HS packets*/
  2441. int    UseT38orFRF11;     /*=1 if channel will use T.38 fax relay, =0 if FRF11 fax relay*/   
  2442. enum   TTCFMode    TCFMode;   /*=0 local mode, =1 transferred mode*/
  2443. enum   TIFPTransport    IFPTransport;    /*=0 IFP/UDP,  IFP/TCP*/
  2444. int    T38ProtectionMode; /*0=Redundancy Packets, 1=FEC*/
  2445. int    T38FaxRelayECMMode; /* T38 Fax relay ECM mode : 0=Backward compatible mode, 1=Interoperability mode */
  2446. int    DJBufMinDelay;  /*Dynamic Jitter Buffer Minimum Delay [milisec]*/
  2447. int    DJBufOptFactor; /*Dynamic jitter buffer frame error/delay optimization factor [scale 0-13]*/ 
  2448. int    DTMFTransportType;/*according to enum acTDTMFTransport =0 DTMF relay disabled& erased from audio, =1 DTMF relay (erased from audio), =2 in audio band*/
  2449. int    MFTransportType;/*according to enum acTMFTransport =0 MF relay disabled& erased from audio, =1 MF relay (erased from audio), =2 in audio band*/
  2450. int    TelephonySignalType;/*according to enum acTAnalogTelephonyTransport =0 Telephony Signal relay disabled, =1 Telephony Signal relay enable according to RFC2833*/
  2451. enum acTCallerIDTransport    CallerIDTransportType; /* Caller ID enable/disable and transport type */
  2452. struct TSignalingDetectorsControl  SignalingDetectorsControl; /*Enables/Disables various DTMF,CallProgress,MF,Line signaling detectors. according to TSignalingDetectorsControl structure*/
  2453. unsigned int   RTPSSRC;       /* channel's SSRC*/
  2454. unsigned int   RTPCNAMELength;/* channel's RTCP canonical name length*/ 
  2455. char           RTPCNAME[255]; /* channel's RTCP canonical name*/
  2456.     int            EnableRFC2658Interleaving; /* /*setting the EVRC operation mode according to enum TEVRCMode */
  2457. int    DisableRTCPIntervalRandomization; /* =0 if RTCP packets should be transmitted at a randomized timing (1 for constant timing) */
  2458. int    DisableFirstIncomingPacketDetection; /* =1 if first incoming RTP packet processing should be disabled */
  2459. int    RTPRedundancyDepth;/*apply redundancy sequence per RFC2198 - currently only =1 is supported*/
  2460.     int    RTPRFC2833RedundancyDepth;/*apply redundancy sequence per RFC2198 (Redundancy) according to RFC2833 (DTMF Realy) */
  2461. int    UseNIorPCI;     /*=1 if channel will use NI interface, =0 if PCI interface*/   
  2462. int    UniDirectionalRTP; /*enables one sided RTP stream - according to TUniDirectionalRTPMode*/
  2463. int    CypherType;     /*=0 for no cypher, o.w. according to acTCypherType*/
  2464. int    CypherMode;     /*the mode of the cypher according to acTCypherMode*/
  2465. int    CypherKeyLength;/*length in bytes of cypher key*/
  2466. int    CypherKeyCRC;   /*CRC of cypher key*/
  2467. unsigned char  CypherKey[CYPHER_MAX_KEY_LENGTH];  /*Cypher key (to be used for both encrypt & decrypt)*/
  2468. unsigned char  CypherInitializationVec[CYPHER_BLOCK_SIZE]; /*cypher initialization vector*/
  2469. char   SIDPayloadEnable; /*=1 if we are to send SID packets with RTP SID type */
  2470. int    DisableSoftIPLoopback; /*=1 to send packets destined to ourselves to the NIC. 0=bypass internally*/
  2471. int    IsSCM;          /*=1 if this channel is part of Sub-Channel-Mux bundle, =0 otherwise.*/
  2472. int    SCMAnchor;      /*the channel which is the anchor to Sub-Channel-Mux bundle.*/
  2473. int    TDMBusInputPort; /*MVIP/SC bus Port that channel should listen to */
  2474. int    TDMBusInputChannel; /*MVIP/SC bus Channel that channel should listen to */
  2475. int    TDMBusOutputPort; /*MVIP/SC bus Port that channel should transmit to */
  2476. int    TDMBusOutputChannel; /*MVIP/SC bus Channel that channel should transmit to */
  2477. int    TDMBusOutputDisable; /*disable Output for MVIP/SC bus Channel */
  2478. unsigned int LocalIPAddr; /*The local IP Address (as used by network driver)*/
  2479. struct TUDPAddr LocalRTP;   /*local side's RTP port*/
  2480. struct TUDPAddr RemoteRTP;  /*remote side's RTP port*/
  2481. struct TUDPAddr RemoteRTCP; /*remote side's RTCP port*/
  2482. struct TUDPAddr RemoteT38;  /*remote side's T38 port*/
  2483. struct TUDPAddr LocalL2TP; /* LAC address */
  2484. struct TUDPAddr RemoteL2TP; /* LNS address */
  2485. short  TxCID;          /*connect to which channel*/
  2486. unsigned int FlashHookPeriod;  /* hook flash time in msec */
  2487. int    PCMToPCMTimeSlot;    /*PCM to PCM time slot that channel is tuned to*/
  2488.     char   PcmToPcmEnable;      /* Pcm To Pcm Enable (1=Enable) */
  2489. char   SUMC  ; /*Summation Configuration, this field is valid only if PcmToPcmEnable = 1*/
  2490. char   IBSDRedirection;     /* IBS Detection Redirection (=0 for PCM side, =1 for IP side =2 from both sides) */
  2491.     int    PlayBargeIn;         /* Determines whether the Play will be stoped by voice or DTMF barge-Ins */
  2492.     int    VoicePromptBargeIn;  /* Determines whether the PlayVoicePrompt will be stoped by voice or DTMF barge-Ins */
  2493.     struct TAgcInfo AgcInfo;    /* Agc Information */
  2494.     struct TEnergyDetectorInfo EnergyDetectorInfo; /* Energy detector Information */
  2495.     struct TPatternDetectorInfo PatternDetectorInfo; /* Pattern Detector Information */
  2496.     struct TAnswerDetectorInfo AnswerDetectorInfo; /* Answer Detector Information */
  2497. acTFile2NI File2NIActive;   /*=1 if File to NI activity session is on.*/
  2498. int    L2TPActive; /* indicates the status of logical channel related to Data transfer.
  2499.                       Possible values (0-inactive; 1-LCP in progress; 2-L2TP active)*/
  2500. /*-=-*/
  2501. char   ProxyLCPActive; /* indicates the status of logical channel related to LCP-Data
  2502.       transfer. (0-inactive or LCP finished ; 1-LCP in progress) */
  2503. char   TerminalActive; /* indicates the status of logical channel related to Terminal-Data
  2504.       transfer. (0-inactive or Terminal mode finished ; 1-Terminal is active) */
  2505. /* HR! Changed NetworkType to ChannelType */
  2506.     /* ATM specific information (only for the new devices) : */
  2507. acTNetwork      ChannelType;                /* IP / ATM */
  2508.     int             ATMActive;                  /* =1 if active ,=0 if idle */
  2509.     short           VCCID;                      /* Vcc identifier of the ATM VC in which this AAL2 channel is to reside */
  2510.     char            AAL2TxCID;                  /* AAL2 CID number associated with this Tx AAL2 channel */
  2511.     char            AAL2RxCID;                  /* AAL2 CID number associated with this Rx AAL2 channel */
  2512.     char            ProfileID;                  /* Profile ID caculated according to Group + Specific Profile ID */
  2513.     int             ProfileEntry;               /* Entry line number in the specific profile */
  2514.     char            PCMCoderType;               /* Alaw or MUlaw */
  2515.     acTAAL2CASRelayMode CASRelayMode;               /* according to vaTCASRelayMode -- ATM  */
  2516. acTCASMode CASRelayTransportMode;  /*Enable / Disable the CAS relay mode -- VoIP*/
  2517.     char            EnableNetworkCASEvent;      /* Enable of AAL2 CAS events to User */
  2518.     acTAAL2ProtocolType AAL2ProtocolType;           /* SSCS, SSSAR Transparent mode or SSSAR Support mode */ 
  2519. /* Agg Channel Info : */
  2520.     enum acTAggDeliveryMethod AggDeliveryMethod;
  2521. /* HR! RAS Settings */
  2522. #if RAS_IF_SUPPORTED
  2523. TRASConnType    RAS_call_type;
  2524. #endif
  2525. TacModemChannelAttr ModemSetup;
  2526. unsigned short L2TPTunnelID;               /* L2TP tunnel Index */
  2527. unsigned char   L2TPHandleHDLC;
  2528. /*-=- =1 for VoIP and =0 for RAS */
  2529. char CASBouncingEnable;
  2530. unsigned char RASDebugMode; /* if =1, channel & session DEBUG statistics
  2531. are added to MANDATORY statistics that sent to control-user at end of call */  
  2532. /*-=- HDLC handling*/
  2533. char HdlcMonitoringOnly; /*=1 if we are invoking the encoder only to monitor HDLC framing*/
  2534. char HDLCFramingAbility; /* 1- Process HDLC frames, 0 Avoid */
  2535. THdlcRate HdlcRate; /* HDLC rate */
  2536. int HdlcMNEF; /* Min number of Frame end flags*/
  2537. int HdlcMinFrameLen; /* Min. HDLC Message length */
  2538. THdlcIfpPattern IFP; /* Interframe fill pattern */
  2539. int             DeviceIndex;     /* The DSP Device Index associated with this channel */
  2540.     char            SendDummyPackets;   /*1=Sending Dummy packets to the PCI during silnece */
  2541.     int             MonitorSignalingChangesOnly;
  2542.     unsigned int    RTPDTMFRFC2833PayloadType ;
  2543. unsigned int    RTPRedundancyRFC2198PayloadType;
  2544. unsigned int FaxByPassPayloadType;
  2545.     int             CIDType ;
  2546. char            NOB ; /*used for the BFI payload in case of Zero Copy Mode , its value should be ChInfo[].VoiceCmd.M + 1 */
  2547.         /* IP-MEDIA Fax Termination */
  2548. enum TFaxEngineMode FaxEngineMode;
  2549.     enum TToneDirection FaxDirection;
  2550. int TFOV;
  2551. /* PlayBack Speed control */
  2552. TPlayBackSpeed PlayBackSpeed;
  2553. TPlayBackMode PlayBackMode;
  2554. TacControl PlayBackSpeedControl;
  2555. int PlayBackWatermark;
  2556. struct TMediationChannelInfo MediaChInfo; /* Mediation between Channels Information */
  2557. char P2PCoder; /* Packet To Packet coder type */
  2558. char PreviousP2PCoder;  /*in case of voice prompy to network we should save the old P2PCoder to restore */
  2559. TVoicePayloadFormat   VoicePayloadFormat; /* support CISCO RTP compatible mode for G726/G727 coders; default 0 = regular RTP  ,1 = CISCO mode*/
  2560. struct T3WayConferenceInfo ThreeWayConferenceInfo; /* Three Way Conferencing configuration */
  2561. TacCNGDetectorMode CNGDetectorMode; /* CNG Detection Control*/
  2562. TSIDNumberCoefficients SIDCoefficientsNumber; /* Number of coefficients sent to describe silence in SID (Silence Indicator) payload*/
  2563. };
  2564. typedef struct TChannelInfo TUserChannelSetupInfo;
  2565. /* Device Info - contains information about the DSP devices */
  2566. struct TDeviceInfo
  2567. {
  2568. int DeviceDescriptor; /* Index into the acDLDescriptor table */
  2569. short FirstCID; /* First (lowest) Channel ID associated with this device */
  2570. int NumberOfChannels; /* Number of channels supported by this device */
  2571. char *MainDL;
  2572. char *BootDL;
  2573. char *BitDL;
  2574.     int PatternDetectorThreshold; /* Pattern Detector number of cons. pattern the send event */
  2575. int DspFatalErrorsCount;
  2576. };
  2577. typedef struct 
  2578. {
  2579.     CMD_CH_SEND ChannelSetupCommandRequired;
  2580. CMD_CH_SEND ChannelECCommandRequired;
  2581. CMD_CH_SEND ChannelRelayCommandRequired;
  2582. } TChannelCurrentCommand;
  2583. #endif   /*end of #ifndef TYPEDEF_H*/