Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1139 lines
38 KiB

  1. /*++
  2. Copyright (c) 1999 Microsoft Corporation
  3. Module Name:
  4. call.h
  5. Abstract:
  6. Definitions for H.323 TAPI Service Provider call objects.
  7. Author:
  8. Nikhil Bobde (NikhilB)
  9. Revision History:
  10. --*/
  11. #ifndef _INC_CALL
  12. #define _INC_CALL
  13. //
  14. // Header files
  15. //
  16. #include "q931pdu.h"
  17. #include "q931obj.h"
  18. #define H323_CALL_FEATURES (LINECALLFEATURE_DROP | \
  19. LINECALLFEATURE_SETUPTRANSFER | \
  20. LINECALLFEATURE_COMPLETETRANSF | \
  21. LINECALLFEATURE_DIAL | \
  22. LINECALLFEATURE_HOLD | \
  23. LINECALLFEATURE_ANSWER | \
  24. LINECALLFEATURE_REDIRECT | \
  25. LINECALLFEATURE_RELEASEUSERUSERINFO | \
  26. LINECALLFEATURE_SENDUSERUSER | \
  27. LINECALLFEATURE_UNHOLD | \
  28. LINECALLFEATURE_GENERATEDIGITS | \
  29. LINECALLFEATURE_MONITORDIGITS)
  30. #define IsValidDTMFDigit(wDigit) ( \
  31. ((wDigit >= L'0') && (wDigit <= L'9')) || \
  32. ((wDigit >= L'A') && (wDigit <= L'D')) || \
  33. (wDigit == L'*') || \
  34. (wDigit == L'#') || \
  35. (wDigit == L'!') || \
  36. (wDigit == L',') \
  37. )
  38. //
  39. // Type definitions
  40. //
  41. struct EXPIRE_CONTEXT;
  42. #define CHECKRESTRICTION_EXPIRE_TIME 15000
  43. #define CALLREROUTING_EXPIRE_TIME 10000
  44. #define CTIDENTIFY_SENT_TIMEOUT 30000
  45. #define CTIDENTIFYRR_SENT_TIMEOUT 45000
  46. #define CTINITIATE_SENT_TIMEOUT 60000
  47. enum U2U_DIRECTION
  48. {
  49. U2U_OUTBOUND = 0x00000001,
  50. U2U_INBOUND = 0x00000002,
  51. };
  52. enum CALLOBJECT_STATE
  53. {
  54. CALLOBJECT_INITIALIZED = 0x00000001,
  55. CALLOBJECT_SHUTDOWN = 0x00000002,
  56. H245_START_MSG_SENT = 0x00000004,
  57. TSPI_CALL_LOCAL_HOLD = 0x00000008,
  58. };
  59. enum FAST_START_STATE
  60. {
  61. FAST_START_UNDECIDED = 0x00000001,
  62. FAST_START_NOTAVAIL = 0x00000002,
  63. FAST_START_AVAIL = 0x00000004,
  64. FAST_START_SELF_AVAIL = 0x00000008,
  65. FAST_START_PEER_AVAIL = 0x000000010,
  66. };
  67. enum RASCALL_STATE
  68. {
  69. RASCALL_STATE_IDLE = 0x00000001,
  70. RASCALL_STATE_ARQSENT = 0x00000002,
  71. RASCALL_STATE_ARQEXPIRED = 0x00000004,
  72. RASCALL_STATE_DRQSENT = 0x00000008,
  73. RASCALL_STATE_DRQEXPIRED = 0x000000010,
  74. RASCALL_STATE_REGISTERED = 0x000000020,
  75. RASCALL_STATE_UNREGISTERED = 0x000000040,
  76. RASCALL_STATE_ARJRECVD = 0x000000080,
  77. };
  78. enum H323_CALLTYPE
  79. {
  80. CALLTYPE_NORMAL = 0x00000000,
  81. CALLTYPE_FORWARDCONSULT = 0x00000001,
  82. CALLTYPE_DIVERTEDDEST = 0x00000002,
  83. CALLTYPE_DIVERTEDSRC = 0x00000004,
  84. CALLTYPE_DIVERTEDSRC_NOROUTING = 0x00000008,
  85. CALLTYPE_DIVERTED_SERVED = 0x00000010,
  86. CALLTYPE_TRANSFEREDSRC = 0x00000020,
  87. CALLTYPE_TRANSFERING_PRIMARY = 0x00000040,
  88. CALLTYPE_TRANSFERING_CONSULT = 0x00000080,
  89. CALLTYPE_TRANSFEREDDEST = 0x00000100,
  90. CALLTYPE_TRANSFERED_PRIMARY = 0x00000200,
  91. CALLTYPE_TRANSFERED2_CONSULT = 0x00000400,
  92. CALLTYPE_DIVERTEDTRANSFERED = 0x00000800,
  93. };
  94. enum SUPP_CALLSTATE
  95. {
  96. H4503_CALLSTATE_IDLE = 0x00000000,
  97. H4503_CHECKRESTRICTION_SENT = 0x00000001,
  98. H4503_DIVERSIONLEG1_SENT = 0x00000002,
  99. H4503_DIVERSIONLEG2_SENT = 0x00000004,
  100. H4503_DIVERSIONLEG3_SENT = 0x00000008,
  101. H4503_DIVERSIONLEG1_RECVD = 0x00000010,
  102. H4503_DIVERSIONLEG2_RECVD = 0x00000020,
  103. H4503_DIVERSIONLEG3_RECVD = 0x00000040,
  104. H4503_CALLREROUTING_SENT = 0x00000080,
  105. H4503_CALLREROUTING_RECVD = 0x00000100,
  106. H4503_CHECKRESTRICTION_RECV = 0x00000200,
  107. H4503_CHECKRESTRICTION_SUCC = 0x00000400,
  108. H4503_CALLREROUTING_RRSUCC = 0x00000800,
  109. H4502_CTINITIATE_SENT = 0x00001000,
  110. H4502_CTINITIATE_RECV = 0x00002000,
  111. H4502_CTSETUP_SENT = 0x00004000,
  112. H4502_CTSETUP_RECV = 0x00008000,
  113. H4502_CTIDENTIFY_SENT = 0x00010000,
  114. H4502_CTIDENTIFY_RECV = 0x00020000,
  115. H4502_CIIDENTIFY_RRSUCC = 0x00040000,
  116. H4502_CONSULTCALL_INITIATED = 0x00080000,
  117. };
  118. // CH323Call::m_dwQ931Flags
  119. enum Q931_STATE
  120. {
  121. Q931_CALL_CONNECTING = 0x00010000, //connect has been issued on the socket
  122. Q931_CALL_CONNECTED = 0x00100000, //FD_CONNECT received
  123. Q931_CALL_DISCONNECTED = 0x01000000, //FD_CLOSE received from peer
  124. };
  125. enum TunnelingCap
  126. {
  127. REMOTE_H245_TUNNELING =0x01,
  128. LOCAL_H245_TUNNELING =0x10,
  129. };
  130. // CH323Call::m_dwStateMachine
  131. //Q931 state machine
  132. enum Q931_CALL_STATE
  133. {
  134. Q931_CALL_STATE_NONE = 0,
  135. //outbound
  136. Q931_ORIGINATE_ADMISSION_PENDING,
  137. Q931_SETUP_SENT,
  138. Q931_ALERT_RECVD,
  139. Q931_PROCEED_RECVD,
  140. Q931_CONNECT_RECVD,
  141. Q931_RELEASE_RECVD,
  142. //inbound
  143. Q931_ANSWER_ADMISSION_PENDING,
  144. Q931_SETUP_RECVD,
  145. Q931_ALERT_SENT,
  146. Q931_PROCEED_SENT,
  147. Q931_CONNECT_SENT,
  148. Q931_RELEASE_SENT
  149. };
  150. typedef struct _TAPI_CALLREQUEST_DATA
  151. {
  152. DWORD EventID;
  153. PH323_CALL pCall;
  154. union
  155. {
  156. PVOID pCallforwardParams;
  157. PBUFFERDESCR pBuf;
  158. };
  159. }TAPI_CALLREQUEST_DATA;
  160. typedef struct _SUPP_REQUEST_DATA
  161. {
  162. DWORD EventID;
  163. HDRVCALL hdCall;
  164. union{
  165. PH323_ALIASNAMES pAliasNames;
  166. HDRVCALL hdReplacementCall;
  167. CTIdentifyRes* pCTIdentifyRes;
  168. ULONG_PTR dwParam1;
  169. };
  170. } SUPP_REQUEST_DATA;
  171. typedef struct _MSPMessageData
  172. {
  173. HDRVCALL hdCall;
  174. TspMspMessageType messageType;
  175. BYTE* pbEncodedBuf;
  176. WORD wLength;
  177. HDRVCALL hReplacementCall;
  178. }MSPMessageData;
  179. enum
  180. {
  181. TSPI_NO_EVENT = 0,
  182. TSPI_MAKE_CALL,
  183. TSPI_ANSWER_CALL,
  184. TSPI_DROP_CALL,
  185. TSPI_CLOSE_CALL,
  186. TSPI_RELEASE_U2U,
  187. TSPI_SEND_U2U,
  188. TSPI_COMPLETE_TRANSFER,
  189. TSPI_LINEFORWARD_SPECIFIC,
  190. TSPI_LINEFORWARD_NOSPECIFIC,
  191. TSPI_DIAL_TRNASFEREDCALL,
  192. TSPI_CALL_UNHOLD,
  193. TSPI_CALL_HOLD,
  194. TSPI_DELETE_CALL,
  195. TSPI_CALL_DIVERT,
  196. H450_PLACE_DIVERTEDCALL,
  197. SWAP_REPLACEMENT_CALL,
  198. DROP_PRIMARY_CALL,
  199. STOP_CTIDENTIFYRR_TIMER,
  200. SEND_CTINITIATE_MESSAGE,
  201. };
  202. BOOL
  203. AddAliasItem( PH323_ALIASNAMES pAliasNames, BYTE* pbAliasName,
  204. DWORD dwAliasSize, WORD wType );
  205. static __inline BOOL AddAliasItem (
  206. IN H323_ALIASNAMES * AliasNames,
  207. IN LPWSTR AliasValue,
  208. IN WORD Type)
  209. {
  210. return AddAliasItem(
  211. AliasNames,
  212. (LPBYTE) AliasValue,
  213. (wcslen (AliasValue) + 1) * sizeof (TCHAR),
  214. Type );
  215. }
  216. typedef struct _UserToUserLE
  217. {
  218. LIST_ENTRY Link;
  219. DWORD dwU2USize;
  220. PBYTE pU2U;
  221. } UserToUserLE, *PUserToUserLE;
  222. typedef enum _FORWARDING_TYPE
  223. {
  224. CALLFORWARD_UNCOND = 1,
  225. CALLFORWARD_BUSY,
  226. CALLFORWARD_NA
  227. } FORWARDING_TYPE;
  228. typedef struct _ForwardAddress
  229. {
  230. DWORD dwForwardType;
  231. H323_ALIASITEM callerAlias;
  232. SOCKADDR_IN saCallerAddr;
  233. H323_ALIASITEM divertedToAlias;
  234. //SOCKADDR_IN saDivertedToAddr;
  235. struct _ForwardAddress* next;
  236. } FORWARDADDRESS, *LPFORWARDADDRESS;
  237. typedef struct _CallForwardParams
  238. {
  239. BOOLEAN fForwardingEnabled;
  240. //specifeis if forwarding is enabled for all calls irrespective of their origin
  241. BOOLEAN fForwardForAllOrigins;
  242. DWORD dwForwardTypeForAllOrigins;
  243. //address to which all the calls are diverted
  244. H323_ALIASITEM divertedToAlias;
  245. //SOCKADDR_IN saDivertedToAddr;
  246. //this filed is NULL if fForwardForAllOrigins is TRUE
  247. //list of addresses forwarded selectively
  248. LPFORWARDADDRESS pForwardedAddresses;
  249. }CALLFORWARDPARAMS, *PCALLFORWARDPARAMS;
  250. struct CALLREROUTINGINFO
  251. {
  252. int diversionCounter;
  253. DiversionReason diversionReason;
  254. DiversionReason originalDiversionReason;
  255. PH323_ALIASNAMES divertingNrAlias;
  256. PH323_ALIASNAMES originalCalledNr;
  257. PH323_ALIASNAMES divertedToNrAlias;
  258. PH323_ALIASNAMES diversionNrAlias;
  259. BOOLEAN fPresentAllow;
  260. };
  261. typedef struct tag_TspMspMessageWithEncodedBuf
  262. {
  263. TspMspMessage message;
  264. BYTE pEncodedASN[4095];
  265. } TspMspMessageEx;
  266. static __inline int MakeCallIndex (
  267. IN HDRVCALL DriverHandleCall)
  268. {
  269. return (int) LOWORD (HandleToUlong (DriverHandleCall));
  270. }
  271. //
  272. // Call capabilites
  273. //
  274. #define H323_CALL_INBOUNDSTATES (LINECALLSTATE_ACCEPTED | \
  275. LINECALLSTATE_CONNECTED | \
  276. LINECALLSTATE_DISCONNECTED | \
  277. LINECALLSTATE_IDLE | \
  278. LINECALLSTATE_OFFERING | \
  279. LINECALLSTATE_RINGBACK | \
  280. LINECALLSTATE_ONHOLD )
  281. #define H323_CALL_OUTBOUNDSTATES (LINECALLSTATE_CONNECTED | \
  282. LINECALLSTATE_DIALING | \
  283. LINECALLSTATE_DISCONNECTED | \
  284. LINECALLSTATE_IDLE | \
  285. LINECALLSTATE_RINGBACK | \
  286. LINECALLSTATE_ONHOLD )
  287. //
  288. // CH323Call class.
  289. //
  290. class CH323Call
  291. {
  292. private:
  293. HDRVCALL m_hdCall; // tspi call handle
  294. DWORD m_dwFlags;
  295. CRITICAL_SECTION m_CriticalSection;
  296. H323_CONFERENCE* m_hdConf; // conf handle
  297. DWORD m_dwCallState; // tspi call state
  298. DWORD m_dwCallStateMode; // tspi call state mode
  299. DWORD m_dwOrigin; // inbound or outbound
  300. H323_OCTETSTRING m_CallData; // call data stored by the app for this call.
  301. DWORD m_dwAddressType; // type of dst address
  302. DWORD m_dwAppSpecific;
  303. DWORD m_dwIncomingModes; // available media modes
  304. DWORD m_dwOutgoingModes; // available media modes
  305. DWORD m_dwRequestedModes; // requested media modes
  306. HDRVMSPLINE m_hdMSPLine;
  307. HTAPIMSPLINE m_htMSPLine;
  308. LIST_ENTRY m_IncomingU2U; // incoming user user messages
  309. LIST_ENTRY m_OutgoingU2U; // outgoing user user messages
  310. GUID m_callIdentifier;
  311. H323_ADDR m_CalleeAddr; // src address
  312. H323_ADDR m_CallerAddr; // dst address
  313. SOCKADDR_IN m_LocalAddr; // THIS END of the Q.931 connection
  314. PH323_ALIASNAMES m_pCalleeAliasNames; // src alias
  315. PH323_ALIASNAMES m_pCallerAliasNames; // dst alias
  316. H323NonStandardData m_NonStandardData;
  317. GUID m_ConferenceID;
  318. PWSTR m_pwszDisplay;
  319. BOOLEAN m_fReadyToAnswer;
  320. BOOLEAN m_fCallAccepted;
  321. //peer information
  322. H323_ADDR m_peerH245Addr;
  323. H323_ADDR m_selfH245Addr;
  324. PWSTR m_pPeerDisplay;
  325. H323NonStandardData m_peerNonStandardData;
  326. PH323_ALIASNAMES m_pPeerExtraAliasNames;
  327. H323_VENDORINFO m_peerVendorInfo;
  328. H323_ENDPOINTTYPE m_peerEndPointType;
  329. PH323_FASTSTART m_pFastStart;
  330. PH323_FASTSTART m_pPeerFastStart;
  331. FAST_START_STATE m_dwFastStart;
  332. //CQ931Call data objects
  333. HANDLE m_hTransport;//event signalled by winsock for
  334. //CONNECT| CLOSE event for incoming connections and
  335. //CLOSE event for outgoing connections
  336. SOCKET m_callSocket;
  337. HANDLE m_hTransportWait;//the event to unregister from thread pool
  338. BOOLEAN m_bStartOfPDU;
  339. HANDLE m_hSetupSentTimer;
  340. Q931_CALL_STATE m_dwStateMachine;
  341. DWORD m_dwQ931Flags;
  342. BOOLEAN m_fActiveMC;
  343. ASN1_CODER_INFO m_ASNCoderInfo;
  344. WORD m_wCallReference;
  345. WORD m_wQ931CallRef;
  346. LIST_ENTRY m_sendBufList;
  347. DWORD m_IoRefCount;
  348. HANDLE m_hCallEstablishmentTimer;
  349. BOOLEAN m_fh245Tunneling;
  350. //RAS call data
  351. RASCALL_STATE m_dwRASCallState;
  352. WORD m_wARQSeqNum;
  353. WORD m_wDRQSeqNum;
  354. HANDLE m_hARQTimer;
  355. HANDLE m_hDRQTimer;
  356. DWORD m_dwDRQRetryCount;
  357. DWORD m_dwARQRetryCount;
  358. BUFFERDESCR m_prepareToAnswerMsgData;
  359. EXPIRE_CONTEXT* m_pARQExpireContext;
  360. EXPIRE_CONTEXT* m_pDRQExpireContext;
  361. //data related to supplementary services
  362. DWORD m_dwCallType;
  363. SUPP_CALLSTATE m_dwCallDiversionState;
  364. ASN1_CODER_INFO m_H450ASNCoderInfo;
  365. DWORD m_dwInvokeID;
  366. BOOLEAN m_fCallInTrnasition;
  367. //data related to call forwarding
  368. CALLREROUTINGINFO* m_pCallReroutingInfo;
  369. HANDLE m_hCheckRestrictionTimer;
  370. HANDLE m_hCallReroutingTimer;
  371. HANDLE m_hCallDivertOnNATimer;
  372. //forwardconsult params
  373. CALLFORWARDPARAMS* m_pCallForwardParams;
  374. LPFORWARDADDRESS m_pForwardAddress;
  375. //data related to call transfer
  376. HANDLE m_hCTIdentifyTimer;
  377. HANDLE m_hCTIdentifyRRTimer;
  378. HANDLE m_hCTInitiateTimer;
  379. BYTE m_pCTCallIdentity[5];
  380. PH323_ALIASNAMES m_pTransferedToAlias;
  381. HDRVCALL m_hdRelatedCall;
  382. //data related to call Hold/Unhold
  383. BOOLEAN m_fRemoteHoldInitiated;
  384. BOOLEAN m_fRemoteRetrieveInitiated;
  385. //Call Object functionality
  386. BOOL SendProceeding(void);
  387. void CopyU2UAsNonStandard( DWORD dwDirection );
  388. BOOL AddU2UNoAlloc( IN DWORD dwDirection, IN DWORD dwDataSize,
  389. IN PBYTE pData );
  390. BOOL RemoveU2U( DWORD dwDirection, PUserToUserLE * ppU2ULE );
  391. BOOL FreeU2U( DWORD dwDirection );
  392. BOOL ResolveCallerAddress();
  393. BOOL ResolveE164Address( LPCWSTR pwszDialableAddr );
  394. BOOL ResolveIPAddress( LPSTR pszDialableAddr );
  395. BOOL ResolveEmailAddress( LPCWSTR pwszDialableAddr,
  396. PSTR pszUser, LPSTR pszDomain);
  397. BOOL PlaceCall();
  398. BOOL HandleConnectMessage( Q931_CONNECT_ASN *pConnectASN );
  399. void HandleAlertingMessage( Q931_ALERTING_ASN * pAlertingASN );
  400. void HandleProceedingMessage( Q931_ALERTING_ASN * pProceedingAS );
  401. BOOL HandleReleaseMessage( Q931_RELEASE_COMPLETE_ASN *pReleaseASN );
  402. BOOL InitializeIncomingCall( IN Q931_SETUP_ASN* pSetupASN,
  403. IN DWORD dwCallType, IN WORD wCallRef );
  404. BOOL SetupCall();
  405. void SetNonStandardData( H323_UserInformation & UserInfo );
  406. BOOL SendQ931Message( DWORD dwInvokeID, ULONG_PTR dwParam1,
  407. ULONG_PTR dwParam2, DWORD dwMessageType, DWORD APDUType );
  408. BOOL OnReceiveAlerting( Q931MESSAGE* pMessage );
  409. BOOL OnReceiveProceeding( Q931MESSAGE* pMessage );
  410. BOOL OnReceiveFacility( Q931MESSAGE* pMessage );
  411. BOOL OnReceiveRelease( Q931MESSAGE* pMessage );
  412. BOOL OnReceiveConnect( Q931MESSAGE* pMessage );
  413. BOOL OnReceiveSetup( Q931MESSAGE* pMessage );
  414. BOOL EncodeConnectMessage( DWORD dwInvokeID, BYTE **ppEncodedBuf,
  415. WORD *pdwEncodedLength, DWORD dwAPDUType );
  416. BOOL EncodeReleaseCompleteMessage( DWORD dwInvokeID, BYTE *pbReason,
  417. BYTE **ppEncodedBuf, WORD *pdwEncodedLength, DWORD dwAPDUType );
  418. BOOL EncodeProceedingMessage( DWORD dwInvokeID, BYTE **ppEncodedBuf,
  419. WORD *pdwEncodedLength, IN DWORD dwAPDUType );
  420. BOOL EncodeAlertMessage( DWORD dwInvokeID, BYTE **ppEncodedBuf,
  421. WORD *pdwEncodedLength, IN DWORD dwAPDUType );
  422. BOOL EncodeFacilityMessage( IN DWORD dwInvokeID, IN BYTE bReason,
  423. IN ASN1octetstring_t* pH245PDU, OUT BYTE **ppEncodedBuf,
  424. OUT WORD *pdwEncodedLength, IN DWORD dwAPDUType );
  425. BOOL EncodeSetupMessage( DWORD dwInvokeID, WORD wGoal, WORD wCallType,
  426. BYTE **ppEncodedBuf, WORD *pdwEncodedLength, IN DWORD dwAPDUType );
  427. BOOL EncodeMessage( PQ931MESSAGE pMessage, BYTE **pbCodedBuffer,
  428. DWORD *pdwCodedBufferLength, DWORD dwMessageLength);
  429. void WriteQ931Fields( PBUFFERDESCR pBuf, PQ931MESSAGE pMessage,
  430. DWORD * pdwPDULength );
  431. BOOL EncodeH450APDU( DWORD dwInvokeID, IN DWORD dwAPDUType,
  432. OUT BYTE** ppEncodedAPDU, OUT DWORD* pdwAPDULen );
  433. void RecvBuffer( BOOL *fDelete );
  434. void ReadEvent( DWORD cbTransfer );
  435. BOOL ProcessQ931PDU( CALL_RECV_CONTEXT* pRecvBuf );
  436. void OnConnectComplete();
  437. BOOL SendBuffer( BYTE* pbBuffer, DWORD dwLength );
  438. BOOL AcceptH323Call();
  439. BOOL GetPeerAddress( H323_ADDR *pAddr);
  440. BOOL GetHostAddress( H323_ADDR *pAddr );
  441. BOOL EncodePDU( BINARY_STRING *pUserUserData, BYTE ** ppbCodedBuffer,
  442. DWORD * pdwCodedBufferLength, DWORD dwMessageType,
  443. WCHAR* pszCalledPartyNumber );
  444. int EncodeASN( void *pStruct, int nPDU,
  445. BYTE **ppEncoded, WORD *pcbEncodedSize );
  446. int EncodeH450ASN( void *pStruct, int nPDU,
  447. BYTE **ppEncoded, WORD *pcbEncodedSize );
  448. BOOL ParseSetupASN( BYTE *pEncodedBuf, DWORD dwEncodedLength,
  449. Q931_SETUP_ASN *pSetupASN,
  450. OUT DWORD* pdwH450APDUType );
  451. BOOL ParseReleaseCompleteASN( BYTE *pEncodedBuf, DWORD dwEncodedLength,
  452. Q931_RELEASE_COMPLETE_ASN *pReleaseASN,
  453. DWORD* pdwH450APDUType );
  454. BOOL ParseConnectASN( BYTE *pEncodedBuf, DWORD dwEncodedLength,
  455. Q931_CONNECT_ASN *pConnectASN,
  456. DWORD* pdwH450APDUType );
  457. BOOL ParseAlertingASN( BYTE *pEncodedBuf, DWORD dwEncodedLength,
  458. Q931_ALERTING_ASN *pAlertingASN,
  459. DWORD* pdwH450APDUType );
  460. BOOL ParseProceedingASN( BYTE *pEncodedBuf, DWORD dwEncodedLength,
  461. Q931_CALL_PROCEEDING_ASN *pProceedingASN,
  462. DWORD* pdwH450APDUType );
  463. BOOL ParseFacilityASN( IN BYTE * pEncodedBuf, IN DWORD dwEncodedLength,
  464. OUT Q931_FACILITY_ASN * pFacilityASN );
  465. int DecodeASN( void **ppStruct, int nPDU,
  466. BYTE *pEncoded, DWORD cbEncodedSize );
  467. int InitASNCoder();
  468. int TermASNCoder();
  469. int InitH450ASNCoder();
  470. int TermH450ASNCoder();
  471. BOOL SendSetupMessage();
  472. HRESULT Q931ParseMessage( BYTE *CodedBufferPtr, DWORD CodedBufferLength,
  473. PQ931MESSAGE Message );
  474. BOOL HandleSetupMessage( IN Q931MESSAGE* pMessage );
  475. //GK RAS functions
  476. BOOL SendDCF( WORD seqNumber );
  477. BOOL SendARQ( long seqNumber );
  478. BOOL SendDRQ( IN USHORT usDisengageReason, long seqNumber,
  479. BOOL fResendOnExpire );
  480. //supplementary services functions
  481. void FreeCallForwardData();
  482. void HandleFacilityMessage( IN DWORD dwInvokeID,
  483. IN Q931_FACILITY_ASN * pFacilityASN );
  484. void FreeCallReroutingInfo(void);
  485. BOOL InitiateCallDiversion( IN PH323_ALIASITEM pwszDivertedToAlias,
  486. IN DiversionReason eDiversionMode );
  487. BOOL EncodeDivertingLeg3APDU(
  488. OUT H4501SupplementaryService *pSupplementaryServiceAPDU,
  489. OUT BYTE** ppEncodedAPDU, OUT DWORD* pdwAPDULen );
  490. BOOL EncodeCallReroutingAPDU(
  491. OUT H4501SupplementaryService *pSupplementaryServiceAPDU,
  492. OUT BYTE** ppEncodedAPDU, OUT DWORD* pdwAPDULen );
  493. BOOL EncodeDivertingLeg2APDU(
  494. OUT H4501SupplementaryService *pSupplementaryServiceAPDU,
  495. OUT BYTE** ppEncodedAPDU, OUT DWORD* pdwAPDULen );
  496. BOOL EncodeCheckRestrictionAPDU(
  497. OUT H4501SupplementaryService *pSupplementaryServiceAPDU,
  498. OUT BYTE** ppEncodedAPDU, OUT DWORD* pdwAPDULen );
  499. BOOL EncodeDummyReturnResultAPDU( IN DWORD dwInvokeID, IN DWORD dwOpCode,
  500. IN H4501SupplementaryService *pH450APDU, OUT BYTE** ppEncodedAPDU,
  501. OUT DWORD* pdwAPDULen );
  502. BOOL EncodeReturnErrorAPDU( IN DWORD dwInvokeID,
  503. IN DWORD dwErrorCode,IN H4501SupplementaryService *pH450APDU,
  504. OUT BYTE** ppEncodedAPDU, OUT DWORD* pdwAPDULen );
  505. BOOL EncodeRejectAPDU( IN H4501SupplementaryService* SupplementaryServiceAPDU,
  506. IN DWORD dwInvokeID, OUT BYTE** ppEncodedAPDU, OUT DWORD* pdwAPDULen );
  507. BOOL HandleCallRerouting( IN BYTE * pEncodeArg,IN DWORD dwEncodedArgLen );
  508. BOOL HandleDiversionLegInfo3(
  509. IN BYTE * pEncodeArg,IN DWORD dwEncodedArgLen );
  510. BOOL HandleDiversionLegInfo2(IN BYTE * pEncodeArg,IN DWORD dwEncodedArgLen );
  511. BOOL HandleDiversionLegInfo1(IN BYTE * pEncodeArg,IN DWORD dwEncodedArgLen );
  512. BOOL HandleCheckRestriction( IN BYTE * pEncodeArg,IN DWORD dwEncodedArgLen,
  513. IN Q931_SETUP_ASN* pSetupASN );
  514. BOOL HandleReturnResultDummyType(
  515. H4501SupplementaryService * pH450APDUStruct );
  516. BOOL HandleReject( IN H4501SupplementaryService * pH450APDUStruct );
  517. BOOL HandleReturnError( IN H4501SupplementaryService * pH450APDUStruct );
  518. BOOL HandleH450APDU( IN PH323_UU_PDU_h4501SupplementaryService pH450APDU,
  519. IN DWORD* pdwH450APDUType, DWORD* pdwInvokeID,
  520. IN Q931_SETUP_ASN* pSetupASN );
  521. int DecodeH450ASN( OUT void ** ppStruct, IN int nPDU,
  522. IN BYTE * pEncoded, IN DWORD cbEncodedSize );
  523. BOOL ResolveToIPAddress( IN WCHAR* pwszAddr, IN SOCKADDR_IN* psaAddr );
  524. void DropSupplementaryServicesCalls();
  525. BOOL IsValidInvokeID( DWORD dwInvokeId );
  526. void OnCallReroutingReceive( IN DWORD dwInvokeID );
  527. BOOL StartTimerForCallDiversionOnNA( IN PH323_ALIASITEM pwszDivertedToAlias );
  528. BOOL HandleCTIdentifyReturnResult( IN BYTE * pEncodeArg,
  529. IN DWORD dwEncodedArgLen );
  530. BOOL HandleCTInitiate( IN BYTE * pEncodeArg, IN DWORD dwEncodedArgLen );
  531. BOOL HandleCTSetup( IN BYTE * pEncodeArg, IN DWORD dwEncodedArgLen );
  532. BOOL EncodeH450APDUNoArgument( IN DWORD dwOpcode,
  533. OUT H4501SupplementaryService *pSupplementaryServiceAPDU,
  534. OUT BYTE** ppEncodedAPDU, OUT DWORD* pdwAPDULen );
  535. BOOL EncodeCTInitiateAPDU( OUT H4501SupplementaryService *pSupplementaryServiceAPDU,
  536. OUT BYTE** ppEncodedAPDU, OUT DWORD* pdwAPDULen );
  537. BOOL EncodeCTSetupAPDU( OUT H4501SupplementaryService *pSupplementaryServiceAPDU,
  538. OUT BYTE** ppEncodedAPDU, OUT DWORD* pdwAPDULen );
  539. BOOL EncodeCTIdentifyReturnResult( ServiceApdus_rosApdus *pROSAPDU );
  540. BOOL HandleCTIdentify( IN DWORD dwInvokeID );
  541. BOOL EncodeFastStartProposal( PH323_FASTSTART pFastStart,
  542. BYTE** ppEncodedBuf, WORD* pwEncodedLength );
  543. BOOL EnableCallForwarding();
  544. BOOL EncodeDummyResult( OUT ServiceApdus_rosApdus *pROSAPDU );
  545. void FreeCallReroutingArg( CallReroutingArgument* pCallReroutingArg );
  546. BOOL HandleCallDiversionFacility( PH323_ADDR pAlternateAddress );
  547. BOOL HandleCallDiversionFacility( PH323_ALIASNAMES pAliasList );
  548. BOOL HandleTransferFacility( PH323_ADDR pAlternateAddress );
  549. BOOL HandleTransferFacility( PH323_ALIASNAMES pAliasList );
  550. public:
  551. BOOLEAN m_fMonitoringDigits; // listening for dtmf flag
  552. HTAPICALL m_htCall; // tapi call handle
  553. CALL_RECV_CONTEXT m_RecvBuf;
  554. BOOL IsEqualConferenceID(
  555. GUID* pConferenceID
  556. )
  557. {
  558. return IsEqualGUID (m_ConferenceID, *pConferenceID);
  559. }
  560. INT GetCallIndex (void) const { return MakeCallIndex (m_hdCall); }
  561. void SetAppSpecific(
  562. DWORD dwAppSpecific
  563. )
  564. {
  565. m_dwAppSpecific = dwAppSpecific;
  566. PostLineEvent( LINE_CALLINFO, LINECALLINFOSTATE_APPSPECIFIC, 0, 0 );
  567. }
  568. BOOL SetCallData( LPVOID lpCallData, DWORD dwSize );
  569. void SetCallDiversionState(
  570. IN SUPP_CALLSTATE dwCallDiversionState
  571. )
  572. {
  573. m_dwCallDiversionState = dwCallDiversionState;
  574. }
  575. SUPP_CALLSTATE GetCallDiversionState(void)
  576. {
  577. return m_dwCallDiversionState;
  578. }
  579. void SetAddressType( DWORD dwAddressType )
  580. {
  581. m_dwAddressType = dwAddressType;
  582. }
  583. inline BOOL IsCallOnHold()
  584. {
  585. return ( m_dwCallState == LINECALLSTATE_ONHOLD );
  586. }
  587. inline BOOL IsCallOnLocalHold()
  588. {
  589. return ((m_dwCallState == LINECALLSTATE_ONHOLD) &&
  590. (m_dwFlags & TSPI_CALL_LOCAL_HOLD) );
  591. }
  592. void SetCallState( DWORD dwCallState )
  593. {
  594. m_dwCallState = dwCallState;
  595. }
  596. void Lock()
  597. {
  598. H323DBG(( DEBUG_LEVEL_VERBOSE, "H323 call:%p waiting on lock.", this ));
  599. EnterCriticalSection( &m_CriticalSection );
  600. H323DBG(( DEBUG_LEVEL_VERBOSE, "H323 call:%p locked.", this ));
  601. }
  602. PWSTR GetDialableAddress()
  603. {
  604. _ASSERTE( m_dwOrigin == LINECALLORIGIN_OUTBOUND );
  605. _ASSERTE( m_pCalleeAliasNames );
  606. return m_pCalleeAliasNames->pItems[0].pData;
  607. }
  608. PH323_ADDR GetPeerH245Addr()
  609. {
  610. return &m_peerH245Addr;
  611. }
  612. PH323_FASTSTART GetPeerFastStart()
  613. {
  614. return m_pPeerFastStart;
  615. }
  616. WCHAR* GetTransferedToAddress()
  617. {
  618. return m_pTransferedToAlias->pItems[0].pData;
  619. }
  620. void Unlock()
  621. {
  622. LeaveCriticalSection(&m_CriticalSection );
  623. H323DBG(( DEBUG_LEVEL_VERBOSE, "H323 call:%p unlocked.", this ));
  624. }
  625. //!!must be always called in a lock
  626. BOOL IsCallShutdown()
  627. {
  628. return (m_dwFlags & CALLOBJECT_SHUTDOWN);
  629. }
  630. HDRVCALL GetCallHandle()
  631. {
  632. return m_hdCall;
  633. }
  634. WORD GetARQSeqNumber()
  635. {
  636. return m_wARQSeqNum;
  637. }
  638. WORD GetDRQSeqNumber()
  639. {
  640. return m_wDRQSeqNum;
  641. }
  642. WORD GetCallRef()
  643. {
  644. return m_wCallReference;
  645. }
  646. DWORD GetCallState()
  647. {
  648. return m_dwCallState;
  649. }
  650. DWORD GetStateMachine()
  651. {
  652. return m_dwStateMachine;
  653. }
  654. //!!must be always called in a lock
  655. void SetCallType( DWORD dwCallType )
  656. {
  657. m_dwCallType |= dwCallType;
  658. }
  659. //!!must be always called in a lock
  660. BOOL SetCalleeAlias(
  661. IN WCHAR* pwszDialableAddr,
  662. IN WORD wType
  663. )
  664. {
  665. return AddAliasItem( m_pCalleeAliasNames, pwszDialableAddr, wType );
  666. }
  667. BOOL SetCallerAlias(
  668. IN WCHAR* pwszDialableAddr,
  669. IN WORD wType
  670. )
  671. {
  672. H323DBG(( DEBUG_LEVEL_ERROR, "Caller alias count:%d : %p", m_pCallerAliasNames->wCount, this ));
  673. BOOL retVal = AddAliasItem( m_pCallerAliasNames, pwszDialableAddr, wType );
  674. H323DBG(( DEBUG_LEVEL_ERROR, "Caller alias count:%d : %p", m_pCallerAliasNames->wCount, this ));
  675. return retVal;
  676. }
  677. void InitializeRecvBuf();
  678. CH323Call();
  679. ~CH323Call();
  680. BOOL HandleProceedWithAnswer( IN PTspMspMessage pMessage );
  681. void CompleteTransfer( PH323_CALL pConsultCall );
  682. BOOL AddU2U( DWORD dwDirection, DWORD dwDataSize, PBYTE pData );
  683. LONG SetDivertedToAlias( WCHAR* pwszDivertedToAddr, WORD wAliasType );
  684. BOOL ResolveAddress( LPCWSTR pwszDialableAddr );
  685. PH323_CONFERENCE CreateConference( GUID* pConferenceId );
  686. BOOL DropCall( DWORD dwDisconnectMode );
  687. LONG CopyCallInfo( LPLINECALLINFO pCallInfo );
  688. void CopyCallStatus( LPLINECALLSTATUS pCallStatus );
  689. BOOL ChangeCallState( DWORD dwCallState, DWORD dwCallStateMode );
  690. void AcceptCall();
  691. BOOL HandleMSPMessage( PTspMspMessage pMessage, HDRVMSPLINE hdMSPLine,
  692. HTAPIMSPLINE htMSPLine );
  693. void SendMSPMessage( IN TspMspMessageType messageType, IN BYTE* pbEncodedBuf,
  694. IN DWORD dwLength, IN HDRVCALL hReplacementCall );
  695. void SendMSPStartH245( PH323_ADDR pPeerH245Addr,
  696. PH323_FASTSTART pPeerFastStart );
  697. BOOL HandleReadyToInitiate( PTspMspMessage pMessage );
  698. void WriteComplete( BOOL* fDelete );
  699. BOOL HandleReadyToAnswer( PTspMspMessage pMessage );
  700. void ReleaseU2U();
  701. void SendU2U( BYTE* pUserUserInfo, DWORD dwSize );
  702. void OnRequestInProgress( IN RequestInProgress* RIP );
  703. BOOL QueueTAPICallRequest( IN DWORD EventID, IN PVOID pBuf );
  704. void SetNewCallInfo( HANDLE hConnWait, HANDLE hWSAEvent, DWORD dwState );
  705. void SetQ931CallState( DWORD dwState );
  706. BOOL InitializeQ931( SOCKET callSocket );
  707. void HandleTransportEvent();
  708. void SetupSentTimerExpired();
  709. BOOL PostReadBuffer();
  710. void CloseCall( IN DWORD dwDisconnectMOde );
  711. BOOL ValidateCallParams( LPLINECALLPARAMS pCallParams,
  712. LPCWSTR pwszDialableAddr, PDWORD pdwStatus );
  713. BOOL Initialize( HTAPICALL htCall, DWORD dwOrigin, DWORD dwCallType );
  714. void Shutdown( BOOL* fDelete );
  715. static void NTAPI SetupSentTimerCallback( PVOID dwParam1, BOOLEAN bTimer );
  716. //GK RAS functions
  717. void OnDisengageReject(IN DisengageReject* DRJ);
  718. void OnDisengageConfirm(IN DisengageConfirm* DCF);
  719. void OnAdmissionConfirm( IN AdmissionConfirm * ACF );
  720. void OnAdmissionReject( IN AdmissionReject *ARJ );
  721. static void NTAPI DRQExpiredCallback( PVOID dwParam1, BOOLEAN bTimer );
  722. static void NTAPI ARQExpiredCallback( PVOID dwParam1, BOOLEAN bTimer );
  723. static void NTAPI CallEstablishmentExpiredCallback( PVOID dwParam1,
  724. BOOLEAN bTimer );
  725. void ARQExpired( WORD seqNumber );
  726. void DRQExpired( WORD seqNumber );
  727. void OnDisengageRequest( DisengageRequest * DRQ );
  728. //supplementary services functions
  729. void Forward( DWORD event, PVOID dwParam1 );
  730. LONG ValidateForwardParams( IN LPLINEFORWARDLIST lpLineForwardList,
  731. OUT PVOID* ppForwardParams, OUT DWORD* pEvent );
  732. static void NTAPI CheckRestrictionTimerCallback( IN PVOID dwParam1,
  733. IN BOOLEAN bTimer );
  734. static void NTAPI CallReroutingTimerCallback( IN PVOID dwParam1,
  735. IN BOOLEAN bTimer );
  736. static void NTAPI CTIdentifyExpiredCallback( IN PVOID dwParam1,
  737. IN BOOLEAN bTimer );
  738. static void NTAPI CTInitiateExpiredCallback( IN PVOID dwParam1,
  739. IN BOOLEAN bTimer );
  740. void SetDivertedCallInfo(
  741. HDRVCALL hdCall,
  742. CALLREROUTINGINFO* pCallReroutingInfo,
  743. SUPP_CALLSTATE dwCallDiversionState,
  744. HDRVMSPLINE hdMSPLine,
  745. PH323_ALIASNAMES pCallerAliasNames,
  746. HTAPIMSPLINE htMSPLine,
  747. PH323_FASTSTART pFastStart,
  748. HDRVCALL hdRelatedCall,
  749. DWORD dwCallType,
  750. DWORD dwAppSpecific,
  751. PH323_OCTETSTRING pCallData
  752. );
  753. PH323_CALL CreateNewDivertedCall( IN PH323_ALIASNAMES pwszCalleeAddr );
  754. void TransferInfoToDivertedCall( IN PH323_CALL pDivertedCall );
  755. BOOL TransferInfoToTransferedCall( IN PH323_CALL pTransferedCall );
  756. BOOL SetTransferedCallInfo( HDRVCALL hdCall,
  757. PH323_ALIASNAMES pCallerAliasNames, BYTE * pCTCallIdentity );
  758. void TransferInfoToReplacementCall( PH323_CALL pReplacementCall );
  759. void DialCall();
  760. void MakeCall();
  761. void DropUserInitiated( IN DWORD dwDisconnectMode );
  762. void CallDivertOnNoAnswer();
  763. static void NTAPI CallDivertOnNACallback( IN PVOID dwParam1,
  764. IN BOOLEAN bTimer );
  765. void SetReplacementCallInfo(
  766. HDRVCALL hdCall,
  767. HDRVMSPLINE hdMSPLine,
  768. HTAPICALL htCall,
  769. HTAPIMSPLINE htMSPLine,
  770. DWORD dwAppSpecific,
  771. PH323_OCTETSTRING pCallData
  772. );
  773. BOOL SendCTInitiateMessagee( IN CTIdentifyRes * pCTIdentifyRes );
  774. LONG InitiateBlindTransfer( IN LPCWSTR lpszDestAddress );
  775. void CTIdentifyExpired();
  776. void CTIdentifyRRExpired();
  777. static void NTAPI CTIdentifyRRExpiredCallback( IN PVOID dwParam1,
  778. IN BOOLEAN bTimer );
  779. void CTInitiateExpired();
  780. BOOL InitiateCallReplacement( PH323_FASTSTART pFastStart,
  781. PH323_ADDR pH245Addr );
  782. void Hold();
  783. void UnHold();
  784. HRESULT GetCallInfo( OUT GUID* ReturnCallID, OUT GUID *ReturnConferenceID );
  785. void DecrementIoRefCount( BOOL * pfDelete );
  786. void StopCTIdentifyRRTimer( HDRVCALL hdRelatedCall );
  787. void PostLineEvent( IN DWORD MessageID, IN DWORD_PTR Parameter1,
  788. IN DWORD_PTR Parameter2, IN DWORD_PTR Parameter3 );
  789. void OnReadComplete( IN DWORD dwStatus,
  790. IN CALL_RECV_CONTEXT *pRecvContext );
  791. void OnWriteComplete( IN DWORD dwStatus,
  792. IN CALL_SEND_CONTEXT * pSendContext );
  793. static void NTAPI IoCompletionCallback(
  794. IN DWORD dwStatus,
  795. IN DWORD dwBytesTransferred,
  796. IN OVERLAPPED * pOverlapped
  797. );
  798. };
  799. class H323_CONFERENCE
  800. {
  801. private:
  802. ULONG_PTR m_hdConference;
  803. PH323_CALL m_pCall;
  804. public:
  805. H323_CONFERENCE( PH323_CALL pCall )
  806. {
  807. m_hdConference = (ULONG_PTR) this;
  808. m_pCall = pCall;
  809. }
  810. };
  811. void FreeCallForwardParams( IN PCALLFORWARDPARAMS pCallForwardParams );
  812. void FreeForwardAddress( IN LPFORWARDADDRESS pForwardAddress );
  813. typedef TSPTable<PH323_CALL> H323_CALL_TABLE;
  814. typedef CTSPArray<H323_CONFERENCE*> H323_CONF_TABLE;
  815. #define IsTransferredCall( dwCallType ) ( (dwCallType & CALLTYPE_TRANSFEREDSRC) || (dwCallType & CALLTYPE_TRANSFERED_PRIMARY) )
  816. //
  817. // TSPI procedures
  818. //
  819. LONG
  820. TSPIAPI
  821. TSPI_lineAnswer(
  822. DRV_REQUESTID dwRequestID,
  823. HDRVCALL hdCall,
  824. LPCSTR pUserUserInfo,
  825. DWORD dwSize
  826. );
  827. LONG
  828. TSPIAPI
  829. TSPI_lineCloseCall(
  830. HDRVCALL hdCall
  831. );
  832. LONG
  833. TSPIAPI
  834. TSPI_lineDrop(
  835. DRV_REQUESTID dwRequestID,
  836. HDRVCALL hdCall,
  837. LPCSTR pUserUserInfo,
  838. DWORD dwSize
  839. );
  840. LONG
  841. TSPIAPI
  842. TSPI_lineGetCallAddressID(
  843. HDRVCALL hdCall,
  844. LPDWORD pdwAddressID
  845. );
  846. LONG
  847. TSPIAPI
  848. TSPI_lineGetCallInfo(
  849. HDRVCALL hdCall,
  850. LPLINECALLINFO pCallInfo
  851. );
  852. LONG
  853. TSPIAPI
  854. TSPI_lineGetCallStatus(
  855. HDRVCALL hdCall,
  856. LPLINECALLSTATUS pCallStatus
  857. );
  858. LONG
  859. TSPIAPI
  860. TSPI_lineMakeCall(
  861. DRV_REQUESTID dwRequestID,
  862. HDRVLINE hdLine,
  863. HTAPICALL htCall,
  864. LPHDRVCALL phdCall,
  865. LPCWSTR pwszDialableAddr,
  866. DWORD dwCountryCode,
  867. LPLINECALLPARAMS const pCallParams
  868. );
  869. LONG
  870. TSPIAPI
  871. TSPI_lineReleaseUserUserInfo(
  872. DRV_REQUESTID dwRequestID,
  873. HDRVCALL hdCall
  874. );
  875. LONG
  876. TSPIAPI
  877. TSPI_lineSendUserUserInfo(
  878. DRV_REQUESTID dwRequestID,
  879. HDRVCALL hdCall,
  880. LPCSTR pUserUserInfo,
  881. DWORD dwSize
  882. );
  883. LONG
  884. TSPIAPI
  885. TSPI_lineMonitorDigits(
  886. HDRVCALL hdCall,
  887. DWORD dwDigitModes
  888. );
  889. LONG
  890. TSPIAPI
  891. TSPI_lineGenerateDigits(
  892. HDRVCALL hdCall,
  893. DWORD dwEndToEndID,
  894. DWORD dwDigitMode,
  895. LPCWSTR pwszDigits,
  896. DWORD dwDuration
  897. );
  898. BOOL IsPhoneNumber( char * szAddr );
  899. // called by Q.931 listener when a new connection is received
  900. void CallProcessIncomingCall (
  901. IN SOCKET Socket,
  902. IN SOCKADDR_IN * LocalAddress,
  903. IN SOCKADDR_IN * RemoteAddress);
  904. void NTAPI Q931TransportEventHandler (
  905. IN PVOID Parameter,
  906. IN BOOLEAN TimerFired);
  907. BOOL
  908. IsValidE164String(
  909. IN WCHAR* wszDigits
  910. );
  911. DWORD
  912. ValidateE164Address(
  913. LPCWSTR pwszDialableAddr,
  914. WCHAR* wszAddr
  915. );
  916. BOOL
  917. QueueSuppServiceWorkItem(
  918. IN DWORD EventID,
  919. IN HDRVCALL hdCall,
  920. IN ULONG_PTR dwParam1
  921. );
  922. #if 0
  923. BOOL
  924. CH323Call::QueueTAPICallRequest(
  925. IN DWORD EventID,
  926. IN PVOID pBuf );
  927. #endif
  928. DWORD
  929. ProcessSuppServiceWorkItemFre(
  930. IN PVOID ContextParameter
  931. );
  932. DWORD
  933. SendMSPMessageOnRelatedCallFre(
  934. IN PVOID ContextParameter
  935. );
  936. DWORD
  937. ProcessTAPICallRequestFre(
  938. IN PVOID ContextParameter
  939. );
  940. #endif // _INC_CALL