中航光电的中间件仓库

gcparam.h 23KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825
  1. /**********************************************************************/
  2. /* EhangCom: API Head file
  3. *
  4. * C Header: gcparam.h
  5. * Description: GlobalCall header file for application use
  6. *
  7. * Copyright (C) EhangCom Corp. All Rights Reserved
  8. * All Rights Reserved
  9. *
  10. * All names, products, and services mentioned herein are the
  11. * trademarks or registered trademarks of their respective
  12. * organizations and are the sole property of their respective owners.
  13. */
  14. /**********************************************************************/
  15. #ifndef _GCPARAM_H_
  16. #define _GCPARAM_H_
  17. #include "siplib.h"
  18. typedef enum{
  19. eGCPro_PRI = 0x01,
  20. eGCPro_SS7 = 0x07,
  21. eGCPro_SIP = 0x0a,
  22. }eGC_PROTOCOL;
  23. #pragma pack(1)
  24. #ifndef MAX_ICALL_ADDLEN //{{
  25. #define MAX_ISDN_ADDLEN 21
  26. #define MAX_SIP_ADDLEN 200 //42 --> 64(2008.04.02) --> 200(2009-2-25)
  27. //{{SS7 begin
  28. #define MAX_SS7_ADDLEN MAX_ISDN_ADDLEN
  29. //Nature_of_connection_indicators structure
  30. typedef struct{
  31. UCHAR valid;
  32. UCHAR satellite; //Satellite indicator.
  33. UCHAR continuity_check; //Continuity check indicator.
  34. UCHAR echo_device; //Echo control device indicator.
  35. }NATURE_CONN_INDICATORS;
  36. //Forward_call_indicator structure
  37. typedef struct{
  38. UCHAR valid;
  39. UCHAR national; //National/international call indicator
  40. UCHAR end2end_method; //End-to-end method indicator
  41. UCHAR interworking; //Interworking indicator
  42. UCHAR end2end_info; //End-to-end information indicator
  43. UCHAR ISDN_userpart; //ISDN user part indicator
  44. UCHAR ISDN_userpart_pref; //ISDN user part preference indicator
  45. UCHAR ISDN_access; //ISDN access indicator
  46. UCHAR SCCP_method; //SCCP method indicator
  47. }FORWARD_CALL_INDICATOR;
  48. //Called_party_number structure
  49. typedef struct{
  50. UCHAR valid;
  51. UCHAR nature_of_address; //Nature-of-address indicator
  52. UCHAR INN; //INN (Internal Network Number) indicator
  53. UCHAR numbering_plan; //Numbering plan indicator
  54. CHAR called_number[MAX_SS7_ADDLEN];
  55. }S7_CALLED_PARTY_NUMBER;
  56. //Called_party_number structure
  57. typedef struct{
  58. UCHAR valid;
  59. UCHAR nature_of_address; //Nature-of-address indicator.
  60. UCHAR number_incomplete; //Calling party number incompleteness indicator
  61. UCHAR numbering_plan; //Numbering plan indicator
  62. UCHAR address_present_restrict; //Address presentation restricted indicator
  63. UCHAR screening; //Screening indicator
  64. CHAR calling_number[MAX_SS7_ADDLEN];
  65. }S7_CALLING_PARTY_NUMBER;
  66. //Optional forward call indicators
  67. typedef struct{
  68. UCHAR valid;
  69. UCHAR clsdUGrpCaInd; // Closed user group call indicator
  70. UCHAR simpleSegmInd; // Simple segmentation indicator
  71. UCHAR conLineIdReqInd; // Connected line identification request indicator
  72. }OPT_FORWARD_CALL_INDICATORS;
  73. //Information request indicators
  74. typedef struct{
  75. UCHAR valid;
  76. UCHAR cgPtyAddrReqInd; // Calling party address request indicator
  77. UCHAR holdingInd; // Holding indicator
  78. UCHAR cgPtyCatReqInd; // Calling party's category request indicator
  79. UCHAR chrgInfoReqInd; // Charge information request indicator
  80. UCHAR malCaIdReqInd; // Malicious call identification request indicator (reserved, used in ISUP'88 Blue Book)
  81. }INFO_REQ_INDICATORS;
  82. //User-to-user indicators
  83. typedef struct{
  84. UCHAR valid;
  85. UCHAR type; // Indicator type
  86. UCHAR serv1; // Service 1 type
  87. UCHAR serv2; // Service 2 type
  88. UCHAR serv3; // Service 3 type
  89. UCHAR NetDiscardInd; // Network discard indicator
  90. }USER_TO_USER_INDICATORS;
  91. typedef enum{
  92. enFieldMT_Invalid = 0x0, /* invalid */
  93. enFieldMT_User2UserInfo = 0x1, /* UUI */
  94. enFieldMT_PRI_RedirctingNumb = 0x2, /* Redirection Number */
  95. enFieldMT_PRI_UuiRedirNumb = 0x3 /* UUI and Redirection Number */
  96. }enU2UInfoFieldMT;
  97. typedef struct { //valid=2
  98. UCHAR numb_type; // number type
  99. UCHAR numb_play; // number play
  100. UCHAR pres_ind; // pres_ind
  101. UCHAR redirect_reason; // redirect reason
  102. UCHAR numb[21]; // user number
  103. }PRI_REDIRECT_NUMB;
  104. //#define REMAIN_USR2USRINFO_LEN (MAX_USR2USRINFO_LEN-sizeof(UINT))
  105. #define REMAIN_USR2USRINFO_LEN (MAX_USR2USRINFO_LEN-sizeof(VOID*))
  106. //User-to-user information
  107. typedef struct{
  108. UCHAR valid; //refer to enU2UInfoFieldMT
  109. union{
  110. struct { //valid=1
  111. UCHAR len; //user information length
  112. UCHAR ProtoDiscriminator; //user information protocol type
  113. UCHAR info[MAX_USR2USRINFO_LEN]; //user information
  114. };
  115. PRI_REDIRECT_NUMB RedirectingNumb; //valid=2
  116. struct { //valid=3
  117. UCHAR len; //user information length
  118. UCHAR ProtoDiscriminator; //user information protocol type
  119. UCHAR info[REMAIN_USR2USRINFO_LEN]; //user information
  120. PRI_REDIRECT_NUMB *pRedirNumb; //Redirection Number
  121. }UuiRN;
  122. };
  123. }USER_TO_USER_INFO;
  124. typedef struct{ //[2016-2-24]
  125. CHAR info[512]; //user to user string
  126. }USER_TO_USER_EX;
  127. //改发号码,原被叫号码
  128. typedef struct{
  129. UCHAR valid;
  130. UCHAR nature_of_address; //nature-of-address indicator
  131. UCHAR address_present_restrict; //Address presentation restricted indicator
  132. UCHAR numbering_plan; //numbering plan indicator
  133. signed char addrSig[21]; //address signal
  134. }REDIR_NUM,ORG_NUM;
  135. // Redirection information
  136. typedef struct{
  137. UCHAR valid;
  138. UCHAR redirInd; //redirection indicator
  139. UCHAR origRedirReas; //original redirection reasons
  140. UCHAR redirCnt; //redirection counter
  141. UCHAR redirReas; //redirection reasons
  142. }REDIR_INFO;
  143. //Backward_call_indicators structure
  144. typedef struct{
  145. UCHAR valid;
  146. UCHAR charge; //Charge indicator
  147. UCHAR called_party_status; //Called party’s status indicator
  148. UCHAR called_party_category; //Called party’s category indicator
  149. UCHAR end2end_method; //End-to-end method indicator
  150. UCHAR interworking; //Interworking indicator
  151. UCHAR end2end_info; //End-to-end information indicator
  152. UCHAR ISDN_userpart; //ISDN user part indicator
  153. UCHAR holding; //Holding indicator
  154. UCHAR ISDN_access; //ISDN access indicator
  155. UCHAR echo_control_device; //Echo control device indicator
  156. UCHAR SCCP_method; //SCCP method indicator
  157. }BACKWARD_CALL_INDICATORS;
  158. //Call_diversion_info structure
  159. typedef struct{
  160. UCHAR valid;
  161. UCHAR notification_subscription; //Notification subscription options
  162. UCHAR redirecting_reason; //Redirecting reason
  163. }CALL_DIVERSION_INFO;
  164. //Redirection_number structure
  165. typedef struct{
  166. UCHAR valid;
  167. UCHAR nature_of_address; //nature-of-address indicator
  168. UCHAR INN; //internal network number indicator
  169. UCHAR numbering_plan; //numbering plan indicator
  170. CHAR number[MAX_SS7_ADDLEN]; //number
  171. }REDIRECTION_NUMBER;
  172. //Opt_backward_call_indicators structure
  173. typedef struct{
  174. UCHAR valid;
  175. UCHAR inband_info; //In-band information indicator
  176. UCHAR call_diversion_occur; //Call diversion may occur indicator
  177. UCHAR simple_segment; //Simple segmentation indicator
  178. UCHAR MLPP_user; //MLPP user indicator
  179. }OPT_BACKWARD_CALL_INDICATORS;
  180. //Redirection number restriction indicator
  181. typedef struct{
  182. UCHAR valid;
  183. UCHAR presRest; //Presentation restricted indicator.
  184. }REDIR_NUM_RESTRICT;
  185. //}} SS7 end
  186. //{{ PRI begin
  187. typedef struct{
  188. UCHAR ucXferCap; //Information transfer capacity.
  189. UCHAR ucXferMode; //Information transfer mode.
  190. UCHAR ucXferRate; //Information rate.
  191. UCHAR ucUserInfoL1P; //User information layer 1 protocol.
  192. UCHAR ucUserRate; //User rate.
  193. }BEARER_CAP;
  194. typedef struct{
  195. UCHAR ucType; //type of number
  196. UCHAR ucPlan; //numbering plan
  197. UCHAR ucPI; //presentation indicator
  198. UCHAR ucSI; //Screening indicator
  199. UCHAR Num[MAX_ISDN_ADDLEN]; //calling party number
  200. }CALLING_PARTY_NUM;
  201. typedef struct{
  202. UCHAR ucType; //type of number
  203. UCHAR ucPlan; //numbering plan
  204. UCHAR Num[MAX_ISDN_ADDLEN]; //called party number
  205. }CALLED_PARTY_NUM;
  206. typedef struct{
  207. UCHAR valid; //Valid flag. 0 and 1 indicate valid and invalid respectively
  208. UCHAR coding_standard; //coding standard
  209. UCHAR location; //Location
  210. UCHAR progress_description; //progress description
  211. }PROGRESS_INDICATOR;
  212. typedef struct{
  213. UCHAR ucIsxNo;
  214. UCHAR ucBrdNo;
  215. UCHAR ucSpanNo;
  216. }GC_SPAN;
  217. typedef struct{
  218. GC_SPAN Span;
  219. USHORT usL2DataLen;
  220. CHAR L2Data[1]; //...L2 data
  221. }PRI_L2_DATA;
  222. typedef struct{
  223. UCHAR ucSendingCom;
  224. BEARER_CAP BearerCap;
  225. CALLING_PARTY_NUM CallingNum;
  226. UCHAR CallingSubAdd[MAX_ISDN_ADDLEN];
  227. CALLED_PARTY_NUM CalledNum;
  228. UCHAR CalledSubAdd[MAX_ISDN_ADDLEN];
  229. PROGRESS_INDICATOR ProgInd;
  230. USER_TO_USER_INFO U2UInfo;
  231. }PRI_SETUP;
  232. typedef struct{
  233. PROGRESS_INDICATOR ProgInd;
  234. }PRI_CALLPROCEEDING;
  235. typedef struct{
  236. PROGRESS_INDICATOR ProgInd;
  237. USER_TO_USER_INFO U2UInfo;
  238. }PRI_ALERTING;
  239. typedef struct{
  240. PROGRESS_INDICATOR ProgInd;
  241. USER_TO_USER_INFO U2UInfo;
  242. }PRI_CONNECT;
  243. typedef struct{
  244. PROGRESS_INDICATOR ProgInd;
  245. }PRI_PROGRESS;
  246. typedef struct{
  247. PROGRESS_INDICATOR ProgInd;
  248. }PRI_SETUPACK;
  249. typedef struct{
  250. UCHAR ucSendingCom;
  251. CALLED_PARTY_NUM CalledNum;
  252. }PRI_INFO;
  253. typedef struct{
  254. UCHAR ucCause;
  255. PROGRESS_INDICATOR ProgInd;
  256. USER_TO_USER_INFO U2UInfo;
  257. }PRI_DROP;
  258. //}} PRI end
  259. //{{ SIP begin
  260. typedef struct {
  261. USHORT Tag; /* SDP type */
  262. USHORT Len; /* Effective information length in the rear, for internal use only */
  263. union{ /* SDP information */
  264. ISXSIP_IE_SDP_PROTOCOL_VERSION ProtocolVer;
  265. ISXSIP_IE_SDP_ORIGIN Origin;
  266. ISXSIP_IE_SDP_SESSION Session;
  267. ISXSIP_IE_SDP_CONNECTION Connection;
  268. ISXSIP_IE_SDP_CONN_MODE ConnMode;
  269. ISXSIP_IE_SDP_SESSION_TIME SessionTime;
  270. ISXSIP_IE_SDP_RTP_MAP RtpMap;
  271. ISXSIP_IE_SDP_ATTRIBUTE Attribute;
  272. ISXSIP_IE_SDP_MEDIA_DESC_EX MediaDesc;
  273. ISXSIP_IE_SDP_MEDIA_ENCODE MediaEncode;//[2014-11-4]
  274. ISXSIP_IE_SDP_FMTP_EX Fmtp; //[2014-11-4]
  275. }u;
  276. }ISXSIP_IE_SDP_EX;
  277. #define MAX_SDP_NUM 20
  278. typedef struct {
  279. UCHAR SdpNum;
  280. ISXSIP_IE_SDP_EX Sdp[MAX_SDP_NUM];
  281. }ISXSIP_IE_BODY_SDP_EX;
  282. #define MAX_TRANS_LEN 1024 //512-->1024[2012-9-3]
  283. typedef struct {
  284. ISXSIP_IE_CONTENT_TYPE ContentType;
  285. UINT BodyLen;
  286. CHAR Body[MAX_TRANS_LEN];
  287. }ISXSIP_IE_BODY_TRANS_EX;
  288. typedef struct{
  289. UCHAR Valid;
  290. UCHAR BodyPartyType;
  291. union {
  292. ISXSIP_IE_BODY_SDP_EX BodySdp;
  293. ISXSIP_IE_BODY_TRANS_EX BodyTrans;
  294. } u;
  295. }ISXSIP_IE_BODY_EX;
  296. //ISX_gc_MakeCall parameter
  297. typedef struct{
  298. ISXSIP_IE_TO To;
  299. ISXSIP_IE_FROM From;
  300. ISXSIP_IE_AUTH_INFO AuthInfo;
  301. ISXSIP_IE_REFERRED_BY RefBy;
  302. ISXSIP_IE_BODY_EX Body;
  303. }SIP_INVITE;
  304. /*
  305. - When the ISXSIP_IE_AUTH_INFO structure is too short, ISXSIP_IE_LONG_AUTH_INFO is
  306. used to send too long registration message.
  307. */
  308. typedef struct {
  309. CHAR AuthStr[100]; /*user name and password. The user name and the password are strings and contain
  310. string end marks */
  311. } ISXSIP_IE_LONG_AUTH_INFO;
  312. //{{ISXE_gc_MakeCall parameter
  313. typedef struct{
  314. ISXSIP_IE_TO To;
  315. ISXSIP_IE_FROM From;
  316. ISXSIP_IE_LONG_AUTH_INFO LongAuthInfo;
  317. ISXSIP_IE_REFERRED_BY RefBy;
  318. ISXSIP_IE_BODY_EX Body;
  319. }SIP_INVITE_EX_REQ;
  320. typedef struct{
  321. ISXSIP_IE_TO To;
  322. ISXSIP_IE_FROM From;
  323. ISXSIP_IE_REFERRED_BY RefBy;
  324. ISXSIP_IE_AUTHORIZATION Author;
  325. ISXSIP_IE_BODY_EX Body;
  326. }SIP_INVITE_EX_IND;
  327. //}}
  328. typedef struct{
  329. USHORT usCause;
  330. ISXSIP_IE_AUTHENTICATION Authent;
  331. ISXSIP_IE_LONG_AUTH_INFO LongAuthInfo;
  332. }SIP_INVITE_AUTH;
  333. typedef struct{
  334. ISXSIP_IE_BODY_EX Body;
  335. }SIP_RING;
  336. typedef struct{
  337. ISXSIP_IE_BODY_EX Body;
  338. }SIP_CONN;
  339. typedef struct{
  340. ISXSIP_IE_BODY_EX Body;
  341. }SIP_PROGRESS;
  342. typedef struct{
  343. USHORT usCause;
  344. ISXSIP_IE_BODY_EX Body;
  345. }SIP_REINVITE_ACK;
  346. typedef struct{
  347. UCHAR ucIsxNo;
  348. UCHAR ucBrdNo;
  349. UINT ulSerialNo;
  350. }REGISTER_ID;
  351. /*
  352. - Registration message structure of SIP. When Expires in Contact is 0, it indicates Unregister.
  353. */
  354. typedef struct{
  355. REGISTER_ID RegisterId;
  356. ISXSIP_IE_TO To; //To header field
  357. ISXSIP_IE_FROM From; //From header field
  358. ISXSIP_IE_ADDR RegAddr; //registration address
  359. ISXSIP_IE_CONTACT Contact; //Contact header field
  360. union{
  361. ISXSIP_IE_AUTH_INFO AuthInfo; //The field is used when a Register message is sent
  362. ISXSIP_IE_LONG_AUTH_INFO LongAuthInfo; //The field is used when a long Register is sent
  363. ISXSIP_IE_AUTHORIZATION Author; //The field is used when a Register event is received
  364. }u;
  365. }SIP_REGISTER;
  366. /*
  367. - It indicates whether a registration message is successfully sent.
  368. */
  369. typedef struct{
  370. REGISTER_ID RegisterId;
  371. SHORT sRetVal;
  372. }SEND_SIPREG_RET, SEND_SIPREGACK_RET;
  373. /*
  374. - SIP registration result message structure
  375. */
  376. typedef struct{
  377. REGISTER_ID RegisterId;
  378. USHORT usCause; /*It specifies registration results. Refer to SIP response code values */
  379. ISXSIP_IE_AUTHENTICATION Authent; /* When usCause is 401 or 407. Authentication information such as Realm and
  380. Nonce must be sent to the other party through the Authent parameter.*/
  381. }SIP_REGISTER_ACK;
  382. typedef struct{
  383. UINT ulSerialNo;
  384. ISXSIP_IE_BODY_EX Body;
  385. }SIP_INFO;
  386. typedef struct{
  387. UINT ulSerialNo;
  388. ISXSIP_IE_BODY_EX Body;
  389. }SIP_INFO_IND;
  390. typedef struct{
  391. UINT ulSerialNo;
  392. USHORT usCause;
  393. ISXSIP_IE_BODY_EX Body;
  394. }SIP_INFO_ACK;
  395. typedef struct{
  396. USHORT usCause;
  397. }SIP_DROP;
  398. typedef struct{
  399. UCHAR ucIsxNo;
  400. UCHAR ucBrdNo;
  401. SHORT sChannel;
  402. UINT ulSerialNo;
  403. }SIP_TRANSC_ID;
  404. typedef struct{
  405. UINT ulSerialNo;
  406. ISXSIP_IE_TO To;
  407. ISXSIP_IE_FROM From;
  408. ISXSIP_IE_EXPIRES Expires;
  409. ISXSIP_IE_EVENT Event;
  410. ISXSIP_IE_AUTH_INFO AuthInfo;
  411. ISXSIP_IE_BODY_EX Body;
  412. }SIP_SUBSCRIBE;
  413. //typedef struct{
  414. // SIP_TRANSC_ID TranscId;
  415. // SHORT sRetVal;
  416. //}SEND_TRANSC_RET;
  417. typedef struct{
  418. UINT ulSerialNo;
  419. ISXSIP_IE_TO To;
  420. ISXSIP_IE_FROM From;
  421. ISXSIP_IE_EXPIRES Expires;
  422. ISXSIP_IE_EVENT Event;
  423. ISXSIP_IE_BODY_EX Body;
  424. }SIP_SUBSCRIBE_IND;
  425. typedef struct{
  426. UINT ulSerialNo;
  427. USHORT usCause;
  428. ISXSIP_IE_EXPIRES Expires;
  429. ISXSIP_IE_BODY_EX Body;
  430. }SIP_SUBSCRIBE_ACK;
  431. typedef struct{
  432. UINT ulSerialNo;
  433. ISXSIP_IE_TO To;
  434. ISXSIP_IE_FROM From;
  435. ISXSIP_IE_EVENT Event;
  436. ISXSIP_IE_SUBSCRIPTION_STATE SubscribeState;
  437. ISXSIP_IE_AUTH_INFO AuthInfo;
  438. ISXSIP_IE_BODY_EX Body;
  439. }SIP_NOTIFY;
  440. typedef struct{
  441. UINT ulSerialNo;
  442. ISXSIP_IE_TO To;
  443. ISXSIP_IE_FROM From;
  444. ISXSIP_IE_EVENT Event;
  445. ISXSIP_IE_SUBSCRIPTION_STATE SubscribeState;
  446. ISXSIP_IE_BODY_EX Body;
  447. }SIP_NOTIFY_IND;
  448. typedef struct{
  449. UINT ulSerialNo;
  450. USHORT usCause;
  451. ISXSIP_IE_BODY_EX Body;
  452. }SIP_GENTRANSC_ACK;
  453. typedef struct{
  454. UINT ulSerialNo;
  455. ISXSIP_IE_TO To;
  456. ISXSIP_IE_FROM From;
  457. ISXSIP_IE_REFER_TO ReferTo;
  458. ISXSIP_IE_REFERRED_BY ReferBy;
  459. ISXSIP_IE_CONTACT Contact;
  460. ISXSIP_IE_AUTH_INFO AuthInfo;
  461. ISXSIP_IE_BODY_EX Body;
  462. }SIP_REFER;
  463. typedef struct{
  464. UINT ulSerialNo;
  465. ISXSIP_IE_TO To;
  466. ISXSIP_IE_FROM From;
  467. ISXSIP_IE_REFER_TO ReferTo;
  468. ISXSIP_IE_REFERRED_BY ReferBy;
  469. ISXSIP_IE_CONTACT Contact;
  470. ISXSIP_IE_BODY_EX Body;
  471. }SIP_REFER_IND;
  472. typedef struct{
  473. UINT ulSerialNo;
  474. USHORT usCause;
  475. ISXSIP_IE_CONTACT Contact;
  476. ISXSIP_IE_BODY_EX Body;
  477. }SIP_REFER_ACK;
  478. typedef struct{
  479. UINT ulSerialNo;
  480. ISXSIP_IE_TO To;
  481. ISXSIP_IE_FROM From;
  482. ISXSIP_IE_AUTH_INFO AuthInfo;
  483. ISXSIP_IE_BODY_EX Body;
  484. }SIP_OPTIONS;
  485. typedef struct{
  486. UINT ulSerialNo;
  487. ISXSIP_IE_TO To;
  488. ISXSIP_IE_FROM From;
  489. ISXSIP_IE_BODY_EX Body;
  490. }SIP_OPTIONS_IND;
  491. typedef struct{
  492. UINT ulSerialNo;
  493. ISXSIP_IE_BODY_EX Body;
  494. }SIP_UPDATE;
  495. typedef struct{
  496. UINT ulSerialNo;
  497. ISXSIP_IE_BODY_EX Body;
  498. }SIP_UPDATE_IND;
  499. typedef struct{
  500. UINT ulSerialNo;
  501. ISXSIP_IE_TO To;
  502. ISXSIP_IE_FROM From;
  503. ISXSIP_IE_AUTH_INFO AuthInfo;
  504. ISXSIP_IE_BODY_EX Body;
  505. }SIP_MESSAGE;
  506. typedef struct{
  507. UINT ulSerialNo;
  508. ISXSIP_IE_TO To;
  509. ISXSIP_IE_FROM From;
  510. ISXSIP_IE_BODY_EX Body;
  511. }SIP_MESSAGE_IND;
  512. typedef struct{
  513. UINT ulSerialNo;
  514. }SIP_CANCEL;
  515. typedef struct{
  516. UINT ulSerialNo;
  517. UCHAR ucCancelType;
  518. }SIP_CANCEL_IND;
  519. /*
  520. - ucCancelType: The type of the canceled transaction.
  521. */
  522. typedef enum {
  523. SIPUA_CANCEL_INVITE, /* Cancel Invite request */
  524. SIPUA_CANCEL_MODIFY, /* Cancel reInvite request */
  525. SIPUA_CANCEL_INFO, /* Cancel Info request */
  526. SIPUA_CANCEL_OPTIONS, /* Cancel OPTIONS request */
  527. SIPUA_CANCEL_MESSAGE, /* Cancel MESSAGE request */
  528. SIPUA_CANCEL_SUBSCRIBE, /* Cancel SUBSCRIBE request */
  529. SIPUA_CANCEL_NOTIFY, /* Cancel NOTIFY request */
  530. SIPUA_CANCEL_REFER, /* Cancel REFER request */
  531. SIPUA_CANCEL_REGISTER, /* Cancel REGISTER请求 */
  532. SIPUA_CANCEL_UPDATE, /* Cancel UPDATE请求 */
  533. }eSIPUA_CANCEL;
  534. //}} SIP end
  535. #endif //}}
  536. typedef struct{
  537. NATURE_CONN_INDICATORS NCI; //nature-of-connection indicator
  538. FORWARD_CALL_INDICATOR FCI; //forward call indicator
  539. UCHAR Calling_party_category; //calling party's category
  540. UCHAR Trans_medium_req; //transmission medium request
  541. S7_CALLED_PARTY_NUMBER CDPN; //called party number
  542. S7_CALLING_PARTY_NUMBER CGPN; //calling party number
  543. UCHAR Generic_notification_indicator; //Generic notification indicator
  544. REDIR_NUM RedirNum; //redirection number
  545. REDIR_INFO RedirInfo; //redirection information
  546. ORG_NUM OrgNum; //original called party number
  547. OPT_FORWARD_CALL_INDICATORS OFCI; //optional forward call indicators
  548. USER_TO_USER_INDICATORS U2UInd; //user-to-user indicators
  549. USER_TO_USER_INFO U2UInfo; //user-to-user information
  550. }SS7_IAM;
  551. typedef struct{
  552. CHAR called_number[MAX_SS7_ADDLEN];
  553. }SS7_SAM;
  554. typedef struct{
  555. BACKWARD_CALL_INDICATORS BCI; //backward call indicators
  556. CALL_DIVERSION_INFO CDI; //call diversion information
  557. REDIRECTION_NUMBER RDN; //redirection number
  558. OPT_BACKWARD_CALL_INDICATORS OBCI; //optional backward call indicators
  559. UCHAR Generic_notification_indicator; //generic notification indicator
  560. REDIR_NUM_RESTRICT RedirNumRestr; //redirection number restriction parameter
  561. UCHAR ucCause; //0xFF is not specified. Refer to the description of ucCause of PRI_DROP
  562. USER_TO_USER_INDICATORS U2UInd; //user-to-user indicators
  563. USER_TO_USER_INFO U2UInfo; // user-to-user information
  564. UCHAR Trans_medium_req; //transmission medium request
  565. }SS7_ACM;
  566. //Connected_number structure
  567. typedef struct {
  568. UCHAR valid;
  569. UCHAR nature_of_address; //nature of address indicator
  570. UCHAR numbering_plan; //numbering plan indicator
  571. UCHAR address_present_restrict; //address presentation restricted indicator
  572. UCHAR screening; //screening indicator
  573. CHAR number[MAX_SS7_ADDLEN]; //number
  574. }CONNECTED_NUMBER;
  575. //Event_info structure
  576. typedef struct{
  577. UCHAR valid;
  578. UCHAR event; //Event indicator
  579. UCHAR event_present_restrict; //Event presentation restricted indicator (national use)
  580. }EVENT_INFO;
  581. typedef struct{
  582. BACKWARD_CALL_INDICATORS BCI; //backward call indicators
  583. CONNECTED_NUMBER CN; //Connected number
  584. REDIRECTION_NUMBER RDN; //redirection number
  585. UCHAR Generic_notification_indicator; //generic notification indicator
  586. REDIR_NUM_RESTRICT RedirNumRestr; //redirection number restricted parameter
  587. USER_TO_USER_INDICATORS U2UInd; //user-to-user indicators
  588. USER_TO_USER_INFO U2UInfo; //user-to-user information
  589. UCHAR Trans_medium_req; //transmission medium request
  590. }SS7_ANM;
  591. typedef struct{
  592. UCHAR ucCause; //cause. Refer to the description of ucCause of PRI_DROP.
  593. USER_TO_USER_INDICATORS U2UInd; //user-to-user indicators
  594. USER_TO_USER_INFO U2UInfo; // user-to-user information
  595. }SS7_DROP;
  596. typedef struct{
  597. EVENT_INFO EI; //event information
  598. BACKWARD_CALL_INDICATORS BCI; //backward call indicators
  599. OPT_BACKWARD_CALL_INDICATORS OBCI; //optional backward call indicators
  600. REDIRECTION_NUMBER RDN; //redirection number
  601. UCHAR Generic_notification_indicator; //generic notification indicator
  602. CALL_DIVERSION_INFO CDI; //call diversion information
  603. REDIR_NUM_RESTRICT RedirNumRestr; //redirection number restricted parameter
  604. UCHAR ucCause; //0xFF is not specified. Refer to the description of ucCause of PRI_DROP.
  605. USER_TO_USER_INDICATORS U2UInd; //user-to-user indicators
  606. USER_TO_USER_INFO U2UInfo; //user-to-user information
  607. UCHAR Trans_medium_req; //transmission medium request
  608. }SS7_CPG;
  609. typedef struct{
  610. eGC_PROTOCOL Protocol; //protocol type
  611. union{
  612. SS7_IAM SS7Iam; //SS7 IAM parameter
  613. PRI_SETUP PRISetup; //PRI Setup parameter
  614. SIP_INVITE SIPInvite; //SIP Invite parameter
  615. SIP_INVITE_EX_REQ SIPInviteExReq; //SIP Extend Invite parameter
  616. SIP_INVITE_EX_IND SIPInviteExInd; //SIP Extend indicators parameter
  617. }u;
  618. }GCPARAMEX_MAKECALL;
  619. typedef struct{
  620. eGC_PROTOCOL Protocol; //protocol type
  621. union{
  622. SS7_SAM SS7Sam; //SS7 SAM parameter
  623. PRI_INFO PRIInfo; //PRI Info parameter
  624. }u;
  625. }GCPARAMEX_MOREINFO;
  626. typedef struct{
  627. eGC_PROTOCOL Protocol; //protocol type
  628. union{
  629. SS7_ACM SS7Acm; //SS7 ACM parameter
  630. SIP_RING SIPRing; //SIP Ring
  631. PRI_ALERTING PRIAlerting; //PRI Alerting parameter
  632. }u;
  633. }GCPARAMEX_ACCEPTCALL;
  634. typedef struct{
  635. eGC_PROTOCOL Protocol; //protocol type
  636. union{
  637. SS7_ANM SS7Anm; //SS7 ANM parameter
  638. SIP_CONN SIPConn; //SIP Connection parameter
  639. PRI_CONNECT PRIConn; //PRI Connect parameter
  640. }u;
  641. }GCPARAMEX_ANSWERCALL;
  642. typedef struct{
  643. eGC_PROTOCOL Protocol; //protocol type
  644. union{
  645. SS7_DROP SS7Drop; //SS7 REL parameter
  646. PRI_DROP PRIDrop; //PRI drop parameter
  647. SIP_DROP SIPDrop; //SIP drop parameter
  648. }u;
  649. }GCPARAMEX_DROPCALL;
  650. typedef struct{
  651. eGC_PROTOCOL Protocol; //protocol type
  652. union{
  653. PRI_PROGRESS PRIProgress;
  654. SIP_PROGRESS SIPProgress;
  655. }u;
  656. }GCPARAMEX_CALLPROGRESS;
  657. typedef struct{
  658. eGC_PROTOCOL Protocol; //protocol type
  659. union{
  660. PRI_SETUPACK PRISetupAck;
  661. }u;
  662. }GCPARAMEX_SETUPACK;
  663. #ifndef MAX_SIP_TRANSCTYPE
  664. #define MAX_SIP_TRANSCTYPE 1
  665. /*
  666. - Transaction type supported by the eSIP_TRANSACTION_TYPE enumeration.
  667. */
  668. typedef enum {
  669. SIP_TRANSCTYPE_OPTIONS =0, /* Options sending request transaction */
  670. SIP_TRANSCTYPE_SUBSCRIBE =1, /* Subscribe sending request transaction */
  671. SIP_TRANSCTYPE_MESSAGE =2, /* Message sending request transaction */
  672. }eSIP_TRANSACTION_TYPE;
  673. #endif
  674. typedef struct{
  675. UCHAR ucIsxNo;
  676. UCHAR ucBrdNo;
  677. UCHAR ucTranscType;
  678. UINT ulSerialNo;
  679. }SIP_TRANSC_T;
  680. typedef struct{
  681. UCHAR ucIsxNo; //node number
  682. UCHAR ucBrdNo; //SIP board number
  683. UCHAR ucTranscType; //Transaction type. Refer to eSIP_TRANSACTION_TYPE.
  684. union{
  685. SIP_OPTIONS options; //OPTIONS. It is valid only when the transaction type is SIP_TRANSCTYPE_OPTIONS.
  686. SIP_SUBSCRIBE subscribe; //SUBSCRIBE. It is valid only when the transaction type is SIP_TRANSCTYPE_SUBSCRIBE.
  687. SIP_MESSAGE message; //MESSAGE. It is valid only when the transaction type is SIP_TRANSCTYPE_MESSAGE.
  688. }u;
  689. }SIP_TRANSACTION;
  690. typedef struct{
  691. UCHAR ucIsxNo; //node number
  692. UCHAR ucBrdNo; //SIP board number
  693. UCHAR ucTranscType; //Transaction type. Refer to eSIP_TRANSACTION_TYPE.
  694. union{
  695. SIP_GENTRANSC_ACK options_ack; //OPTIONS ACK. It is valid only when the transaction type is SIP_TRANSCTYPE_OPTIONS.
  696. SIP_SUBSCRIBE_ACK subscribe_ack; //SUBSCRIBE ACK. It is valid only when the transaction type is SIP_TRANSCTYPE_SUBSCRIBE.
  697. SIP_GENTRANSC_ACK message_ack; //MESSAGE ACK. It is valid only when the transaction type is SIP_TRANSCTYPE_MESSAGE.
  698. }u;
  699. }SIP_TRANSACTION_ACK;
  700. typedef struct{
  701. UCHAR ucIsxNo; //node number
  702. UCHAR ucBrdNo; //SIP board number
  703. UCHAR ucTranscType; //Transaction type. Refer to eSIP_TRANSACTION_TYPE.
  704. union{
  705. SIP_OPTIONS_IND options; //OPTIONS IND. It is valid only when the transaction type is SIP_TRANSCTYPE_OPTIONS.
  706. SIP_SUBSCRIBE_IND subscribe; //SUBSCRIBE IND. It is valid only when the transaction type is SIP_TRANSCTYPE_SUBSCRIBE.
  707. SIP_MESSAGE_IND message; //MESSAGE IND. It is valid only when the transaction type is SIP_TRANSCTYPE_MESSAGE.
  708. }u;
  709. }SIP_TRANSACTION_IND;
  710. typedef struct{
  711. UCHAR ucIsxNo; //node number
  712. UCHAR ucBrdNo; //SIP board number
  713. UCHAR ucTranscType; //Transaction type. Refer to eSIP_TRANSACTION_TYPE.
  714. UINT ulSerialNo; //Transaction Number
  715. SHORT sRetVal; //Transaction processing results. 0 indicates success, and -1 indicates failure.
  716. }SIP_TRANSACTION_RET;
  717. #pragma pack()
  718. #endif