中航光电的中间件仓库

ipmlib.h 50KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389
  1. /*********************************************************************/
  2. /* EhangCom: API Head file
  3. *
  4. * FILE: ipmlib.h
  5. * DESCRIPTION: Header File for EhangCom ipm library
  6. *
  7. * Copyright (c) 2004-2043 EhangCom Corp. All Rights Reserved
  8. *
  9. * THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF EhangCom Corp.
  10. * The copyright notice above does not evidence any actual or
  11. * intended publication of such source code.
  12. */
  13. /********************************************************************/
  14. #ifndef __IPMLIB_H__
  15. #define __IPMLIB_H__
  16. #ifndef u8
  17. #define u8 CHAR
  18. #endif
  19. #ifndef u16
  20. #define u16 USHORT
  21. #endif
  22. #define MAX_IPM_DIGITS 0x20
  23. #pragma pack(1)
  24. typedef enum{
  25. Precedence_Routine = 0x00,
  26. Precedence_FlashOverride,
  27. Precedence_Immediate,
  28. Precedence_InternetworkControl,
  29. Precedence_Priority,
  30. Precedence_CRITIC_ECP,
  31. Precedence_Flash,
  32. Precedence_NetworkControl,
  33. }ePRECEDENCE;
  34. #ifndef AUDIOCODEC_DEF
  35. #define AUDIOCODEC_DEF 1
  36. typedef enum{
  37. AudioCodec_G711_ALAW_20MS = 0x00,
  38. AudioCodec_G711_ULAW_20MS = 0x01,
  39. AudioCodec_G726_16_20MS = 0x02,
  40. AudioCodec_G726_24_20MS = 0x03,
  41. AudioCodec_G726_32_20MS = 0x04,
  42. AudioCodec_G726_40_20MS = 0x05,
  43. AudioCodec_G727_16_20MS = 0x06,
  44. AudioCodec_G727_24_16_20MS = 0x07,
  45. AudioCodec_G727_24_20MS = 0x08,
  46. AudioCodec_G727_32_16_20MS = 0x09,
  47. AudioCodec_G727_32_24_20MS = 0x0a,
  48. AudioCodec_G727_32_20MS = 0x0b,
  49. AudioCodec_G727_40_16_20MS = 0x0c,
  50. AudioCodec_G727_40_24_20MS = 0x0d,
  51. AudioCodec_G727_40_32_20MS = 0x0e,
  52. AudioCodec_G723_5_3_30MS = 0x0f,
  53. AudioCodec_G723_6_3_30MS = 0x10,
  54. AudioCodec_G729_20MS = 0x11,
  55. AudioCodec_G711_ALAW_30MS = 0x12,
  56. AudioCodec_iLBC_20MS = 0x13,
  57. AudioCodec_iLBC_30MS = 0x14,
  58. AudioCodec_CLEAR_CHANNEL = 0x15,
  59. AudioCodec_GSM_FR = 0x16,
  60. AudioCodec_GSM_EFR = 0x17,
  61. AudioCodec_AMR_475_OA = 0x18,
  62. AudioCodec_AMR_515_OA = 0x19,/* 25 */
  63. AudioCodec_AMR_590_OA = 0x1a,
  64. AudioCodec_AMR_670_OA = 0x1b,
  65. AudioCodec_AMR_740_OA = 0x1c,
  66. AudioCodec_AMR_795_OA = 0x1d,
  67. AudioCodec_AMR_102_OA = 0x1e,/* 30 */
  68. AudioCodec_AMR_122_OA = 0x1f,
  69. AudioCodec_AMR_475_BE = 0x20,
  70. AudioCodec_AMR_515_BE = 0x21,
  71. AudioCodec_AMR_590_BE = 0x22,
  72. AudioCodec_AMR_670_BE = 0x23,/* 35 */
  73. AudioCodec_AMR_740_BE = 0x24,
  74. AudioCodec_AMR_795_BE = 0x25,
  75. AudioCodec_AMR_102_BE = 0x26,
  76. AudioCodec_AMR_122_BE = 0x27,/* 39 */
  77. AudioCodec_AMR_WB_66_BE = 0x28,
  78. AudioCodec_AMR_WB_885_BE = 0x29,
  79. AudioCodec_AMR_WB_1265_BE = 0x2A,
  80. AudioCodec_AMR_WB_1425_BE = 0x2B,
  81. AudioCodec_AMR_WB_1585_BE = 0x2C,
  82. AudioCodec_AMR_WB_1825_BE = 0x2D,
  83. AudioCodec_AMR_WB_1985_BE = 0x2E,
  84. AudioCodec_AMR_WB_2305_BE = 0x2F,
  85. AudioCodec_AMR_WB_2385_BE = 0x30,
  86. AudioCodec_AMR_WB_66_OA = 0x31,
  87. AudioCodec_AMR_WB_885_OA = 0x32,
  88. AudioCodec_AMR_WB_1265_OA = 0x33,
  89. AudioCodec_AMR_WB_1425_OA = 0x34,
  90. AudioCodec_AMR_WB_1585_OA = 0x35,
  91. AudioCodec_AMR_WB_1825_OA = 0x36,
  92. AudioCodec_AMR_WB_1985_OA = 0x37,
  93. AudioCodec_AMR_WB_2305_OA = 0x38,
  94. AudioCodec_AMR_WB_2385_OA = 0x39,
  95. AudioCodec_SILK_8KSS_20MS = 0x3A, //8K采样 [2015-4-28]
  96. AudioCodec_SILK_16KSS_20MS = 0x3B, //16K采样[2015-4-28]
  97. AudioCodec_OPUS_8KSS_20MS = 0x3C, //8K采样 [2015-4-28]
  98. AudioCodec_OPUS_16KSS_20MS = 0x3D, //16K采样[2015-4-28]
  99. AudioCodec_MaxNum, //This item is not a valid codec
  100. }eAUDIOCODEC;
  101. #endif
  102. // Type of Service
  103. typedef struct {
  104. u8 Valid; // Flag for validity of this structure,0 Invalidity, 1 Validity
  105. u8 Precedence; // Precedence. Refer to ePRECEDENCE
  106. u8 LowDelay; // Flag for low delay. 0 Normal delay ,1 Low delay
  107. u8 HighThroughout; // Flag for high throughout rate 0 Normal throughout rate 1 High throughout rate
  108. u8 HighReliability; // Flag for high reliability.0 Ordinary reliability 1 High reliability
  109. u8 LowCost; // Flag for low costs.
  110. // 0 ordinary costs
  111. // 1 low costs
  112. } IpConfig_TOS;
  113. // UDP Source Port Valid
  114. typedef struct {
  115. u8 Valid; // Flag for validity of this structure.
  116. u8 SourcePortValid; // Executes source port check.0 No execution1 Execution
  117. } IpConfig_UDPSourcePortValid;
  118. // Initial Media Inactivity Timeout
  119. typedef struct {
  120. u8 Valid; // Flag for validity of this structure // 0 Invalidity // 1 Validity
  121. u16 IMID; // Timeout value of the timer for initial media data inactivity detection in 10ms// 0 Deactivation// 1 Activation
  122. } IpConfig_IMID;
  123. // Media Inactivity Detection timer
  124. typedef struct {
  125. u8 Valid; // // Flag for validity of this structure.// 0 Invalidity// 1 Validity
  126. u16 MID; //// Timer for media inactivity detection in 10ms.// 0 Deactivation// 1 Activation
  127. } IpConfig_MID;
  128. typedef struct {
  129. IpConfig_TOS TOS; // TOS configuration information
  130. IpConfig_UDPSourcePortValid UDPSrcPortValid; // UDP source port check configuration
  131. IpConfig_IMID IMID; //Information about configuration of initial media inactivity detection
  132. IpConfig_MID MID; // Information about configuration of media inactivity detection
  133. } GeneralIpConfig;
  134. // Fax Type
  135. typedef struct {
  136. u8 Valid; // // Flag for validity of this structure.// 0 Invalidity// 1 Validity
  137. u8 FaxType; // // Fax configuration type. It includes the following:// 0 Disabling faxing;// 1 Relay (enabling the T.38 fax trunk);// 2 Bypass (fax bypass)
  138. } FaxConfig_FaxType;
  139. // Fax Bypass coder Type
  140. typedef struct {
  141. u8 Valid; // Flag for validity of this structure.// 0 Invalidity// 1 Validity
  142. u8 Decoder; // Voice codec type when the Fax type is Bypass
  143. u8 FaxBypassM; // Frame magnification in the range of 1-8
  144. } FaxConfig_BypassCoder;
  145. // T.38 FaxRelay ECM Mode
  146. typedef struct {
  147. u8 Valid; // Flag for validity of this structure.// 0 Invalidity// 1 Validity
  148. u8 EcmComptMode; // ECM compatibility mode.// 0 Backward compatibility// 1 Interoperability
  149. } FaxConfig_CompMode;
  150. //UDP Port Configuration
  151. typedef struct {
  152. u8 Valid; // Flag for validity of this structure.// 0 Invalidity// 1 Validity
  153. u16 UdpPort; // Udp port number
  154. } IpConfig_UdpPort;
  155. typedef struct {
  156. FaxConfig_FaxType FaxType; // Fax type
  157. FaxConfig_BypassCoder BypassCoder; // Bypass Coder
  158. FaxConfig_CompMode CompMode; // T.38 FaxRelay ECM Mode
  159. IpConfig_UdpPort SrcT38Port; // Src T.38 port
  160. IpConfig_UdpPort DstT38Port; // Dst T.38 port
  161. } FaxAttributeConfig;
  162. // RTP Payload Type
  163. typedef struct {
  164. u8 Valid; // Flag for validity of this structure.// 0 Invalidity// 1 Validity
  165. u8 PaylaodType; //Paylaod type
  166. } VoiceConfig_PayloadType;
  167. // RTP Payload size
  168. typedef struct {
  169. u8 Valid; // Flag for validity of this structure.// 0 Invalidity// 1 Validity
  170. u8 PayloadSize; //Payload basis package length magnification in the range of 1-8.// The default is 1
  171. } VoiceConfig_PayloadSize;
  172. // RTP Silence suppression
  173. typedef struct {
  174. u8 Valid; // Flag for validity of this structure.// 0 Invalidity// 1 Validity
  175. u8 SilenceSuppress; // Flag for activation of silence suppression.// 0 Disable silence suppression// 1 Enalbe silence suppression
  176. } VoiceConfig_SilenceSuppress;
  177. // RTP Echo Cancellation
  178. typedef struct {
  179. u8 Valid; // Flag for validity of this structure.// 0 Invalidity// 1 Validity
  180. u8 EchoCancel; // Flag for activation of echo cancelation.// 0 Disbale echo cancelation// 1 Enbale echo cancelation
  181. u8 EchoCancellerLength;// Echo cancelation length
  182. } VoiceConfig_EchoCancel;
  183. // Max Jitter buffer delay
  184. typedef struct {
  185. u8 Valid; // Flag for validity of this structure.// 0 Invalidity// 1 Validity
  186. u16 Value; // Jitter buffer delay value
  187. } VoiceConfig_JitterBufferDelay;
  188. // Jitter buffer adaptation Rate
  189. typedef struct {
  190. u8 Valid; // Flag for validity of this structure.// 0 Invalidity// 1 Validity
  191. u8 Value; // Adaptation rate in the range of 0-13ms
  192. } VoiceConfig_AdaptationRate;
  193. typedef struct {
  194. VoiceConfig_PayloadType PayloadType; // // Payload type
  195. VoiceConfig_PayloadSize PayloadSize; // Payload size
  196. VoiceConfig_SilenceSuppress SilenceSuppress; // Flag for silence suppression
  197. VoiceConfig_EchoCancel EchoCancel; // Flag for echo cancelation
  198. VoiceConfig_JitterBufferDelay MinJitterBuffer;// Minimum jitter buffer delay
  199. VoiceConfig_JitterBufferDelay MaxJitterBuffer;// Maximum jitter buffer delay:80 ~ 300
  200. VoiceConfig_AdaptationRate AdaptationRate; // Jitter buffer adaptation rate
  201. IpConfig_UdpPort SrcRTCPPort; // Source RTCP port number
  202. IpConfig_UdpPort DstRTCPPort; // Destination RTCP port number
  203. } VoiceAttributeConfig;
  204. typedef enum {
  205. DRM_ERASE_AND_NOT_RELAY = 0x00,
  206. DRM_ERASE_AND_RELAY = 0x01,
  207. DRM_KEEP_AND_NOT_RELAY = 0x02,
  208. DRM_ERASE_AND_RELAY_RFC2833 = 0x03
  209. } eDigitRelayMode;
  210. // DTMF Trunk Type
  211. typedef struct {
  212. u8 Valid; // Flag for validity of this structure.// 0 Invalidity// 1 Validity
  213. u8 DigitRelayMode; /* DTMF/MF trunk mode
  214. 0x00:erase DTMF/MF from audio stream and do not relay
  215. 0x01:erase DTMF/MF from audio stream and relay to remote
  216. 0x02:keep DTMF/MF in audio stream - do not relay
  217. 0x03:erase DTMF/MF from audio stream and relay to remote - according to RFC2833
  218. */
  219. } DtmfConfig_DigitRelay;
  220. // RFC2833 payload size
  221. typedef struct {
  222. u8 Valid; // Flag for validity of this structure.// 0 Invalidity// 1 Validity
  223. u8 DynamicPayload; // RFC2833 payload size in the range of 96-127
  224. } DtmfConfig_Dynamic_Payload;
  225. typedef struct {
  226. DtmfConfig_DigitRelay DigitRelay; // DTMF trunk type
  227. DtmfConfig_Dynamic_Payload DynamicPayload; //
  228. } DtmfConfig;
  229. //RTP packet redundancy class
  230. typedef struct {
  231. u8 Valid; // Flag for validity of this structure.// 0 Invalidity// 1 Validity
  232. u8 RedundancyDepth; // Redundancy class.// 0 No redundancy// 1 Redundancy class 1
  233. } Rfc2198Config_RTPPacketDepth;
  234. // FAX packet redundancy class
  235. typedef struct {
  236. u8 Valid; // Flag for validity of this structure.// 0 Invalidity// 1 Validity
  237. u8 RedundancyDepth; // Redundancy class.// 0 No redundancy// 1 Redundancy class 1// 2 Redundancy class 2
  238. } Rfc2198Config_FaxPacketDepth;
  239. // RFC2833 redundancy class
  240. typedef struct {
  241. u8 Valid; // Flag for validity of this structure.// 0 Invalidity// 1 Validity
  242. u8 RedundancyDepth; // redundancy class in the range of 0-3.// 0 No redundancy// 1 Redundancy 1// 2 Redundancy 2// 3 Redundancy 3
  243. } Rfc2198Config_Rfc2833PacketDepth;
  244. // RFC2198 packet load size
  245. typedef struct {
  246. u8 Valid; // Flag for validity of this structure.// 0 Invalidity// 1 Validity
  247. u8 DynamicPayload; // rfc2198 Dynamic payload size in the range of 96-127
  248. } Rfc2198Config_DynamicPayload;
  249. typedef struct {
  250. Rfc2198Config_RTPPacketDepth RtpPacketDepth; //RTP packet redundancy class
  251. Rfc2198Config_FaxPacketDepth FaxPacketDepth; //FAX packet redundancy class
  252. Rfc2198Config_Rfc2833PacketDepth Rfc2833PacketDepth; //RFC2833 redundancy class
  253. Rfc2198Config_DynamicPayload DynamicPayload; //RFC2198 packet payload size
  254. } Rfc2198Config;
  255. // Answer detector configuration information
  256. typedef struct {
  257. u8 Valid; // Flag for validity of this structure.// 0 Invalidity// 1 Validity
  258. u8 Active; // // Whether the answer detector is activated.// 0 Stop// 1 Active
  259. u8 ActivityDelay; // Activation delay of the answer detector in 100ms
  260. u8 Redirection; // Ditection direction.// 0 PCM// 1 IP network
  261. u8 SilenceTime; // Detects whether it is the voice end silence time in 100ms
  262. } IpMedia_AnswerDetectorInfo;
  263. // Automatic gain control configuration information
  264. typedef struct {
  265. u8 Valid; // Flag for validity of this structure.// 0 Invalidity// 1 Validity
  266. u8 Active; // // Flag for activation of AGC.// 0 Stop// 1 Active
  267. u8 GainSlop; // AGC gain adjustment slope in 1dBm/sec. The default is 3
  268. u8 Redirection; // AGC control direction.// 0 PCM// 1 IP network
  269. u8 TargetEnergy; // AGC target energy in –dBm. The default is 19
  270. } IpMedia_AgcInfo ;
  271. // Energy detector configuration information
  272. typedef struct {
  273. u8 Valid; // Flag for validity of this structure.// 0 Invalidity// 1 Validity
  274. u8 Active; // Flag for activation.// 0 Stop// 1 Active
  275. u8 Threshold; // Energy detection threshold
  276. u8 QualifyFactor; // Detection sensitiveness in the range of 0-10.// 0 and 10 indicate the minimum and maximum// sensitiveness respectively
  277. } IpMedia_EnergyDetectorInfo;
  278. typedef struct {
  279. IpMedia_AnswerDetectorInfo AnswerDetector; // Answer detector configuration information
  280. IpMedia_AgcInfo Agc; //Automatic gain control configuration information
  281. IpMedia_EnergyDetectorInfo EnergyDetector; // Energy detector configuration information
  282. } IpMediaConfig;
  283. typedef struct {
  284. u8 Valid; // Flag for validity of this structure.// 0 Invalidity// 1 Validity
  285. CHAR IpAddr[32]; //IP address
  286. } IpConfig_IP_addr;
  287. typedef enum{
  288. ConnMode_FullDup, //Full duplex
  289. ConnMode_RecvOnly, //Listening only
  290. ConnMode_SendOnly, //Speaking only
  291. ConnMode_Hold, //Hold. No voice data is received/sent
  292. }eCONN_MODE;
  293. typedef struct{
  294. IpConfig_IP_addr DstIpAddr;
  295. IpConfig_UdpPort DstRtpPort;
  296. UCHAR ConnMode;
  297. GeneralIpConfig GenIpCfg;
  298. FaxAttributeConfig FaxCfg;
  299. VoiceAttributeConfig VoiceCfg;
  300. DtmfConfig DtmfCfg;
  301. Rfc2198Config Rfc2189Cfg;
  302. IpMediaConfig IpMediaCfg;
  303. IpConfig_UdpPort SrcRtpPort;
  304. }XOIP_CFG;
  305. typedef struct{
  306. UINT LostPacket;
  307. UINT Jitter;
  308. UINT RoundTripLatency;
  309. }XOIP_QOS_INFO;
  310. typedef struct{
  311. UINT unLocalSR_TimeStamp;
  312. UINT unLocalSR_TxPackets;
  313. UINT unLocalSR_TxOctets;
  314. UINT unLocalSR_SendIndication;
  315. UINT unLocalRR_FractionLost;
  316. UINT unLocalRR_CumulativeLost;
  317. UINT unLocalRR_SeqNumber;
  318. UINT unLocalRR_ValidInfo;
  319. UINT unRemoteSR_TimeStamp;
  320. UINT unRemoteSR_TxPackets;
  321. UINT unRemoteSR_TxOctets;
  322. UINT unRemoteSR_SendIndication;
  323. UINT unRemoteRR_FractionLost;
  324. UINT unRemoteRR_CumulativeLost;
  325. UINT unRemoteRR_SeqNumber;
  326. UINT unRemoteRR_ValidInfo;
  327. } XOIP_RTCP_SESSION_INFO;
  328. typedef struct{
  329. XOIP_QOS_INFO QosInfo;
  330. XOIP_RTCP_SESSION_INFO RtcpInfo;
  331. }XOIP_SESSION_INFO;
  332. typedef struct{
  333. IpConfig_IP_addr IpAddr;
  334. IpConfig_UdpPort RtpPort;
  335. }XOIP_SRCADD;
  336. /************************************************************************/
  337. /*
  338. Description
  339. This structure is IPMEV_ANSWER event data and provides answer state and remote address information.
  340. The NAT penetration function can be achieved by using this information.
  341. Field Description
  342. The data fields of IPMEV_ANSWER_INFO are described as follows:
  343. ucEvtType: Is used to indicate answer detection. That is, 0 - voice stops, 1 - voice starts
  344. RemoteIpAddr: Remote IP address
  345. RemoteUdpPort: Remote port number
  346. */
  347. /************************************************************************/
  348. typedef struct{
  349. UCHAR ucEvtType; //Is used to indicate answer detection.//That is, 0 - voice stop, 1 - voice start
  350. char RemoteIpAddr[EHANG_MAX_IP_LEN]; //Remote IP address
  351. USHORT RemoteUdpPort; //Remote port number
  352. } IPMEV_ANSWER_INFO;
  353. /*ISXE_ipm_SetParam() function paramter*/
  354. #define IPM_PARMID_RTP_CODEC 0 //ISXE_ipm_SetParam() function param id. refer to IPM_RTP_CODEC_PARM
  355. #define IPM_PARMID_RTPS_PARAM_4RTP 1 //ISXE_ipm_SetParam() function param id. refer to RTPS_PARAM
  356. #define IPM_PARMID_RTPS_PARAM_4RTCP 2 //ISXE_ipm_SetParam() function param id. refer to RTPS_PARAM
  357. typedef struct{
  358. UCHAR ucCodec; //voice codec, refer to eAUDIOCODEC
  359. UCHAR ucPayload; //RTP payload type.
  360. //VOID* pCodecParam;
  361. }IPM_RTP_CODEC_PARM;
  362. //////////////////////////////////////////////////////////////////////////
  363. //Rtp Proxy data struct
  364. #ifndef EV_RTPPROXY
  365. #define EV_RTPPROXY 0x0001
  366. #endif
  367. typedef enum {
  368. RTPS_CHAN_TYPE_NAT_NULL = 0, //NAT:没有状态,直接在WAN/LAN间转发包;只修改包的MAC/IP/UDP,不修改RTP部分;
  369. RTPS_CHAN_TYPE_NAT_WANCROSS = 1, //NAT带WAN口穿透功能:功能与NAT相同,支持WAN口穿透;
  370. RTPS_CHAN_TYPE_NBUP = 2 //NbUP:在WAN口支持NbUP协议;只有NbUP连接建立后,才开始启动WAN/LAN的包转发功能。
  371. //在转发中除了修改MAC/IP/UDP,还会修改RTP头的内容;在LAN->WAN过程中,要增加NbUP的头;
  372. //在WAN->LAN过程中,要消除NbUP头。
  373. } eRTPS_CHAN_TYPE;
  374. typedef struct {
  375. CHAR IpAddr[32];
  376. USHORT UdpPort;
  377. } RTPS_ENDPOINT;
  378. /* NbUP Coder类型定义 */
  379. typedef enum {
  380. NBUP_VOCODER_NONE = 0x00000000,
  381. NBUP_VOCODER_GSM_AMR_12_2Kbps = 0x00000001,
  382. NBUP_VOCODER_GSM_AMR_10_2Kbps = 0x00000002,
  383. NBUP_VOCODER_GSM_AMR_7_95Kbps = 0x00000004,
  384. NBUP_VOCODER_GSM_AMR_7_4Kbps = 0x00000008,
  385. NBUP_VOCODER_GSM_AMR_6_7Kbps = 0x00000010,
  386. NBUP_VOCODER_GSM_AMR_5_9Kbps = 0x00000020,
  387. NBUP_VOCODER_GSM_AMR_5_15Kbps = 0x00000040,
  388. NBUP_VOCODER_GSM_AMR_4_75Kbps = 0x00000080,
  389. NBUP_VOCODER_GSM_AMR_SID = 0x00000100,
  390. NBUP_VOCODER_SILENCE = 0x00000200,
  391. NBUP_VOCODER_G711_5MS = 0x00000400,
  392. NBUP_VOCODER_G711_20MS = 0x00000800
  393. }eRTPS_NBUP_CODER;
  394. //注意:
  395. //Coder分成两类,不要混合使用:
  396. //AMR:可以有NBUP_VOCODER_GSM_AMR_12_2Kbps~NBUP_VOCODER_SILENCE;
  397. //G.711:NBUP_VOCODER_G711_5MS和NBUP_VOCODER_G711_20MS。
  398. #define MAX_RTPS_NBUP_CODERS 16 /* Coder的最大数量 */
  399. typedef struct {
  400. UINT nCoder; //refer to eRTPS_NBUP_CODER
  401. UINT CoderType[MAX_RTPS_NBUP_CODERS];
  402. } RTPS_NBUP_CODER, *PRTPS_NBUP_CODER;
  403. /* NbUP在数据传输时采用的PDU类型定义 */
  404. typedef enum {
  405. RTPS_NBUP_MEDIA_PDU_TYPE_0 = 0, /* 带CRC校验的数据传输方式 */
  406. RTPS_NBUP_MEDIA_PDU_TYPE_1 = 1, /* 不带CRC校验的数据传输方式 */
  407. MAX_RTPS_NBUP_MEDIA_PDU_TYPES
  408. }eRTPS_NBUP_MEDIA_PDU_TYPE;
  409. /* Start命令中,NbUP的参数 */
  410. typedef struct {
  411. UCHAR wanPT; /* 发送包的PayloadType */
  412. UCHAR lanPT; /* 发送给LAN是采用的PayloadType */
  413. UCHAR RFCI;
  414. UCHAR SendInitialization; /* 主动发送初始化还是等待对方发送init消息 */
  415. UCHAR MediaPduType; /* 0: PDU Type 0, 1: PDU Type 1 , refer to eRTPS_NBUP_MEDIA_PDU_TYPE*/
  416. UINT InitTimerDuration; /* 发送Init命令的间隔,单位ms,缺省1000ms */
  417. UINT InitRetryCount; /* 发送Init命令的重试次数,缺省3 */
  418. RTPS_NBUP_CODER Coder;
  419. } RTPS_NBUP_PARAM, *PRTPS_NBUP_PARAM;
  420. typedef struct {
  421. UCHAR ChanType; //refer to eRTPS_CHAN_TYPE
  422. union {
  423. RTPS_NBUP_PARAM nbup;
  424. CHAR rvr[1024]; //保留
  425. }u;
  426. } RTPS_PARAM;
  427. typedef struct {
  428. UINT CoderType;
  429. }NBUP_CODERTYPE;
  430. //Progress:NbUP协商进展;
  431. typedef enum {
  432. RTPS_NBUP_PROGRESS_NONE = 0,
  433. RTPS_NBUP_PROGRESS_INITIALISATION = 1,
  434. RTPS_NBUP_PROGRESS_DATA_TRANSFER = 2,
  435. RTPS_NBUP_PROGRESS_FAILED = 3
  436. }eRTPS_NBUP_PROGRESS;
  437. //State:NbUP协商状态;
  438. typedef enum {
  439. RTPS_NBUP_STATE_NONE = 0,
  440. RTPS_NBUP_STATE_VALID_INIT_RECEIVED = 1,
  441. RTPS_NBUP_STATE_INVALID_INIT_RECEIVED = 2,
  442. RTPS_NBUP_STATE_VALID_ACK_RECEIVED = 3,
  443. RTPS_NBUP_STATE_INVALID_ACK_RECEIVED = 4,
  444. RTPS_NBUP_STATE_VALID_NACK_RECEIVED = 5,
  445. RTPS_NBUP_STATE_INVALID_NACK_RECEIVED = 6,
  446. RTPS_NBUP_STATE_INITIALIZATION_FAILED = 7
  447. }eRTPS_NBUP_STATE;
  448. //ErrorCode:NbUP协商错误码;
  449. #define RTPS_NBUP_ERRCODE_0 0 //: CRC error of frame header.
  450. #define RTPS_NBUP_ERRCODE_1 1 //: CRC error of frame payload.
  451. #define RTPS_NBUP_ERRCODE_2 2 //: Unexpected frame number.
  452. #define RTPS_NBUP_ERRCODE_3 3 //: Frame loss.
  453. #define RTPS_NBUP_ERRCODE_4 4 //: PDU type unknown.
  454. #define RTPS_NBUP_ERRCODE_5 5 //: Unknown procedure.
  455. #define RTPS_NBUP_ERRCODE_6 6 //: Unknown reserved value.
  456. #define RTPS_NBUP_ERRCODE_7 7 //: Unknown field.
  457. #define RTPS_NBUP_ERRCODE_8 8 //: Frame too short.
  458. #define RTPS_NBUP_ERRCODE_9 9 //: Missing fields.
  459. //#define RTPS_NBUP_ERRCODE_10–15 : spare.
  460. #define RTPS_NBUP_ERRCODE_16 16 //: Unexpected PDU type.
  461. //#define RTPS_NBUP_ERRCODE_17 : spare.
  462. #define RTPS_NBUP_ERRCODE_18 18 //: Unexpected procedure.
  463. #define RTPS_NBUP_ERRCODE_19 19 //: Unexpected RFCI.
  464. #define RTPS_NBUP_ERRCODE_20 20 //: Unexpected value.
  465. //#define RTPS_NBUP_ERRCODE_21–41 : spare.
  466. #define RTPS_NBUP_ERRCODE_42 42 //: Initialisation failure.
  467. #define RTPS_NBUP_ERRCODE_43 43 //: Initialisation failure (network error, timer expiry).
  468. #define RTPS_NBUP_ERRCODE_44 44 //: Initialisation failure (Iu UP function error, repeated NACK).
  469. #define RTPS_NBUP_ERRCODE_45 45 //: Rate control failure.
  470. #define RTPS_NBUP_ERRCODE_46 46 //: Error event failure.
  471. #define RTPS_NBUP_ERRCODE_47 47 //: Time Alignment not supported.
  472. #define RTPS_NBUP_ERRCODE_48 48 //: Requested Time Alignment not possible.
  473. #define RTPS_NBUP_ERRCODE_49 49 //: Iu UP Mode version not supported.
  474. //#define RTPS_NBUP_ERRCODE_50–63 : spare.
  475. typedef struct {
  476. UCHAR Progress; //NbUP协商进展, refer to eRTPS_NBUP_PROGRESS
  477. UCHAR State; //NbUP协商状态, refer toeRTPS_NBUP_STATE
  478. UCHAR ErrorCode; //协商错误码, refer to RTPS_NBUP_ERRCODE_x
  479. }NBUP_STATUS;
  480. typedef struct {
  481. INT iRetVal;
  482. INT ChanId;
  483. UINT uLen;
  484. union{
  485. RTPS_ENDPOINT endpoint;
  486. NBUP_CODERTYPE nbupcoder;
  487. NBUP_STATUS nbupstatus;
  488. }u;
  489. }RTPS_EVTDATA;
  490. #pragma pack()
  491. typedef enum{
  492. ECLength10MSec=0,
  493. ECLength15MSec=1,
  494. ECLength20MSec=2,
  495. ECLength25MSec=3,
  496. // ECLength30MSec=4,
  497. ECLength32MSec=4,
  498. // ECLength35MSec=5,
  499. // ECLength40MSec=6,
  500. // ECLength45MSec=7,
  501. // ECLength50MSec=8,
  502. // ECLength55MSec=9,
  503. // ECLength60MSec=10,
  504. // ECLength64MSec=11,
  505. ECLength128MSec=22
  506. }eECLength;
  507. typedef enum{
  508. AGC_GAIN_SLOPE_0_25_DB_SEC=0,
  509. AGC_GAIN_SLOPE_0_50_DB_SEC=1,
  510. AGC_GAIN_SLOPE_0_75_DB_SEC=2,
  511. AGC_GAIN_SLOPE_1_00_DB_SEC=3,
  512. AGC_GAIN_SLOPE_1_25_DB_SEC=4,
  513. AGC_GAIN_SLOPE_1_50_DB_SEC=5,
  514. AGC_GAIN_SLOPE_1_75_DB_SEC=6,
  515. AGC_GAIN_SLOPE_2_00_DB_SEC=7,
  516. AGC_GAIN_SLOPE_2_50_DB_SEC=8,
  517. AGC_GAIN_SLOPE_3_00_DB_SEC=9,
  518. AGC_GAIN_SLOPE_3_50_DB_SEC=10,
  519. AGC_GAIN_SLOPE_4_00_DB_SEC=11,
  520. AGC_GAIN_SLOPE_4_50_DB_SEC=12,
  521. AGC_GAIN_SLOPE_5_00_DB_SEC=13,
  522. AGC_GAIN_SLOPE_5_50_DB_SEC=14,
  523. AGC_GAIN_SLOPE_6_00_DB_SEC=15,
  524. AGC_GAIN_SLOPE_7_00_DB_SEC=16,
  525. AGC_GAIN_SLOPE_8_00_DB_SEC=17,
  526. AGC_GAIN_SLOPE_9_00_DB_SEC=18,
  527. AGC_GAIN_SLOPE_10_00_DB_SEC=19,
  528. AGC_GAIN_SLOPE_11_00_DB_SEC=20,
  529. AGC_GAIN_SLOPE_12_00_DB_SEC=21,
  530. AGC_GAIN_SLOPE_13_00_DB_SEC=22,
  531. AGC_GAIN_SLOPE_14_00_DB_SEC=23,
  532. AGC_GAIN_SLOPE_15_00_DB_SEC=24,
  533. AGC_GAIN_SLOPE_20_00_DB_SEC=25,
  534. AGC_GAIN_SLOPE_25_00_DB_SEC=26,
  535. AGC_GAIN_SLOPE_30_00_DB_SEC=27,
  536. AGC_GAIN_SLOPE_35_00_DB_SEC=28,
  537. AGC_GAIN_SLOPE_40_00_DB_SEC=29,
  538. AGC_GAIN_SLOPE_50_00_DB_SEC=30,
  539. AGC_GAIN_SLOPE_70_00_DB_SEC=31
  540. }eAGC_GAIN_SLOPE;
  541. typedef struct ipm_close_info_tag
  542. {
  543. INT nRFU;
  544. }IPM_CLOSE_INFO, *PIPM_CLOSE_INFO;
  545. typedef struct ipm_stop_info_tag
  546. {
  547. INT nRFU;
  548. }IPM_STOP_INFO, * PIPM_STOP_INFO;
  549. typedef enum
  550. {
  551. STOP_RECEIVE_DIGITS = 0x02,
  552. STOP_MEDIA = 0x06,
  553. STOP_ALL = 0x07
  554. }eIPM_STOP_OPERATION;
  555. #ifndef eIPM_DIGIT_TYPE
  556. typedef enum
  557. {
  558. DIGIT_ALPHA_NUMERIC = 0x00, //DTMF
  559. DIGIT_USER_DEFINED_TONES= 0x01, //user define TONE
  560. DIGIT_MF_R1,
  561. DIGIT_MF_R2_FORWARD,
  562. DIGIT_MF_R2_BACKWARD,
  563. DIGIT_LINE,
  564. DIGIT_CALL_PROGRESS,
  565. }eIPM_DIGIT_TYPE;
  566. #endif
  567. #ifndef eIPM_DIGIT_DIRECTION
  568. typedef enum
  569. {
  570. DIGIT_TDM = 0x00, //TDM
  571. DIGIT_IP = 0x01, //IP(RFC 2833)
  572. DIGIT_H324M = 0x02, //3G-324M
  573. DIGIT_IP_INBAND = 0x03 //IP(inbound)
  574. }eIPM_DIGIT_DIRECTION;
  575. #endif
  576. typedef struct ipm_digit_info_tag
  577. {
  578. eIPM_DIGIT_TYPE eDigitType; /* Type of digits - DTMF, ALPHA-NUMERIC */
  579. eIPM_DIGIT_DIRECTION eDigitDirection; /* The direction of flow of digits */
  580. CHAR cDigits[MAX_IPM_DIGITS];/* the digits */
  581. UINT unNumberOfDigits; /* Number of digits */
  582. UINT unTimeStamp;
  583. UINT unExpirationTime;
  584. UINT unDuration;
  585. UINT unInterval;
  586. CHAR cState[MAX_IPM_DIGITS]; /* Digit State */
  587. } IPM_DIGIT_INFO, *PIPM_DIGIT_INFO;
  588. typedef enum
  589. {
  590. SIGNAL_STATE_OFF = 0x0,
  591. SIGNAL_STATE_ON = 0x1
  592. }eIPM_SIGNAL_STATE;
  593. typedef enum
  594. {
  595. SIGNAL_ID_EVENT_DTMF_0 = 0x0,
  596. SIGNAL_ID_EVENT_DTMF_1 = 0x1,
  597. SIGNAL_ID_EVENT_DTMF_2 = 0x2,
  598. SIGNAL_ID_EVENT_DTMF_3 = 0x3,
  599. SIGNAL_ID_EVENT_DTMF_4 = 0x4,
  600. SIGNAL_ID_EVENT_DTMF_5 = 0x5,
  601. SIGNAL_ID_EVENT_DTMF_6 = 0x6,
  602. SIGNAL_ID_EVENT_DTMF_7 = 0x7,
  603. SIGNAL_ID_EVENT_DTMF_8 = 0x8,
  604. SIGNAL_ID_EVENT_DTMF_9 = 0x9,
  605. SIGNAL_ID_EVENT_DTMF_STAR = 0xa,
  606. SIGNAL_ID_EVENT_DTMF_POUND = 0xb,
  607. SIGNAL_ID_EVENT_DTMF_A = 0xc,
  608. SIGNAL_ID_EVENT_DTMF_B = 0xd,
  609. SIGNAL_ID_EVENT_DTMF_C = 0xe,
  610. SIGNAL_ID_EVENT_DTMF_D = 0xf,
  611. SIGNAL_ID_EVENT_DTMF_FLASH = 0x10,
  612. SIGNAL_ID_EVENT_LINE_OFFHOOK = 0x40,
  613. SIGNAL_ID_EVENT_LINE_ONHOOK = 0x41,
  614. SIGNAL_ID_EVENT_LINE_DIAL_TONE = 0x42,
  615. SIGNAL_ID_EVENT_LINE_PABX_INTERNALDIAL_TONE = 0x43,
  616. SIGNAL_ID_EVENT_LINE_SPECIALDIAL_TONE = 0x44,
  617. SIGNAL_ID_EVENT_LINE_SECONDDIAL_TONE = 0x45,
  618. SIGNAL_ID_EVENT_LINE_RINGING_TONE = 0x46,
  619. SIGNAL_ID_EVENT_LINE_SPECIALRINGING_TONE = 0x47,
  620. SIGNAL_ID_EVENT_LINE_BUSY_TONE = 0x48,
  621. SIGNAL_ID_EVENT_LINE_CONGESTION_TONE = 0x49,
  622. SIGNAL_ID_EVENT_LINE_SPECIALINFORMATION_TONE = 0x4a,
  623. SIGNAL_ID_EVENT_LINE_COMFORT_TONE = 0x4b,
  624. SIGNAL_ID_EVENT_LINE_HOLD_TONE = 0x4c,
  625. SIGNAL_ID_EVENT_LINE_RECORD_TONE = 0x4d,
  626. SIGNAL_ID_EVENT_LINE_CALLERWAITING_TONE = 0x4e,
  627. SIGNAL_ID_EVENT_LINE_CALLWAITING_TONE = 0x4f,
  628. SIGNAL_ID_EVENT_LINE_PAY_TONE = 0x50,
  629. SIGNAL_ID_EVENT_LINE_POSITIVEINDICATION_TONE = 0x51,
  630. SIGNAL_ID_EVENT_LINE_NEGATIVEINDICATION_TONE = 0x52,
  631. SIGNAL_ID_EVENT_LINE_WARNING_TONE = 0x53,
  632. SIGNAL_ID_EVENT_LINE_INTRUSION_TONE = 0x54,
  633. SIGNAL_ID_EVENT_LINE_CALLINGCARDSERVICE_TONE = 0x55,
  634. SIGNAL_ID_EVENT_LINE_PAYPHONERECOGNITION_TONE = 0x56,
  635. SIGNAL_ID_EVENT_LINE_CPE_ALERTINGSIGNAL_ID_CAS = 0x57,
  636. SIGNAL_ID_EVENT_LINE_OFFHOOKWARNING_TONE = 0x58,
  637. SIGNAL_ID_EVENT_LINE_RING = 0x59,
  638. SIGNAL_ID_EVENT_LINE_ACCEPTANCE_TONE = 0x60,
  639. SIGNAL_ID_EVENT_LINE_CONFIRMATION_TONE = 0x61,
  640. SIGNAL_ID_EVENT_LINE_DIALTONE_RECALL = 0x62,
  641. SIGNAL_ID_EVENT_LINE_ENDOFTHREEPARTYSERVICE_TONE= 0x63,
  642. SIGNAL_ID_EVENT_LINE_FACILITIES_TONE = 0x64,
  643. SIGNAL_ID_EVENT_LINE_LINELOCKOUT_TONE = 0x65,
  644. SIGNAL_ID_EVENT_LINE_NUMBERUNOBTAINABLE_TONE = 0x66,
  645. SIGNAL_ID_EVENT_LINE_OFFERING_TONE = 0x67,
  646. SIGNAL_ID_EVENT_LINE_PERMANENTSIGNAL_ID_TONE = 0x68,
  647. SIGNAL_ID_EVENT_LINE_PREEMPTION_TONE = 0x69,
  648. SIGNAL_ID_EVENT_LINE_QUEUE_TONE = 0x6a,
  649. SIGNAL_ID_EVENT_LINE_REFUSAL_TONE = 0x6b,
  650. SIGNAL_ID_EVENT_LINE_ROUTE_TONE = 0x6c,
  651. SIGNAL_ID_EVENT_LINE_VALID_TONE = 0x6d,
  652. SIGNAL_ID_EVENT_LINE_WAITING_TONE = 0x6e,
  653. SIGNAL_ID_EVENT_LINE_WARNING_TONE_ENDOFPERIOD = 0x6f,
  654. SIGNAL_ID_EVENT_LINE_WARNING_TONE_PIPTONE = 0x70,
  655. SIGNAL_ID_EVENT_TRUNK_MF_0 = 0x80,
  656. SIGNAL_ID_EVENT_TRUNK_MF_1 = 0x81,
  657. SIGNAL_ID_EVENT_TRUNK_MF_2 = 0x82,
  658. SIGNAL_ID_EVENT_TRUNK_MF_3 = 0x83,
  659. SIGNAL_ID_EVENT_TRUNK_MF_4 = 0x84,
  660. SIGNAL_ID_EVENT_TRUNK_MF_5 = 0x85,
  661. SIGNAL_ID_EVENT_TRUNK_MF_6 = 0x86,
  662. SIGNAL_ID_EVENT_TRUNK_MF_7 = 0x87,
  663. SIGNAL_ID_EVENT_TRUNK_MF_8 = 0x88,
  664. SIGNAL_ID_EVENT_TRUNK_MF_9 = 0x89,
  665. SIGNAL_ID_EVENT_TRUNK_MF_K0_OR_KP_STARTOFPULSING= 0x8a,
  666. SIGNAL_ID_EVENT_TRUNK_MF_K1 = 0x8b,
  667. SIGNAL_ID_EVENT_TRUNK_MF_K2 = 0x8c,
  668. SIGNAL_ID_EVENT_TRUNK_MF_S0_TO_ST_ENDOFPULSING = 0x8d,
  669. SIGNAL_ID_EVENT_TRUNK_MF_S1 = 0x8e,
  670. SIGNAL_ID_EVENT_TRUNK_MF_S2 = 0x8f,
  671. SIGNAL_ID_EVENT_TRUNK_ABCD_SIGNALING_0 = 0x90,
  672. SIGNAL_ID_EVENT_TRUNK_ABCD_SIGNALING_1 = 0x91,
  673. SIGNAL_ID_EVENT_TRUNK_ABCD_SIGNALING_2 = 0x92,
  674. SIGNAL_ID_EVENT_TRUNK_ABCD_SIGNALING_3 = 0x93,
  675. SIGNAL_ID_EVENT_TRUNK_ABCD_SIGNALING_4 = 0x94,
  676. SIGNAL_ID_EVENT_TRUNK_ABCD_SIGNALING_5 = 0x95,
  677. SIGNAL_ID_EVENT_TRUNK_ABCD_SIGNALING_6 = 0x96,
  678. SIGNAL_ID_EVENT_TRUNK_ABCD_SIGNALING_7 = 0x97,
  679. SIGNAL_ID_EVENT_TRUNK_ABCD_SIGNALING_8 = 0x98,
  680. SIGNAL_ID_EVENT_TRUNK_ABCD_SIGNALING_9 = 0x99,
  681. SIGNAL_ID_EVENT_TRUNK_ABCD_SIGNALING_10 = 0x9a,
  682. SIGNAL_ID_EVENT_TRUNK_ABCD_SIGNALING_11 = 0x9b,
  683. SIGNAL_ID_EVENT_TRUNK_ABCD_SIGNALING_12 = 0x9c,
  684. SIGNAL_ID_EVENT_TRUNK_ABCD_SIGNALING_13 = 0x9d,
  685. SIGNAL_ID_EVENT_TRUNK_ABCD_SIGNALING_14 = 0x9e,
  686. SIGNAL_ID_EVENT_TRUNK_ABCD_SIGNALING_15 = 0x9f,
  687. SIGNAL_ID_EVENT_TRUNK_WINK = 0xa0,
  688. SIGNAL_ID_EVENT_TRUNK_WINKOFF = 0xa1,
  689. SIGNAL_ID_EVENT_TRUNK_INCOMING_SEIZURE = 0xa2,
  690. SIGNAL_ID_EVENT_TRUNK_SEIZURE = 0xa3,
  691. SIGNAL_ID_EVENT_TRUNK_UNSEIZE_CIRCUIT = 0xa4,
  692. SIGNAL_ID_EVENT_TRUNK_CONTINUITY_TEST = 0xa5,
  693. SIGNAL_ID_EVENT_TRUNK_DEFAULT_CONTINUITY_TONE = 0xa6,
  694. SIGNAL_ID_EVENT_TRUNK_CONTINUITY_TONE_SINGLETONE= 0xa7,
  695. SIGNAL_ID_EVENT_TRUNK_CONTINUITY_TESTSEND = 0xa8,
  696. SIGNAL_ID_EVENT_TRUNK_CONTINUITY_VERIFIED = 0xa9,
  697. SIGNAL_ID_EVENT_TRUNK_LOOPBACK = 0xaa,
  698. SIGNAL_ID_EVENT_TRUNK_OLD_MILLIWATT_TONE = 0xab,
  699. SIGNAL_ID_EVENT_TRUNK_NEW_MILLIWATT_TONE = 0xac
  700. } eIPM_RFC2833_SIGNAL_ID;
  701. typedef struct ipm_rfc2833_signalid_info_tag
  702. {
  703. eIPM_RFC2833_SIGNAL_ID eSignalID;//Signal ID value. Refer to the ipmlib.h
  704. //or RFC2833 standard
  705. eIPM_SIGNAL_STATE eState; //State. 0 indicates OFF. 1 indicates ON. It is
  706. //valid only when usOnTime is (USHORT)-1
  707. USHORT usOnTime; //Duration that shall not exceed 8000 ms
  708. }IPM_RFC2833_SIGNALID_INFO;
  709. typedef enum
  710. {
  711. EVT_RFC2833 = 0x0200,
  712. EVT_ENERGY_DETECTOR = 0x0400,
  713. EVT_ANSWER_DETECTOR = 0x0401,
  714. EVT_FAX = 0x0402,
  715. EVT_RTP_TIMEOUT = 0x0403,
  716. }eIPM_EVENT;
  717. /*
  718. * ISX_ipm_SwitchVF (cDirection)
  719. */
  720. enum{
  721. IPM_SWITCH_VOICE2FAX = 0,
  722. IPM_SWITCH_FAX2VOICE = 1,
  723. };
  724. /* Event list */
  725. #define IPMEV_MASK 0x9000
  726. #define IPMEV_STARTMEDIA (IPMEV_MASK | 0x02)
  727. #define IPMEV_STOPPED (IPMEV_MASK | 0x03)
  728. #define IPMEV_GET_SESSION_INFO (IPMEV_MASK | 0x05)
  729. #define IPMEV_SEND_DIGITS (IPMEV_MASK | 0x09)
  730. #define IPMEV_RECEIVE_DIGITS (IPMEV_MASK | 0x0a)
  731. #define IPMEV_DIGITS_RECEIVED (IPMEV_MASK | 0x0b)
  732. #define IPMEV_EVENT_ENABLED (IPMEV_MASK | 0x0c)
  733. #define IPMEV_EVENT_DISABLED (IPMEV_MASK | 0x0d)
  734. #define IPMEV_SET_PARM (IPMEV_MASK | 0x13)
  735. #define IPMEV_GET_PARM (IPMEV_MASK | 0x14)
  736. #define IPMEV_SEND_SIGNAL_TO_IP (IPMEV_MASK | 0x16)
  737. #define IPMEV_ERROR (IPMEV_MASK | 0x1e)
  738. #define IPMEV_ENERGY (IPMEV_MASK | 0x20)
  739. #define IPMEV_ANSWER (IPMEV_MASK | 0x21)
  740. #define IPMEV_FAX (IPMEV_MASK | 0x22)
  741. #define IPMEV_RTP_TIMEOUT (IPMEV_MASK | 0x23)
  742. #define IPMEV_SWITCH_VF (IPMEV_MASK | 0x24)
  743. #if defined(__cplusplus)
  744. extern "C" {
  745. #endif
  746. /************************************************************************/
  747. /* Function: ISX_ipm_Open()
  748. Description:
  749. The function opens an IPM channel device. If the opening is successful, a device handle is returned.
  750. The IPM channel device can only be opened by one process. That is, if process A has opened a IPM
  751. channel device successfully and process B tries to open the same device, failure is returned,
  752. unless process A has closed the IPM channel device.
  753. The device handle returned by the function is defined by Ehangcom itself, and it’s not a standard
  754. operating system file handle. Therefore, using operating system commands such as read(), write()
  755. or ioctl() to operate the handle may cause unpredictable results.
  756. Note: if channel=-1 then open xoip board device handle.
  757. Return value:
  758. >0 returns a device handle
  759. -1 failure
  760. Parameter:
  761. -nodenum
  762. Node number. The parameter nodeno indicates an ISX4000 node number.
  763. -brdnum
  764. IPM daughter board number
  765. -channel
  766. IPM channel number
  767. -pusrattr
  768. Pointer to buffer where a user defined attribute is stored
  769. */
  770. /************************************************************************/
  771. ISXAPI_FUNC_STDCL(INT) ISX_ipm_Open(CHAR nodenum, CHAR brdnum, SHORT channel, VOID* pusrattr = 0);
  772. /************************************************************************/
  773. /* Function: ISX_ipm_Close()
  774. Description:
  775. Description
  776. The function closes a IPM channel device handle (that is returned after the device is opened by
  777. ISX_ipm_Close()). The function does not change any state of the device (such as switch state).
  778. It only releases the device handle and breaks the link between the calling process and the device.
  779. Note: ISX_ipm_Close( ) prohibits all events related to the device.
  780. Return value:
  781. 0 success
  782. -1 failure
  783. Parameter:
  784. -nDeviceHandle
  785. IPM channel device handle
  786. -pCloseInfo
  787. Reserved for the future expansion
  788. */
  789. /************************************************************************/
  790. ISXAPI_FUNC_STDCL(INT) ISX_ipm_Close(INT nDeviceHandle, IPM_CLOSE_INFO* pCloseInfo = NULL);
  791. /************************************************************************/
  792. /* Function: ISX_ipm_Listen()
  793. Description:
  794. The function establishes switching between the receiving terminal of the IPM channel device
  795. (receiving time slot) and a time slot (transmitting terminal of another device) so that this
  796. IPM channel device can receive the data from this time slot and this function sets up a
  797. half-switching of the IPM channel. Both switching devices must be located in the same node.
  798. Cross-node device switching must use the optical interface trunk channel. For details, refer to
  799. relevant documents.
  800. Return value:
  801. 0 success
  802. -1 failure
  803. Parameter:
  804. -nDeviceHandle
  805. IPM channel device handle returned by the ISX_ipm_Open( ) function
  806. -sc_tsinfop
  807. Specifies a pointer to the SC_TSINFO structure
  808. */
  809. /************************************************************************/
  810. ISXAPI_FUNC_STDCL(INT) ISX_ipm_Listen( INT nDeviceHandle, SC_TSINFO *sc_tsinfop );
  811. /************************************************************************/
  812. /* Function: ISX_ipm_UnListen()
  813. Description:
  814. The function disconnects the switching between the receiving terminal of the IPM channel
  815. device and the connected transmitting time slot. Successful calling of ISX_ipm_Listen()
  816. automatically disconnects the original switching between the receiving terminal of the IPM
  817. channel device and the connected transmitting time slot. Therefore, when the connection is
  818. changed, the ISX_ipm_Unlisten( ) function need not be called.
  819. Return value:
  820. 0 success
  821. -1 failure
  822. Parameter:
  823. -nDeviceHandle
  824. IPM channel device handle returned by the ISX_ipm_Open( ) function
  825. */
  826. /************************************************************************/
  827. ISXAPI_FUNC_STDCL(INT) ISX_ipm_UnListen( INT nDeviceHandle );
  828. /************************************************************************/
  829. /* Function: ISX_ipm_GetXmitSlot()
  830. Description:
  831. The ISX_ipm_GetXmitSlot function returns the time slot of the transmitting terminal of a
  832. specified IPM channel device. Time slot information is stored in the SC_TSINFO structure.
  833. Return value:
  834. 0 success
  835. -1 failure
  836. Parameter:
  837. -nDeviceHandle
  838. Valid IPM channel device handle
  839. -sc_tsinfop
  840. Pointer to the SC_TSINFO structure to obtain time slot information
  841. */
  842. /************************************************************************/
  843. ISXAPI_FUNC_STDCL(INT) ISX_ipm_GetXmitSlot( INT nDeviceHandle, SC_TSINFO *sc_tsinfop);
  844. /************************************************************************/
  845. /* Function: ISX_ipm_Set2Default()
  846. Description:
  847. The ISX_ipm_Set2Default() function initializes the fields of the XOIP_CFG structure
  848. to the default value of SDK.
  849. Return value:
  850. 0 success
  851. -1 failure
  852. Parameter:
  853. -pXoipCfg
  854. Pointer to the IPM parameter structure. For details, refer to the description of XOIP_CFG.
  855. */
  856. /************************************************************************/
  857. ISXAPI_FUNC_STDCL(INT) ISX_ipm_Set2Default(XOIP_CFG* pXoipCfg);
  858. /************************************************************************/
  859. /* Function: ISX_ipm_SetParm()
  860. Description:
  861. The ISX_ipm_SetParm() function sets IPM channel parameters.
  862. Termination events:
  863. IPMEV_SET_PARM: The operation is successful. Specified channel parameters have been successfully modified.
  864. IPMEV_ERROR: It indicates that the function calling fails.
  865. Return value:
  866. 0 success
  867. -1 failure
  868. Parameter:
  869. -nDeviceHandle
  870. IPM device handle
  871. -pXoipCfg
  872. Pointer to IPM parameters. For details, refer to the description of the XOIP_CFG structure.
  873. -usMode
  874. Asynchronous/synchronous mode
  875. -ulOperIndex
  876. Operation number: Valid for the asynchronous operation only
  877. */
  878. /************************************************************************/
  879. ISXAPI_FUNC_STDCL(INT) ISX_ipm_SetParm(INT nDeviceHandle, XOIP_CFG *pXoipCfg, USHORT usMode, UINT ulOperIndex = 0);
  880. /************************************************************************/
  881. /* Function: ISX_ipm_GetParm()
  882. Description:
  883. The ISX_ipm_GetParm() function obtains the current parameters of the IPM channel.
  884. Termination events:
  885. IPMEV_GET_PARM: The operation is successful. Specified channel parameters are copied to the pXoipCfg structure.
  886. IPMEV_ERROR: It indicates that the function calling fails.
  887. Return value:
  888. 0 success
  889. -1 failure
  890. Parameter:
  891. -nDeviceHandle
  892. IPM device handle
  893. -pXoipCfg
  894. Pointer to IPM parameters. For details, refer to the description of the XOIP_CFG structure.
  895. -usMode
  896. Asynchronous/synchronous mode
  897. -ulOperIndex
  898. Operation number: Valid for the asynchronous operation only
  899. */
  900. /************************************************************************/
  901. ISXAPI_FUNC_STDCL(INT) ISX_ipm_GetParm(INT nDeviceHandle, XOIP_CFG *pXoipCfg, USHORT usMode, UINT ulOperIndex = 0);
  902. /************************************************************************/
  903. /* Function: ISX_ipm_GetSessionInfo()
  904. Description:
  905. The ISX_ipm_GetSessionInfo() function queries statistical information about QOS and RTCP
  906. of the media session of a specified IPM channel.
  907. Termination events:
  908. IPMEV_GET_SESSION_INFO: The operation is successful. Session Info is stored in the address
  909. at which pSessionInfo points.
  910. IPMEV_ERROR: It indicates that the function calling fails.
  911. Return value:
  912. 0 success
  913. -1 failure
  914. Parameter:
  915. -nDeviceHandle
  916. IPM device handle
  917. -pSessionInfo
  918. Pointer to the address where the queried Session Info is stored. Refer to the description of
  919. the XOIP_SESSION_INFO structure.
  920. -usMode
  921. Asynchronous/synchronous mode
  922. -ulOperIndex
  923. Operation number: Valid for the asynchronous operation only
  924. */
  925. /************************************************************************/
  926. ISXAPI_FUNC_STDCL(INT) ISX_ipm_GetSessionInfo(INT nDeviceHandle, XOIP_SESSION_INFO *pSessionInfo, USHORT usMode, UINT ulOperIndex = 0);
  927. /************************************************************************/
  928. /* Function: ISX_ipm_StartMedia()
  929. Description:
  930. The ISX_ipm_StartMedia() function sets IPM channel media attributes and then activates a session.
  931. This function activates an RTP stream. Information about RTP/RTCP, encoder, etc. is specified in
  932. the XOIP_CFG structure.
  933. Termination events:
  934. IPMEV_START_MEDIA: The operation is successful. The channel parameters have been successfully
  935. set and the session activated.
  936. IPMEV_ERROR: It indicates that the function calling fails.
  937. Return value:
  938. 0 success
  939. -1 failure
  940. Parameter:
  941. -nDeviceHandle
  942. IPM device handle
  943. -pSrcAddr
  944. Pointer to the source address information. Refer to the description of the XOIP_SRCADD structure.
  945. -pXoipCfg
  946. IPM channel parameter. Refer to the description of the XOIP_CFG structure.
  947. -usMode
  948. Asynchronous/synchronous mode
  949. 0ulOperIndex
  950. Operation number: Valid for the asynchronous operation only
  951. */
  952. /************************************************************************/
  953. ISXAPI_FUNC_STDCL(INT) ISX_ipm_StartMedia(INT nDeviceHandle, XOIP_SRCADD* pSrcAddr, XOIP_CFG* pCfg, USHORT usMode, UINT ulOperIndex = 0);
  954. /************************************************************************/
  955. /* Function: ISX_ipm_Stop()
  956. Description:
  957. The ISX_ipm_Stop() function stops some operations of the IPM channel (such as Media
  958. Session, digit receiving, etc.)
  959. Termination events:
  960. IPMEV_STOPPED: The operation is successful. Corresponding operations have stopped.
  961. IPMEV_ERROR: It indicates that the function calling fails.
  962. Return value:
  963. 0 success
  964. -1 failure
  965. Parameter:
  966. -nDeviceHandle
  967. IPM device handle
  968. -eOperation
  969. Specifies an operation to be stopped. Refer to eIPM_STOP_OPERATION. It includes the following:
  970. STOP_RECEIVE_DIGITS: Stops receiving digits.
  971. STOP_MEDIA: Stops media sessions.
  972. STOP_ALL: Stops all operations.
  973. -usMode
  974. Asynchronous/synchronous mode
  975. -ulOperIndex
  976. Operation number: Valid for the asynchronous operation only
  977. */
  978. /************************************************************************/
  979. ISXAPI_FUNC_STDCL(INT) ISX_ipm_Stop(INT nDeviceHandle, eIPM_STOP_OPERATION eOperation, USHORT usMode, UINT ulOperIndex = 0);
  980. /************************************************************************/
  981. /* Function: ISX_ipm_SendDigits()
  982. Description:
  983. The ISX_ipm_SendDigits() function sends digits in a specified direction (TDM or IP address).
  984. Digits that are sent in the IP address direction can only be inband and shall not be RFC2833.
  985. Currently, digits can be sent only in the TDM direction.
  986. Termination events:
  987. IPMEV_SEND_DIGITS: The operation is successful. It indicates that digits
  988. have been successfully sent.
  989. IPMEV_ERROR: It indicates that the function calling fails.
  990. Return value:
  991. 0 success
  992. -1 failure
  993. Parameter:
  994. -nDeviceHandle
  995. IPM device handle
  996. -pDigitInfo
  997. Buffer address of digits to be sent. For details, refer to the description of the
  998. IPM_DIGIT_INFO structure.
  999. -usMode
  1000. Asynchronous/synchronous mode
  1001. -ulOperIndex
  1002. Operation number: Valid for the asynchronous operation only
  1003. */
  1004. /************************************************************************/
  1005. ISXAPI_FUNC_STDCL(INT) ISX_ipm_SendDigits(INT nDeviceHandle, IPM_DIGIT_INFO *pDigitInfo, USHORT usMode, UINT ulOperIndex = 0);
  1006. /************************************************************************/
  1007. /* Function: ISX_ipm_ReceiveDigits()
  1008. Description:
  1009. The ISX_ipm_ReceiveDigits() function enables the receiving of digits from an IP network or TDM.
  1010. If you want to disable the receiving of digits, call ISX_ipm_Stop(nDeviceHandle, eSTOP_RECEIVE_DIGITS,…).
  1011. Termination events:
  1012. IPMEV_RECEIVE_DIGITS: The operation is successful, but it does not indicate that digits have been received.
  1013. IPMEV_ERROR: It indicates that the function calling fails.
  1014. Return value:
  1015. 0 success
  1016. -1 failure
  1017. Parameter:
  1018. -nDeviceHandle
  1019. IPM device handle
  1020. -pDigitInfo
  1021. return digit information for the synchronous operation
  1022. -usMode
  1023. Asynchronous/synchronous mode
  1024. -ulOperIndex
  1025. Operation number: Valid for the asynchronous operation only
  1026. */
  1027. /************************************************************************/
  1028. ISXAPI_FUNC_STDCL(INT) ISX_ipm_ReceiveDigits(INT nDeviceHandle, IPM_DIGIT_INFO *pDigitInfo, USHORT usMode, UINT ulOperIndex = 0);
  1029. /************************************************************************/
  1030. /* Function: ISX_ipm_SendRFC2833SignalIDToIP()
  1031. Description:
  1032. The ISX_ipm_SendRFC2833SignalIDToIP() function sends an RFC2833 signal to an IP address.
  1033. Termination events:
  1034. IPMEV_SEND_SIGNAL_TO_IP: The operation is successful. It indicates that the RFC2833 signal
  1035. has been successfully sent.
  1036. IPMEV_ERROR: It indicates that the function calling fails.
  1037. Return value:
  1038. 0 success
  1039. -1 failure
  1040. Parameter:
  1041. -nDeviceHandle
  1042. IPM device handle
  1043. -pSignalInfo
  1044. Address of RFC2833 signal information to be sent. For details, refer to the description of
  1045. the IPM_RFC2833_SIGNALID_INFO structure.
  1046. -usMode
  1047. Asynchronous/synchronous mode
  1048. -ulOperIndex
  1049. Operation number: Valid for the asynchronous operation only
  1050. */
  1051. /************************************************************************/
  1052. ISXAPI_FUNC_STDCL(INT) ISX_ipm_SendRFC2833SignalIDToIP(INT nDeviceHandle, IPM_RFC2833_SIGNALID_INFO *pSignalInfo, USHORT usMode, UINT ulOperIndex = 0);
  1053. /************************************************************************/
  1054. /* Function: ISX_ipm_EnableEvents()
  1055. Description:
  1056. The ISX_ipm_EnableEvents() function enables the receiving of IP notification events such as
  1057. detected DTMF, fax start, etc. After the receiving of an event is enabled, this event is
  1058. generated and SDK sends this event to a channel event queue. The user can obtain the event
  1059. details through the SRL function.
  1060. Termination events:
  1061. IPMEV_EVENT_ENABLED: The operation is successful. The receiving of a specified event is enabled.
  1062. This event has no additional data.
  1063. IPMEV_ERROR: It indicates that the function calling fails.
  1064. Return value:
  1065. 0 success
  1066. -1 failure
  1067. Parameter:
  1068. -nDeviceHandle
  1069. IPM device handle
  1070. -pEvents
  1071. Pointer to the address of the event list to be enabled. Refer to eIPM_EVENT.
  1072. Event types include the following:
  1073. EVT_ENERGY_DETECTOR: Energy event;
  1074. EVT_ANSWER_DETECTOR: Answer event;
  1075. EVT_FAX: Fax event;
  1076. EVT_RTP_TIMEOUT: RTP timeout event.
  1077. -unNumofEvents
  1078. Number of event types to be enabled
  1079. -usMode
  1080. Asynchronous/synchronous mode
  1081. -ulOperIndex
  1082. Operation number: Valid for the asynchronous operation only
  1083. */
  1084. /************************************************************************/
  1085. ISXAPI_FUNC_STDCL(INT) ISX_ipm_EnableEvents(INT nDeviceHandle, eIPM_EVENT *pEvents, UINT unNumofEvents, USHORT usMode, UINT ulOperIndex = 0);
  1086. /************************************************************************/
  1087. /* Function: ISX_ipm_DisableEvents()
  1088. Description:
  1089. The ISX_ipm_DisableEvents() function disables the receiving of IP notification events such as
  1090. detected DTMF, fax start, etc. When the receiving of an event is disabled and the system detects
  1091. this event, SDK omits it.
  1092. Termination events:
  1093. IPMEV_EVENT_DISABLED: The operation is successful. The receiving of a specified event is disabled.
  1094. This event has no additional data.
  1095. IPMEV_ERROR: It indicates that the function calling fails.
  1096. Return value:
  1097. 0 success
  1098. -1 failure
  1099. Parameter:
  1100. -nDeviceHandle
  1101. IPM device handle
  1102. -pEvents
  1103. Pointer to the address of the event list to be disabled. Refer to eIPM_EVENT.
  1104. -unNumofEvents
  1105. Number of event types to be disabled
  1106. -usMode
  1107. Asynchronous/synchronous mode
  1108. -ulOperIndex
  1109. Operation number: Valid for the asynchronous operation only
  1110. */
  1111. /************************************************************************/
  1112. ISXAPI_FUNC_STDCL(INT) ISX_ipm_DisableEvents(INT nDeviceHandle, eIPM_EVENT *pEvents, UINT unNumofEvents, USHORT usMode, UINT ulOperIndex = 0);
  1113. /************************************************************************/
  1114. /* Function: ISX_ipm_GetUsrAttr()
  1115. Description:
  1116. The ISX_ipm_GetUsrAttr() function obtains the user-defined attributes (that are set through
  1117. ISX_ipm_Open() or ISX_ipm_SetUsrAttr()).
  1118. Return value:
  1119. 0 success
  1120. -1 failure
  1121. Parameter:
  1122. -dev
  1123. Valid IPM device handle
  1124. -usr_attrp
  1125. Pointer to the address where the user attributes are obtained
  1126. */
  1127. /************************************************************************/
  1128. ISXAPI_FUNC_STDCL(INT) ISX_ipm_GetUsrAttr(INT dev, VOID **usr_attrp);
  1129. /************************************************************************/
  1130. /* Function: ISX_ipm_SetUsrAttr()
  1131. Description:
  1132. The ISX_ipm_SetUsrAttr() function sets channel attributes (user-defined). User attributes
  1133. that are set by the user can be obtained through the ISX_ipm_GetUsrAttr() function.
  1134. Return value:
  1135. 0 success
  1136. -1 failure
  1137. Parameter:
  1138. -dev
  1139. IPM device handle
  1140. -usr_attr
  1141. User defined attributes that the application can obtain through the ISX_ipm_GetUsrAttr() function
  1142. */
  1143. /************************************************************************/
  1144. ISXAPI_FUNC_STDCL(INT) ISX_ipm_SetUsrAttr(INT dev, VOID *usr_attr);
  1145. /************************************************************************/
  1146. /* Function: ISX_ipm_SwitchVF()
  1147. Description:
  1148. The ISX_ipm_SwitchVF() function performs changeover between the voice and fax modes of the IPM
  1149. channel. This function is generally called after GCEV_SIP_RECVREINVITE event is received.
  1150. Return value:
  1151. 0 success
  1152. -1 failure
  1153. Parameter:
  1154. -nDeviceHandle
  1155. IPM device handle
  1156. -cDirection
  1157. Switchover mode. It includes the following:
  1158. IPM_SWITCH_VOICE2FAX: Voice..fax switchover
  1159. IPM_SWITCH_FAX2VOICE: Fax..voice switchover
  1160. -usMode
  1161. Asynchronous/synchronous mode
  1162. -ulOperIndex
  1163. Operation number: Valid for the asynchronous operation only
  1164. */
  1165. /************************************************************************/
  1166. ISXAPI_FUNC_STDCL(INT) ISX_ipm_SwitchVF(INT nDeviceHandle, CHAR cDirection, USHORT usMode, UINT ulOperIndex = 0);
  1167. /************************************************************************/
  1168. /* Function: ISXE_ipm_SetParam()
  1169. Description:
  1170. The ISXE_ipm_SetParam() function set XOIP's parameter.
  1171. Return value:
  1172. 0 success
  1173. -1 failure
  1174. Parameter:
  1175. -dev
  1176. Xoip board device for ISX_ipm_Open().
  1177. -parmid
  1178. parameter id:
  1179. IPM_PARMID_RTP_CODEC
  1180. IPM_PARMID_RTPS_PARAM_4RTP
  1181. IPM_PARMID_RTPS_PARAM_4RTCP
  1182. -pParam
  1183. Point to parameter:
  1184. IPM_PARMID_RTP_CODEC refer to IPM_RTP_CODEC_PARM
  1185. IPM_PARMID_RTPS_PARAM_4RTP refer to RTPS_PARAM
  1186. IPM_PARMID_RTPS_PARAM_4RTCP refer to RTPS_PARAM
  1187. -usMode
  1188. Asynchronous/synchronous mode
  1189. Note: not support Asynchronous now.
  1190. -ulOperIndex
  1191. Operation number: Valid for the asynchronous operation only
  1192. */
  1193. /************************************************************************/
  1194. ISXAPI_FUNC_STDCL(INT) ISXE_ipm_SetParam(INT dev, INT parmid, VOID* pParam, USHORT usMode=EV_SYNC, UINT ulOperIndex=0);
  1195. /************************************************************************/
  1196. /* Function: ISXE_ipm_GetParam()
  1197. Description:
  1198. The ISXE_ipm_GetParam() function get XOIP's parameter.
  1199. Return value:
  1200. 0 success
  1201. -1 failure
  1202. Parameter:
  1203. -dev
  1204. Xoip board device for ISX_ipm_Open().
  1205. -parmid
  1206. parameter id:
  1207. IPM_PARMID_RTP_CODEC
  1208. -pParam
  1209. Point to parameter:
  1210. IPM_PARMID_RTP_CODEC refer to IPM_RTP_CODEC_PARM
  1211. -usMode
  1212. Asynchronous/synchronous mode
  1213. Note: not support Asynchronous now.
  1214. -ulOperIndex
  1215. Operation number: Valid for the asynchronous operation only
  1216. */
  1217. /************************************************************************/
  1218. ISXAPI_FUNC_STDCL(INT) ISXE_ipm_GetParam(INT dev, INT parmid, VOID* pParam, USHORT usMode=EV_SYNC, UINT ulOperIndex=0);
  1219. //{{for inner test
  1220. ISXAPI_FUNC_STDCL(INT) ISXT_ipm_SetParm(UCHAR ucIsxNo, UCHAR ucBrdNo, USHORT usCh, XOIP_CFG *pXoipCfg, USHORT usMode, UINT ulOperIndex = 0);
  1221. ISXAPI_FUNC_STDCL(INT) ISXT_ipm_GetParm(UCHAR ucIsxNo, UCHAR ucBrdNo, USHORT usCh, XOIP_CFG *pXoipCfg, USHORT usMode, UINT ulOperIndex = 0);
  1222. //}}
  1223. //////////////////////////////////////////////////////////////////////////
  1224. //RTP-Proxy Interface
  1225. /************************************************************************/
  1226. /* Function: ISX_ipm_RTPS_StartConnect()
  1227. Description:
  1228. The ISX_ipm_RTPS_StartConnect() function start RtpProxy Server.
  1229. Return value:
  1230. 0 success
  1231. -1 failure
  1232. Parameter:
  1233. -szServerIp
  1234. RtpProxy Server's IP
  1235. -iServerPort
  1236. RtpProxy Server's PORT
  1237. */
  1238. /************************************************************************/
  1239. ISXAPI_FUNC_STDCL(INT) ISX_ipm_RTPS_StartConnect(CHAR* szServerIp, INT iServerPort);
  1240. /************************************************************************/
  1241. /* Function: ISX_ipm_RTPS_StopConnect()
  1242. Description:
  1243. The ISX_ipm_RTPS_StopConnect() function stop RtpProxy.
  1244. Return value:
  1245. 0 success
  1246. -1 failure
  1247. */
  1248. /************************************************************************/
  1249. ISXAPI_FUNC_STDCL(INT) ISX_ipm_RTPS_StopConnect();
  1250. /************************************************************************/
  1251. /* Function: ISX_ipm_RTPS_OpenChannel()
  1252. Description:
  1253. The ISX_ipm_RTPS_OpenChannel() function open idle channel for RtpProxy Server.
  1254. Return value:
  1255. >0 dev handle
  1256. -1 failure
  1257. Parameter:
  1258. -pConnAddr
  1259. return RtpProxy Connect Address(WAN's IP)
  1260. */
  1261. /************************************************************************/
  1262. ISXAPI_FUNC_STDCL(INT) ISX_ipm_RTPS_OpenChannel(RTPS_ENDPOINT* pConnAddr);
  1263. /************************************************************************/
  1264. /* Function: ISX_ipm_RTPS_CloseChannel()
  1265. Description:
  1266. The ISX_ipm_RTPS_CloseChannel() function close channel for RtpProxy Server.
  1267. Return value:
  1268. 0 success
  1269. -1 failure
  1270. Parameter:
  1271. -dev
  1272. Close dev handle for ISX_ipm_RTPS_OpenChannel()
  1273. */
  1274. /************************************************************************/
  1275. ISXAPI_FUNC_STDCL(INT) ISX_ipm_RTPS_CloseChannel(INT dev);
  1276. #if defined(__cplusplus)
  1277. }
  1278. #endif
  1279. #endif