OpenH323 1.18.0
|
00001 /* 00002 * h323con.h 00003 * 00004 * H.323 protocol handler 00005 * 00006 * Open H323 Library 00007 * 00008 * Copyright (c) 1998-2001 Equivalence Pty. Ltd. 00009 * 00010 * The contents of this file are subject to the Mozilla Public License 00011 * Version 1.0 (the "License"); you may not use this file except in 00012 * compliance with the License. You may obtain a copy of the License at 00013 * http://www.mozilla.org/MPL/ 00014 * 00015 * Software distributed under the License is distributed on an "AS IS" 00016 * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See 00017 * the License for the specific language governing rights and limitations 00018 * under the License. 00019 * 00020 * The Original Code is Open H323 Library. 00021 * 00022 * The Initial Developer of the Original Code is Equivalence Pty. Ltd. 00023 * 00024 * Portions of this code were written with the assisance of funding from 00025 * Vovida Networks, Inc. http://www.vovida.com. 00026 * 00027 * Contributor(s): ______________________________________. 00028 * 00029 * $Log: h323con.h,v $ 00030 * Revision 1.85 2005/12/09 05:20:07 csoutheren 00031 * Added ability to set explicit Q.931 cause code on call end 00032 * 00033 * Revision 1.84 2005/12/06 05:28:55 csoutheren 00034 * Changed AttachSignalChannel to be virtual 00035 * 00036 * Revision 1.83 2005/11/30 13:05:01 csoutheren 00037 * Changed tags for Doxygen 00038 * 00039 * Revision 1.82 2005/11/04 06:41:28 csoutheren 00040 * Changed PMutex to PTimedMutex 00041 * 00042 * Revision 1.81 2005/09/16 08:11:06 csoutheren 00043 * Added new error code 00044 * Added override for OnIncomingCall that can set return code 00045 * 00046 * Revision 1.80 2005/08/30 08:29:30 csoutheren 00047 * Added new error code 00048 * 00049 * Revision 1.79 2005/08/27 02:14:21 csoutheren 00050 * Capture time that reverse fast start acknowledge is received 00051 * Capture time that connect is sent/received 00052 * 00053 * Revision 1.78 2005/01/03 14:03:20 csoutheren 00054 * Added new configure options and ability to disable/enable modules 00055 * 00056 * Revision 1.77 2005/01/03 06:25:52 csoutheren 00057 * Added extensive support for disabling code modules at compile time 00058 * 00059 * Revision 1.76 2004/12/08 01:59:22 csoutheren 00060 * initial support for Transnexus OSP toolkit 00061 * 00062 * Revision 1.75 2004/11/22 11:30:42 rjongbloed 00063 * Added ability to restart H.245 negotiations, thanks Norbert Bartalsky 00064 * 00065 * Revision 1.74 2004/09/27 08:25:14 csoutheren 00066 * Changed in-header documentation for external headers to reflect changes 00067 * in external RTP interface 00068 * 00069 * Revision 1.73 2004/09/07 22:50:55 rjongbloed 00070 * Changed usage of template function as MSVC6 will not compile it. 00071 * 00072 * Revision 1.72 2004/09/03 01:06:09 csoutheren 00073 * Added initial hooks for H.460 GEF 00074 * Thanks to Simon Horne and ISVO (Asia) Pte Ltd. for this contribution 00075 * 00076 * Revision 1.71 2004/07/13 10:19:40 csoutheren 00077 * Fixed cut & paste errors in comments 00078 * 00079 * Revision 1.70 2004/06/15 03:30:00 csoutheren 00080 * Added OnSendARQ to allow access to the ARQ message before sent by connection 00081 * 00082 * Revision 1.69 2004/04/20 05:24:54 csoutheren 00083 * Added ability to specify Q.931 DisplayName 00084 * 00085 * Revision 1.68 2004/04/13 05:50:50 csoutheren 00086 * Added function to get access to the connection NAT flag 00087 * 00088 * Revision 1.67 2004/04/07 05:31:42 csoutheren 00089 * Added ability to receive calls from endpoints behind NAT firewalls 00090 * 00091 * Revision 1.66 2004/03/04 04:48:29 csoutheren 00092 * Added virtual keyword to allow overring of capability management functions 00093 * Added additional response code needed for MCU 00094 * 00095 * Revision 1.65 2004/02/26 08:32:47 csoutheren 00096 * Added release complete codes for MCU 00097 * 00098 * Revision 1.64 2003/12/28 02:38:14 csoutheren 00099 * Added H323EndPoint::OnOutgoingCall 00100 * 00101 * Revision 1.63 2003/12/14 10:42:29 rjongbloed 00102 * Changes for compilability without video support. 00103 * 00104 * Revision 1.62 2003/10/27 06:03:38 csoutheren 00105 * Added support for QoS 00106 * Thanks to Henry Harrison of AliceStreet 00107 * 00108 * Revision 1.61 2003/10/09 09:47:45 csoutheren 00109 * Fixed problem with re-opening RTP half-channels under unusual 00110 * circumstances. Thanks to Damien Sandras 00111 * 00112 * Revision 1.60 2003/04/30 00:28:50 robertj 00113 * Redesigned the alternate credentials in ARQ system as old implementation 00114 * was fraught with concurrency issues, most importantly it can cause false 00115 * detection of replay attacks taking out an endpoint completely. 00116 * 00117 * Revision 1.59 2003/02/12 23:59:22 robertj 00118 * Fixed adding missing endpoint identifer in SETUP packet when gatekeeper 00119 * routed, pointed out by Stefan Klein 00120 * Also fixed correct rutrn of gk routing in IRR packet. 00121 * 00122 * Revision 1.58 2002/11/27 06:54:52 robertj 00123 * Added Service Control Session management as per Annex K/H.323 via RAS 00124 * only at this stage. 00125 * Added H.248 ASN and very primitive infrastructure for linking into the 00126 * Service Control Session management system. 00127 * Added basic infrastructure for Annex K/H.323 HTTP transport system. 00128 * Added Call Credit Service Control to display account balances. 00129 * 00130 * Revision 1.57 2002/11/15 05:17:22 robertj 00131 * Added facility redirect support without changing the call token for access 00132 * to the call. If it gets redirected a new H323Connection object is 00133 * created but it looks like the same thing to an application. 00134 * 00135 * Revision 1.56 2002/11/13 04:37:23 robertj 00136 * Added ability to get (and set) Q.931 release complete cause codes. 00137 * 00138 * Revision 1.55 2002/11/10 06:17:26 robertj 00139 * Fixed minor documentation errors. 00140 * 00141 * Revision 1.54 2002/11/05 00:24:09 robertj 00142 * Added function to determine if Q.931 CONNECT sent/received. 00143 * 00144 * Revision 1.53 2002/10/31 00:31:47 robertj 00145 * Enhanced jitter buffer system so operates dynamically between minimum and 00146 * maximum values. Altered API to assure app writers note the change! 00147 * 00148 * Revision 1.52 2002/09/16 01:14:15 robertj 00149 * Added #define so can select if #pragma interface/implementation is used on 00150 * platform basis (eg MacOS) rather than compiler, thanks Robert Monaghan. 00151 * 00152 * Revision 1.51 2002/09/03 06:19:36 robertj 00153 * Normalised the multi-include header prevention ifdef/define symbol. 00154 * 00155 * Revision 1.50 2002/08/05 10:03:47 robertj 00156 * Cosmetic changes to normalise the usage of pragma interface/implementation. 00157 * 00158 * Revision 1.49 2002/08/05 05:17:37 robertj 00159 * Fairly major modifications to support different authentication credentials 00160 * in ARQ to the logged in ones on RRQ. For both client and server. 00161 * Various other H.235 authentication bugs and anomalies fixed on the way. 00162 * 00163 * Revision 1.48 2002/07/05 02:22:56 robertj 00164 * Added support for standard and non-standard T.38 mode change. 00165 * 00166 * Revision 1.47 2002/07/04 00:40:31 robertj 00167 * More H.450.11 call intrusion implementation, thanks Aleksandar Todorovic 00168 * 00169 * Revision 1.46 2002/06/22 06:11:30 robertj 00170 * Fixed bug on sometimes missing received endSession causing 10 second 00171 * timeout in connection clean up. 00172 * 00173 * Revision 1.45 2002/06/22 05:48:38 robertj 00174 * Added partial implementation for H.450.11 Call Intrusion 00175 * 00176 * Revision 1.44 2002/06/13 06:15:19 robertj 00177 * Allowed TransferCall() to be used on H323Connection as well as H323EndPoint. 00178 * 00179 * Revision 1.43 2002/06/05 08:58:58 robertj 00180 * Fixed documentation of remote application name string. 00181 * Added missing virtual keywards on some protocol handler functions. 00182 * 00183 * Revision 1.42 2002/05/29 06:40:29 robertj 00184 * Changed sending of endSession/ReleaseComplete PDU's to occur immediately 00185 * on call clearance and not wait for background thread to do it. 00186 * Stricter compliance by waiting for reply endSession before closing down. 00187 * 00188 * Revision 1.41 2002/05/29 03:55:17 robertj 00189 * Added protocol version number checking infrastructure, primarily to improve 00190 * interoperability with stacks that are unforgiving of new features. 00191 * 00192 * Revision 1.40 2002/05/21 09:32:49 robertj 00193 * Added ability to set multiple alias names ona connection by connection 00194 * basis, defaults to endpoint list, thanks Artis Kugevics 00195 * 00196 * Revision 1.39 2002/05/15 23:59:33 robertj 00197 * Added memory management of created T.38 and T.120 handlers. 00198 * Improved documentation for use of T.38 and T.120 functions. 00199 * Added ability to initiate a mode change for non-standard T.38 00200 * 00201 * Revision 1.38 2002/05/07 01:31:51 dereks 00202 * Fix typo in documentation. 00203 * 00204 * Revision 1.37 2002/05/03 05:38:15 robertj 00205 * Added Q.931 Keypad IE mechanism for user indications (DTMF). 00206 * 00207 * Revision 1.36 2002/05/02 07:56:24 robertj 00208 * Added automatic clearing of call if no media (RTP data) is transferred in a 00209 * configurable (default 5 minutes) amount of time. 00210 * 00211 * Revision 1.35 2002/04/25 20:55:25 dereks 00212 * Fix documentation. Thanks Olaf Schulz. 00213 * 00214 * Revision 1.34 2002/04/17 00:50:34 robertj 00215 * Added ability to disable the in band DTMF detection. 00216 * 00217 * Revision 1.33 2002/03/27 06:04:42 robertj 00218 * Added Temporary Failure end code for connection, an application may 00219 * immediately retry the call if this occurs. 00220 * 00221 * Revision 1.32 2002/02/11 04:20:48 robertj 00222 * Fixed documentation errors, thanks Horacio J. Peņa 00223 * 00224 * Revision 1.31 2002/02/11 04:16:37 robertj 00225 * Fixed bug where could send DRQ if never received an ACF. 00226 * 00227 * Revision 1.30 2002/02/06 06:30:47 craigs 00228 * Fixed problem whereby MSD/TCS was stalled if H245 was included in 00229 * SETUP, but other end did not respond 00230 * 00231 * Revision 1.29 2002/02/04 07:17:52 robertj 00232 * Added H.450.2 Consultation Transfer, thanks Norwood Systems. 00233 * 00234 * Revision 1.28 2002/01/25 05:20:05 robertj 00235 * Moved static strings for enum printing to inside of function, could crash with DLL's 00236 * 00237 * Revision 1.27 2002/01/24 06:29:02 robertj 00238 * Added option to disable H.245 negotiation in SETUP pdu, this required 00239 * API change so have a bit mask instead of a series of booleans. 00240 * 00241 * Revision 1.26 2002/01/23 12:45:37 rogerh 00242 * Add the DTMF decoder. This identifies DTMF tones in an audio stream. 00243 * 00244 * Revision 1.25 2002/01/23 07:12:48 robertj 00245 * Added hooks for in band DTMF detection. Now need the detector! 00246 * 00247 * Revision 1.24 2002/01/22 22:48:21 robertj 00248 * Fixed RFC2833 support (transmitter) requiring large rewrite 00249 * 00250 * Revision 1.23 2002/01/18 06:02:08 robertj 00251 * Added some H323v4 functions (fastConnectRefused & TCS in SETUP) 00252 * 00253 * Revision 1.22 2002/01/17 07:04:58 robertj 00254 * Added support for RFC2833 embedded DTMF in the RTP stream. 00255 * 00256 * Revision 1.21 2002/01/14 00:05:24 robertj 00257 * Added H.450.6, better H.450.2 error handling and and Music On Hold. 00258 * Added destExtraCallInfo field for ARQ. 00259 * Thanks Ben Madsen of Norwood Systems 00260 * 00261 * Revision 1.20 2002/01/10 05:13:50 robertj 00262 * Added support for external RTP stacks, thanks NuMind Software Systems. 00263 * 00264 * Revision 1.19 2002/01/09 00:21:36 robertj 00265 * Changes to support outgoing H.245 RequstModeChange. 00266 * 00267 * Revision 1.18 2001/12/22 03:20:31 robertj 00268 * Added create protocol function to H323Connection. 00269 * 00270 * Revision 1.17 2001/12/22 03:09:36 robertj 00271 * Changed OnRequstModeChange to return ack, then actually do the change. 00272 * 00273 * Revision 1.16 2001/12/22 01:52:54 robertj 00274 * Added more support for H.245 RequestMode operation. 00275 * 00276 * Revision 1.15 2001/12/15 08:09:54 robertj 00277 * Added alerting, connect and end of call times to be sent to RAS server. 00278 * 00279 * Revision 1.14 2001/12/13 10:54:23 robertj 00280 * Added ability to automatically add ACF access token to SETUP pdu. 00281 * 00282 * Revision 1.13 2001/11/01 06:11:54 robertj 00283 * Plugged very small mutex hole that could cause crashes. 00284 * 00285 * Revision 1.12 2001/11/01 00:27:33 robertj 00286 * Added default Fast Start disabled and H.245 tunneling disable flags 00287 * to the endpoint instance. 00288 * 00289 * Revision 1.11 2001/10/24 00:54:13 robertj 00290 * Made cosmetic changes to H.245 miscellaneous command function. 00291 * 00292 * Revision 1.10 2001/10/23 02:18:06 dereks 00293 * Initial release of CU30 video codec. 00294 * 00295 * Revision 1.9 2001/09/26 06:20:56 robertj 00296 * Fixed properly nesting connection locking and unlocking requiring a quite 00297 * large change to teh implementation of how calls are answered. 00298 * 00299 * Revision 1.8 2001/09/19 03:30:53 robertj 00300 * Added some support for overlapped dialing, thanks Chris Purvis & Nick Hoath. 00301 * 00302 * Revision 1.7 2001/09/13 06:48:13 robertj 00303 * Added call back functions for remaining Q.931/H.225 messages. 00304 * Added call back to allow modification of Release Complete,thanks Nick Hoath 00305 * 00306 * Revision 1.6 2001/09/12 06:57:58 robertj 00307 * Added support for iNow Access Token from gk, thanks Nick Hoath 00308 * 00309 * Revision 1.5 2001/09/12 06:04:36 robertj 00310 * Added support for sending UUIE's to gk on request, thanks Nick Hoath 00311 * 00312 * Revision 1.4 2001/09/11 01:24:36 robertj 00313 * Added conditional compilation to remove video and/or audio codecs. 00314 * 00315 * Revision 1.3 2001/08/22 06:54:50 robertj 00316 * Changed connection locking to use double mutex to guarantee that 00317 * no threads can ever deadlock or access deleted connection. 00318 * 00319 * Revision 1.2 2001/08/16 07:49:16 robertj 00320 * Changed the H.450 support to be more extensible. Protocol handlers 00321 * are now in separate classes instead of all in H323Connection. 00322 * 00323 * Revision 1.1 2001/08/06 03:08:11 robertj 00324 * Fission of h323.h to h323ep.h & h323con.h, h323.h now just includes files. 00325 * 00326 */ 00327 00328 #ifndef __OPAL_H323CON_H 00329 #define __OPAL_H323CON_H 00330 00331 #ifdef P_USE_PRAGMA 00332 #pragma interface 00333 #endif 00334 00335 #ifdef P_DTMF 00336 #include <ptclib/dtmf.h> 00337 #endif 00338 00339 #include "h323caps.h" 00340 #include "transports.h" 00341 #include "channels.h" 00342 #include "guid.h" 00343 #include "openh323buildopts.h" 00344 00345 #ifdef H323_TRANSNEXUS_OSP 00346 #include "opalosp.h" 00347 /* 00348 namespace OpalOSP { 00349 class Transaction; 00350 class Transaction::DestinationInfo; 00351 }; 00352 */ 00353 #endif 00354 00355 /* The following classes have forward references to avoid including the VERY 00356 large header files for H225 and H245. If an application requires access 00357 to the protocol classes they can include them, but for simple usage their 00358 inclusion can be avoided. 00359 */ 00360 class PPER_Stream; 00361 00362 class H225_EndpointType; 00363 class H225_TransportAddress; 00364 class H225_ArrayOf_PASN_OctetString; 00365 class H225_ProtocolIdentifier; 00366 class H225_AdmissionRequest; 00367 class H225_FeatureSet; 00368 class H225_Setup_UUIE; 00369 00370 class H245_TerminalCapabilitySet; 00371 class H245_TerminalCapabilitySetReject; 00372 class H245_OpenLogicalChannel; 00373 class H245_OpenLogicalChannelAck; 00374 class H245_TransportAddress; 00375 class H245_UserInputIndication; 00376 class H245_RequestMode; 00377 class H245_RequestModeAck; 00378 class H245_RequestModeReject; 00379 class H245_ModeDescription; 00380 class H245_ArrayOf_ModeDescription; 00381 class H245_SendTerminalCapabilitySet; 00382 class H245_MultiplexCapability; 00383 class H245_FlowControlCommand; 00384 class H245_MiscellaneousCommand; 00385 class H245_MiscellaneousIndication; 00386 class H245_JitterIndication; 00387 00388 class H323SignalPDU; 00389 class H323ControlPDU; 00390 00391 class H235Authenticators; 00392 00393 class H245NegMasterSlaveDetermination; 00394 class H245NegTerminalCapabilitySet; 00395 class H245NegLogicalChannels; 00396 class H245NegRequestMode; 00397 class H245NegRoundTripDelay; 00398 00399 #ifdef H323_H450 00400 00401 class H450xDispatcher; 00402 class H4502Handler; 00403 class H4504Handler; 00404 class H4506Handler; 00405 class H45011Handler; 00406 00407 #endif 00408 00409 #ifdef H323_T120 00410 class OpalT120Protocol; 00411 #endif 00412 00413 #ifdef H323_T38 00414 class OpalT38Protocol; 00415 #endif 00416 00417 class OpalRFC2833; 00418 class OpalRFC2833Info; 00419 00420 00421 00423 00430 class H323Connection : public PObject 00431 { 00432 PCLASSINFO(H323Connection, PObject); 00433 00434 public: 00437 enum Options { 00438 FastStartOptionDisable = 0x0001, 00439 FastStartOptionEnable = 0x0002, 00440 FastStartOptionMask = 0x0003, 00441 00442 H245TunnelingOptionDisable = 0x0004, 00443 H245TunnelingOptionEnable = 0x0008, 00444 H245TunnelingOptionMask = 0x000c, 00445 00446 H245inSetupOptionDisable = 0x0010, 00447 H245inSetupOptionEnable = 0x0020, 00448 H245inSetupOptionMask = 0x0030, 00449 00450 DetectInBandDTMFOptionDisable= 0x0040, 00451 DetectInBandDTMFOptionEnable = 0x0080, 00452 DetectInBandDTMFOptionMask = 0x00c0, 00453 }; 00454 00457 H323Connection( 00458 H323EndPoint & endpoint, 00459 unsigned callReference, 00460 unsigned options = 0 00461 ); 00462 00465 ~H323Connection(); 00466 00476 BOOL Lock(); 00477 00489 int TryLock(); 00490 00496 void Unlock(); 00497 00504 virtual void OnSendARQ( 00505 H225_AdmissionRequest & arq 00506 ); 00507 00511 virtual void OnEstablished(); 00512 00516 virtual void OnCleared(); 00517 00524 BOOL IsConnected() const { return connectionState == HasExecutedSignalConnect || connectionState == EstablishedConnection; } 00525 00531 BOOL IsEstablished() const { return connectionState == EstablishedConnection; } 00532 00537 enum CallEndReason { 00538 EndedByLocalUser, 00539 EndedByNoAccept, 00540 EndedByAnswerDenied, 00541 EndedByRemoteUser, 00542 EndedByRefusal, 00543 EndedByNoAnswer, 00544 EndedByCallerAbort, 00545 EndedByTransportFail, 00546 EndedByConnectFail, 00547 EndedByGatekeeper, 00548 EndedByNoUser, 00549 EndedByNoBandwidth, 00550 EndedByCapabilityExchange, 00551 EndedByCallForwarded, 00552 EndedBySecurityDenial, 00553 EndedByLocalBusy, 00554 EndedByLocalCongestion, 00555 EndedByRemoteBusy, 00556 EndedByRemoteCongestion, 00557 EndedByUnreachable, 00558 EndedByNoEndPoint, 00559 EndedByHostOffline, 00560 EndedByTemporaryFailure, 00561 EndedByQ931Cause, 00562 EndedByDurationLimit, 00563 EndedByInvalidConferenceID, 00564 EndedByOSPRefusal, 00565 EndedByInvalidNumberFormat, 00566 EndedByUnspecifiedProtocolError, 00567 NumCallEndReasons 00568 }; 00569 #if PTRACING 00570 friend ostream & operator<<(ostream & o, CallEndReason r); 00571 #endif 00572 00581 CallEndReason GetCallEndReason() const { return callEndReason; } 00582 00587 virtual void SetCallEndReason( 00588 CallEndReason reason, 00589 PSyncPoint * sync = NULL 00590 ); 00591 00597 virtual BOOL ClearCall( 00598 CallEndReason reason = EndedByLocalUser 00599 ); 00600 00603 virtual BOOL ClearCallSynchronous( 00604 PSyncPoint * sync, 00605 CallEndReason reason = EndedByLocalUser 00606 ); 00607 00616 virtual void CleanUpOnCallEnd(); 00618 00619 00624 virtual void AttachSignalChannel( 00625 const PString & token, 00626 H323Transport * channel, 00627 BOOL answeringCall 00628 ); 00629 00632 BOOL WriteSignalPDU( 00633 H323SignalPDU & pdu 00634 ); 00635 00639 virtual void HandleSignallingChannel(); 00640 00644 virtual BOOL HandleSignalPDU( 00645 H323SignalPDU & pdu 00646 ); 00647 00651 virtual void HandleTunnelPDU( 00652 H323SignalPDU * txPDU 00653 ); 00654 00662 virtual BOOL OnReceivedSignalSetup( 00663 const H323SignalPDU & pdu 00664 ); 00665 00672 virtual BOOL OnReceivedSignalSetupAck( 00673 const H323SignalPDU & pdu 00674 ); 00675 00682 virtual BOOL OnReceivedSignalInformation( 00683 const H323SignalPDU & pdu 00684 ); 00685 00694 virtual BOOL OnReceivedCallProceeding( 00695 const H323SignalPDU & pdu 00696 ); 00697 00706 virtual BOOL OnReceivedProgress( 00707 const H323SignalPDU & pdu 00708 ); 00709 00716 virtual BOOL OnReceivedAlerting( 00717 const H323SignalPDU & pdu 00718 ); 00719 00728 virtual BOOL OnReceivedSignalConnect( 00729 const H323SignalPDU & pdu 00730 ); 00731 00740 virtual BOOL OnReceivedFacility( 00741 const H323SignalPDU & pdu 00742 ); 00743 00750 virtual BOOL OnReceivedSignalNotify( 00751 const H323SignalPDU & pdu 00752 ); 00753 00760 virtual BOOL OnReceivedSignalStatus( 00761 const H323SignalPDU & pdu 00762 ); 00763 00770 virtual BOOL OnReceivedStatusEnquiry( 00771 const H323SignalPDU & pdu 00772 ); 00773 00778 virtual void OnReceivedReleaseComplete( 00779 const H323SignalPDU & pdu 00780 ); 00781 00788 virtual BOOL OnUnknownSignalPDU( 00789 const H323SignalPDU & pdu 00790 ); 00791 00803 virtual BOOL OnIncomingCall( 00804 const H323SignalPDU & setupPDU, 00805 H323SignalPDU & alertingPDU 00806 ); 00807 virtual BOOL OnIncomingCall( 00808 const H323SignalPDU & setupPDU, 00809 H323SignalPDU & alertingPDU, 00810 CallEndReason & reason 00811 ); 00812 00822 virtual BOOL ForwardCall( 00823 const PString & forwardParty 00824 ); 00825 00826 #ifdef H323_H450 00827 00832 void TransferCall( 00833 const PString & remoteParty, 00834 const PString & callIdentity = PString::Empty() 00836 ); 00837 00842 void ConsultationTransfer( 00843 const PString & primaryCallToken 00844 ); 00845 00852 virtual void HandleConsultationTransfer( 00853 const PString & callIdentity, 00855 H323Connection & incoming 00856 ); 00857 00860 BOOL IsTransferringCall() const; 00861 00864 BOOL IsTransferredCall() const; 00865 00870 virtual void HandleTransferCall( 00871 const PString & token, 00872 const PString & identity 00873 ); 00874 00879 int GetCallTransferInvokeId(); 00880 00888 virtual void HandleCallTransferFailure( 00889 const int returnError 00890 ); 00891 00896 void SetAssociatedCallToken( 00897 const PString & token 00898 ); 00899 00904 virtual void OnConsultationTransferSuccess( 00905 H323Connection & secondaryCall 00906 ); 00907 00912 void HoldCall( 00913 BOOL localHold 00914 ); 00915 00921 void RetrieveCall(); 00922 00929 void SetHoldMedia( 00930 PChannel * audioChannel 00931 ); 00932 00935 BOOL IsMediaOnHold() const; 00936 00939 BOOL IsLocalHold() const; 00940 00943 BOOL IsRemoteHold() const; 00944 00947 BOOL IsCallOnHold() const; 00948 00953 virtual void IntrudeCall( 00954 unsigned capabilityLevel 00955 ); 00956 00961 virtual void HandleIntrudeCall( 00962 const PString & token, 00963 const PString & identity 00964 ); 00965 00971 void SetCallIntrusion() { isCallIntrusion = TRUE; } 00972 00973 BOOL IsCallIntrusion() { return isCallIntrusion; } 00974 00977 unsigned GetLocalCallIntrusionProtectionLevel() { return callIntrusionProtectionLevel; } 00978 00982 virtual BOOL GetRemoteCallIntrusionProtectionLevel( 00983 const PString & callToken, 00984 unsigned callIntrusionProtectionLevel 00985 ); 00986 00987 virtual void SetIntrusionImpending(); 00988 00989 virtual void SetForcedReleaseAccepted(); 00990 00991 virtual void SetIntrusionNotAuthorized(); 00992 00999 void SendCallWaitingIndication( 01000 const unsigned nbOfAddWaitingCalls = 0 01001 ); 01002 01003 #endif // H323_H450 01004 01005 enum AnswerCallResponse { 01006 AnswerCallNow, 01007 AnswerCallDenied, 01008 AnswerCallPending, 01009 AnswerCallDeferred, 01010 AnswerCallAlertWithMedia, 01011 AnswerCallDeferredWithMedia, 01012 AnswerCallDeniedByInvalidCID, 01013 NumAnswerCallResponses 01014 }; 01015 #if PTRACING 01016 friend ostream & operator<<(ostream & o, AnswerCallResponse s); 01017 #endif 01018 01045 virtual AnswerCallResponse OnAnswerCall( 01046 const PString & callerName, 01047 const H323SignalPDU & setupPDU, 01048 H323SignalPDU & connectPDU 01049 ); 01050 01061 void AnsweringCall( 01062 AnswerCallResponse response 01063 ); 01064 01075 virtual CallEndReason SendSignalSetup( 01076 const PString & alias, 01077 const H323TransportAddress & address 01078 ); 01079 01091 virtual BOOL OnSendSignalSetup( 01092 H323SignalPDU & setupPDU 01093 ); 01094 01103 virtual BOOL OnSendCallProceeding( 01104 H323SignalPDU & callProceedingPDU 01105 ); 01106 01118 virtual BOOL OnSendReleaseComplete( 01119 H323SignalPDU & releaseCompletePDU 01120 ); 01121 01132 virtual BOOL OnAlerting( 01133 const H323SignalPDU & alertingPDU, 01134 const PString & user 01135 ); 01136 01151 virtual BOOL OnInsufficientDigits(); 01152 01165 virtual void SendMoreDigits( 01166 const PString & digits 01167 ); 01168 01178 virtual BOOL OnOutgoingCall( 01179 const H323SignalPDU & connectPDU 01180 ); 01181 01193 virtual BOOL SendFastStartAcknowledge( 01194 H225_ArrayOf_PASN_OctetString & array 01195 ); 01196 01208 virtual BOOL HandleFastStartAcknowledge( 01209 const H225_ArrayOf_PASN_OctetString & array 01210 ); 01211 01219 virtual BOOL StartControlChannel(); 01220 01232 virtual BOOL StartControlChannel( 01233 const H225_TransportAddress & h245Address 01234 ); 01236 01243 BOOL WriteControlPDU( 01244 const H323ControlPDU & pdu 01245 ); 01246 01249 virtual BOOL StartControlNegotiations( 01250 BOOL renegotiate = FALSE 01251 ); 01252 01255 virtual void HandleControlChannel(); 01256 01263 virtual BOOL HandleControlData( 01264 PPER_Stream & strm 01265 ); 01266 01273 virtual BOOL HandleControlPDU( 01274 const H323ControlPDU & pdu 01275 ); 01276 01286 virtual BOOL OnUnknownControlPDU( 01287 const H323ControlPDU & pdu 01288 ); 01289 01293 virtual BOOL OnH245Request( 01294 const H323ControlPDU & pdu 01295 ); 01296 01300 virtual BOOL OnH245Response( 01301 const H323ControlPDU & pdu 01302 ); 01303 01307 virtual BOOL OnH245Command( 01308 const H323ControlPDU & pdu 01309 ); 01310 01314 virtual BOOL OnH245Indication( 01315 const H323ControlPDU & pdu 01316 ); 01317 01320 virtual BOOL OnH245_SendTerminalCapabilitySet( 01321 const H245_SendTerminalCapabilitySet & pdu 01322 ); 01323 01328 virtual BOOL OnH245_FlowControlCommand( 01329 const H245_FlowControlCommand & pdu 01330 ); 01331 01336 virtual BOOL OnH245_MiscellaneousCommand( 01337 const H245_MiscellaneousCommand & pdu 01338 ); 01339 01344 virtual BOOL OnH245_MiscellaneousIndication( 01345 const H245_MiscellaneousIndication & pdu 01346 ); 01347 01352 virtual BOOL OnH245_JitterIndication( 01353 const H245_JitterIndication & pdu 01354 ); 01355 01358 enum ControlProtocolErrors { 01359 e_MasterSlaveDetermination, 01360 e_CapabilityExchange, 01361 e_LogicalChannel, 01362 e_ModeRequest, 01363 e_RoundTripDelay 01364 }; 01365 01377 virtual BOOL OnControlProtocolError( 01378 ControlProtocolErrors errorSource, 01379 const void * errorData = NULL 01380 ); 01381 01389 virtual void OnSendCapabilitySet( 01390 H245_TerminalCapabilitySet & pdu 01391 ); 01392 01404 virtual BOOL OnReceivedCapabilitySet( 01405 const H323Capabilities & remoteCaps, 01406 const H245_MultiplexCapability * muxCap, 01407 H245_TerminalCapabilitySetReject & reject 01408 ); 01409 01412 virtual void SendCapabilitySet( 01413 BOOL empty 01414 ); 01415 01424 virtual void OnSetLocalCapabilities(); 01425 01428 BOOL IsH245Master() const; 01429 01432 void StartRoundTripDelay(); 01433 01436 PTimeInterval GetRoundTripDelay() const; 01438 01478 virtual void OnSelectLogicalChannels(); 01479 01482 virtual void SelectDefaultLogicalChannel( 01483 unsigned sessionID 01484 ); 01485 01489 virtual void SelectFastStartChannels( 01490 unsigned sessionID, 01491 BOOL transmitter, 01492 BOOL receiver 01493 ); 01494 01509 virtual BOOL OpenLogicalChannel( 01510 const H323Capability & capability, 01511 unsigned sessionID, 01512 H323Channel::Directions dir 01513 ); 01514 01524 virtual BOOL OnOpenLogicalChannel( 01525 const H245_OpenLogicalChannel & openPDU, 01526 H245_OpenLogicalChannelAck & ackPDU, 01527 unsigned & errorCode 01528 ); 01529 01537 virtual BOOL OnConflictingLogicalChannel( 01538 H323Channel & channel 01539 ); 01540 01545 virtual H323Channel * CreateLogicalChannel( 01546 const H245_OpenLogicalChannel & open, 01547 BOOL startingFast, 01548 unsigned & errorCode 01549 ); 01550 01586 virtual H323Channel * CreateRealTimeLogicalChannel( 01587 const H323Capability & capability, 01588 H323Channel::Directions dir, 01589 unsigned sessionID, 01590 const H245_H2250LogicalChannelParameters * param, 01592 RTP_QOS * rtpqos = NULL 01593 ); 01594 01605 virtual BOOL OnCreateLogicalChannel( 01606 const H323Capability & capability, 01607 H323Channel::Directions dir, 01608 unsigned & errorCode 01609 ); 01610 01615 virtual BOOL OnStartLogicalChannel( 01616 H323Channel & channel 01617 ); 01618 01619 #ifndef NO_H323_AUDIO_CODECS 01620 01626 virtual BOOL OpenAudioChannel( 01627 BOOL isEncoding, 01628 unsigned bufferSize, 01629 H323AudioCodec & codec 01630 ); 01631 #endif 01632 01633 #ifndef NO_H323_VIDEO 01634 01640 virtual BOOL OpenVideoChannel( 01641 BOOL isEncoding, 01642 H323VideoCodec & codec 01643 ); 01644 #endif // NO_H323_VIDEO 01645 01648 virtual void CloseLogicalChannel( 01649 unsigned number, 01650 BOOL fromRemote 01651 ); 01652 01655 virtual void CloseLogicalChannelNumber( 01656 const H323ChannelNumber & number 01657 ); 01658 01661 virtual void CloseAllLogicalChannels( 01662 BOOL fromRemote 01663 ); 01664 01670 virtual void OnClosedLogicalChannel( 01671 const H323Channel & channel 01672 ); 01673 01682 virtual BOOL OnClosingLogicalChannel( 01683 H323Channel & channel 01684 ); 01685 01694 virtual void OnLogicalChannelFlowControl( 01695 H323Channel * channel, 01696 long bitRateRestriction 01697 ); 01698 01707 virtual void OnLogicalChannelJitter( 01708 H323Channel * channel, 01709 DWORD jitter, 01710 int skippedFrameCount, 01711 int additionalBuffer 01712 ); 01713 01716 void SendLogicalChannelMiscCommand( 01717 H323Channel & channel, 01718 unsigned command 01719 ); 01720 01724 H323Channel * GetLogicalChannel( 01725 unsigned number, 01726 BOOL fromRemote 01727 ) const; 01728 01734 H323Channel * FindChannel( 01735 unsigned sessionId, 01736 BOOL fromRemote 01737 ) const; 01739 01746 unsigned GetBandwidthUsed() const; 01747 01753 BOOL UseBandwidth( 01754 unsigned bandwidth, 01755 BOOL removing 01756 ); 01757 01760 unsigned GetBandwidthAvailable() const { return bandwidthAvailable; } 01761 01766 BOOL SetBandwidthAvailable( 01767 unsigned newBandwidth, 01768 BOOL force = FALSE 01769 ); 01771 01774 enum SendUserInputModes { 01775 SendUserInputAsQ931, 01776 SendUserInputAsString, 01777 SendUserInputAsTone, 01778 SendUserInputAsInlineRFC2833, 01779 SendUserInputAsSeparateRFC2833, // Not implemented 01780 NumSendUserInputModes 01781 }; 01782 #if PTRACING 01783 friend ostream & operator<<(ostream & o, SendUserInputModes m); 01784 #endif 01785 01788 void SetSendUserInputMode(SendUserInputModes mode); 01789 01792 SendUserInputModes GetSendUserInputMode() const { return sendUserInputMode; } 01793 01799 SendUserInputModes GetRealSendUserInputMode() const; 01800 01814 virtual void SendUserInput( 01815 const PString & value 01816 ); 01817 01824 virtual void OnUserInputString( 01825 const PString & value 01826 ); 01827 01852 virtual void SendUserInputTone( 01853 char tone, 01854 unsigned duration = 0, 01855 unsigned logicalChannel = 0, 01856 unsigned rtpTimestamp = 0 01857 ); 01858 01863 virtual void OnUserInputTone( 01864 char tone, 01865 unsigned duration, 01866 unsigned logicalChannel, 01867 unsigned rtpTimestamp 01868 ); 01869 01873 void SendUserInputHookFlash( 01874 int duration = 500 01875 ) { SendUserInputTone('!', duration); } 01876 01883 virtual void SendUserInputIndicationQ931( 01884 const PString & value 01885 ); 01886 01893 virtual void SendUserInputIndicationString( 01894 const PString & value 01895 ); 01896 01901 virtual void SendUserInputIndicationTone( 01902 char tone, 01903 unsigned duration = 0, 01904 unsigned logicalChannel = 0, 01905 unsigned rtpTimestamp = 0 01906 ); 01907 01916 virtual void SendUserInputIndication( 01917 const H245_UserInputIndication & pdu 01918 ); 01919 01924 virtual void OnUserInputIndication( 01925 const H245_UserInputIndication & pdu 01926 ); 01928 01934 virtual RTP_Session * GetSession( 01935 unsigned sessionID 01936 ) const; 01937 01941 virtual H323_RTP_Session * GetSessionCallbacks( 01942 unsigned sessionID 01943 ) const; 01944 01954 virtual RTP_Session * UseSession( 01955 unsigned sessionID, 01956 const H245_TransportAddress & pdu, 01957 H323Channel::Directions dir, 01958 RTP_QOS * rtpqos = NULL 01959 ); 01960 01964 virtual void ReleaseSession( 01965 unsigned sessionID 01966 ); 01967 01975 virtual void OnRTPStatistics( 01976 const RTP_Session & session 01977 ) const; 01978 01982 virtual PString GetSessionCodecNames( 01983 unsigned sessionID 01984 ) const; 01985 01988 BOOL IsBehindNAT() const 01989 { return remoteIsNAT; } 01990 01992 02010 virtual BOOL RequestModeChange( 02011 const PString & newModes 02012 ); 02013 02021 virtual BOOL RequestModeChange( 02022 const H245_ArrayOf_ModeDescription & newModes 02023 ); 02024 02027 virtual BOOL OnRequestModeChange( 02028 const H245_RequestMode & pdu, 02029 H245_RequestModeAck & ack, 02030 H245_RequestModeReject & reject, 02031 PINDEX & selectedMode 02032 ); 02033 02040 virtual void OnModeChanged( 02041 const H245_ModeDescription & newMode 02042 ); 02043 02048 virtual void OnAcceptModeChange( 02049 const H245_RequestModeAck & pdu 02050 ); 02051 02056 virtual void OnRefusedModeChange( 02057 const H245_RequestModeReject * pdu 02058 ); 02060 02061 #ifdef H323_T120 02062 02076 virtual OpalT120Protocol * CreateT120ProtocolHandler(); 02077 #endif 02078 02079 #ifdef H323_T38 02080 02092 virtual OpalT38Protocol * CreateT38ProtocolHandler(); 02093 02096 virtual BOOL RequestModeChangeT38( 02097 const char * capabilityNames = "T.38\nT38FaxUDP" 02098 ); 02099 #endif 02100 02110 virtual BOOL GetAdmissionRequestAuthentication( 02111 const H225_AdmissionRequest & arq, 02112 H235Authenticators & authenticators 02113 ); 02115 02120 H323EndPoint & GetEndPoint() const { return endpoint; } 02121 02124 BOOL HadAnsweredCall() const { return callAnswered; } 02125 02128 BOOL IsGatekeeperRouted() const { return gatekeeperRouted; } 02129 02133 unsigned GetQ931Cause() const { return q931Cause; } 02134 02138 void SetQ931Cause(unsigned v) { q931Cause = v; } 02139 02144 unsigned GetDistinctiveRing() const { return distinctiveRing; } 02145 02152 void SetDistinctiveRing(unsigned pattern) { distinctiveRing = pattern&7; } 02153 02156 const PString & GetCallToken() const { return callToken; } 02157 02160 unsigned GetCallReference() const { return callReference; } 02161 02164 const OpalGloballyUniqueID & GetCallIdentifier() const { return callIdentifier; } 02165 02168 const OpalGloballyUniqueID & GetConferenceIdentifier() const { return conferenceIdentifier; } 02169 02172 const PString & GetLocalPartyName() const { return localPartyName; } 02173 02176 void SetLocalPartyName(const PString & name); 02177 02180 void SetDisplayName(const PString & name) { localDisplayName = name; } 02181 02184 const PString GetDisplayName() const { return localDisplayName; } 02185 02186 const PStringList & GetLocalAliasNames() const { return localAliasNames; } 02187 02194 const PString & GetRemotePartyName() const { return remotePartyName; } 02195 02200 const PString & GetRemotePartyNumber() const { return remotePartyNumber; } 02201 02208 const PString & GetRemotePartyAddress() const { return remotePartyAddress; } 02209 02212 void SetRemotePartyInfo( 02213 const H323SignalPDU & pdu 02214 ); 02215 02227 const PString & GetRemoteApplication() const { return remoteApplication; } 02228 02231 void SetRemoteApplication( 02232 const H225_EndpointType & pdu 02233 ); 02234 02237 const H323Capabilities & GetLocalCapabilities() const { return localCapabilities; } 02238 02241 const H323Capabilities & GetRemoteCapabilities() const { return remoteCapabilities; } 02242 02245 unsigned GetRemoteMaxAudioDelayJitter() const { return remoteMaxAudioDelayJitter; } 02246 02249 const H323Transport * GetSignallingChannel() const { return signallingChannel; } 02250 02253 unsigned GetSignallingVersion() const { return h225version; } 02254 02257 const H323Transport & GetControlChannel() const; 02258 02261 unsigned GetControlVersion() const { return h245version; } 02262 02265 PTime GetSetupUpTime() const { return setupTime; } 02266 02269 PTime GetAlertingTime() const { return alertingTime; } 02270 02274 PTime GetConnectionStartTime() const { return connectedTime; } 02275 02278 PTime GetConnectionEndTime() const { return callEndTime; } 02279 02282 PTime GetReverseMediaOpenTime() const { return reverseMediaOpenTime; } 02283 02287 unsigned GetMinAudioJitterDelay() const { return minAudioJitterDelay; } 02288 02292 unsigned GetMaxAudioJitterDelay() const { return maxAudioJitterDelay; } 02293 02296 void SetAudioJitterDelay( 02297 unsigned minDelay, 02298 unsigned maxDelay 02299 ); 02300 02303 unsigned GetUUIEsRequested() const { return uuiesRequested; } 02304 02307 void SetUUIEsRequested(unsigned mask) { uuiesRequested = mask; } 02308 02311 const PString GetGkAccessTokenOID() const { return gkAccessTokenOID; } 02312 02315 void SetGkAccessTokenOID(const PString & oid) { gkAccessTokenOID = oid; } 02316 02319 const PBYTEArray & GetGkAccessTokenData() const { return gkAccessTokenData; } 02320 02323 void SetDestExtraCallInfo( 02324 const PString & info 02325 ) { destExtraCallInfo = info; } 02326 02329 void SetRemotCallWaiting(const unsigned value) { remoteCallWaiting = value; } 02330 02336 const int GetRemoteCallWaiting() const { return remoteCallWaiting; } 02337 02342 void SetEnforcedDurationLimit( 02343 unsigned seconds 02344 ); 02346 02347 virtual BOOL OnSendFeatureSet(unsigned, H225_FeatureSet &) const; 02348 02349 virtual void OnReceiveFeatureSet(unsigned, const H225_FeatureSet &) const; 02350 02351 enum ReleaseSequence { 02352 ReleaseSequenceUnknown, 02353 ReleaseSequence_Local, 02354 ReleaseSequence_Remote 02355 }; 02356 02357 ReleaseSequence GetReleaseSequence() const 02358 { return releaseSequence; } 02359 02360 protected: 02366 virtual void InternalEstablishedConnectionCheck(); 02367 BOOL DecodeFastStartCaps(const H225_ArrayOf_PASN_OctetString & fastStartCaps); 02368 BOOL InternalEndSessionCheck(PPER_Stream & strm); 02369 void SetRemoteVersions(const H225_ProtocolIdentifier & id); 02370 void MonitorCallStatus(); 02371 PDECLARE_NOTIFIER(OpalRFC2833Info, H323Connection, OnUserInputInlineRFC2833); 02372 PDECLARE_NOTIFIER(H323Codec::FilterInfo, H323Connection, OnUserInputInBandDTMF); 02373 02374 H323EndPoint & endpoint; 02375 PSyncPoint * endSync; 02376 02377 int remoteCallWaiting; // Number of call's waiting at the remote endpoint 02378 BOOL callAnswered; 02379 BOOL gatekeeperRouted; 02380 unsigned distinctiveRing; 02381 PString callToken; 02382 unsigned callReference; 02383 OpalGloballyUniqueID callIdentifier; 02384 OpalGloballyUniqueID conferenceIdentifier; 02385 02386 PStringList localAliasNames; 02387 PString localPartyName; 02388 PString localDisplayName; 02389 H323Capabilities localCapabilities; // Capabilities local system supports 02390 PString remotePartyName; 02391 PString remotePartyNumber; 02392 PString remotePartyAddress; 02393 PString destExtraCallInfo; 02394 PString remoteApplication; 02395 H323Capabilities remoteCapabilities; // Capabilities remote system supports 02396 unsigned remoteMaxAudioDelayJitter; 02397 PTimer roundTripDelayTimer; 02398 unsigned minAudioJitterDelay; 02399 unsigned maxAudioJitterDelay; 02400 unsigned bandwidthAvailable; 02401 unsigned uuiesRequested; 02402 PString gkAccessTokenOID; 02403 PBYTEArray gkAccessTokenData; 02404 BOOL addAccessTokenToSetup; 02405 SendUserInputModes sendUserInputMode; 02406 02407 H323Transport * signallingChannel; 02408 H323Transport * controlChannel; 02409 BOOL h245Tunneling; 02410 H323SignalPDU * h245TunnelRxPDU; 02411 H323SignalPDU * h245TunnelTxPDU; 02412 H323SignalPDU * alertingPDU; 02413 H323SignalPDU * connectPDU; 02414 02415 enum ConnectionStates { 02416 NoConnectionActive, 02417 AwaitingGatekeeperAdmission, 02418 AwaitingTransportConnect, 02419 AwaitingSignalConnect, 02420 AwaitingLocalAnswer, 02421 HasExecutedSignalConnect, 02422 EstablishedConnection, 02423 ShuttingDownConnection, 02424 NumConnectionStates 02425 } connectionState; 02426 02427 PTime setupTime; 02428 PTime alertingTime; 02429 PTime connectedTime; 02430 PTime callEndTime; 02431 PTime reverseMediaOpenTime; 02432 CallEndReason callEndReason; 02433 unsigned q931Cause; 02434 ReleaseSequence releaseSequence; 02435 02436 unsigned h225version; 02437 unsigned h245version; 02438 BOOL h245versionSet; 02439 BOOL doH245inSETUP; 02440 BOOL lastPDUWasH245inSETUP; 02441 BOOL detectInBandDTMF; 02442 BOOL mustSendDRQ; 02443 BOOL mediaWaitForConnect; 02444 BOOL transmitterSidePaused; 02445 BOOL earlyStart; 02446 02447 #ifdef H323_T120 02448 BOOL startT120; 02449 #endif 02450 02451 #ifdef H323_T38 02452 PString t38ModeChangeCapabilities; 02453 #endif 02454 02455 PSyncPoint digitsWaitFlag; 02456 BOOL endSessionNeeded; 02457 BOOL endSessionSent; 02458 PSyncPoint endSessionReceived; 02459 PTimer enforcedDurationLimit; 02460 02461 #ifdef H323_H450 02462 // Used as part of a local call hold operation involving MOH 02463 PChannel * holdMediaChannel; 02464 BOOL isConsultationTransfer; 02465 02467 BOOL isCallIntrusion; 02468 unsigned callIntrusionProtectionLevel; 02469 #endif 02470 02471 RTP_SessionManager rtpSessions; 02472 02473 enum FastStartStates { 02474 FastStartDisabled, 02475 FastStartInitiate, 02476 FastStartResponse, 02477 FastStartAcknowledged, 02478 NumFastStartStates 02479 }; 02480 FastStartStates fastStartState; 02481 H323LogicalChannelList fastStartChannels; 02482 02483 #if PTRACING 02484 static const char * const ConnectionStatesNames[NumConnectionStates]; 02485 friend ostream & operator<<(ostream & o, ConnectionStates s) { return o << ConnectionStatesNames[s]; } 02486 static const char * const FastStartStateNames[NumFastStartStates]; 02487 friend ostream & operator<<(ostream & o, FastStartStates s) { return o << FastStartStateNames[s]; } 02488 #endif 02489 02490 02491 // The following pointers are to protocol procedures, they are pointers to 02492 // hide their complexity from the H323Connection classes users. 02493 H245NegMasterSlaveDetermination * masterSlaveDeterminationProcedure; 02494 H245NegTerminalCapabilitySet * capabilityExchangeProcedure; 02495 H245NegLogicalChannels * logicalChannels; 02496 H245NegRequestMode * requestModeProcedure; 02497 H245NegRoundTripDelay * roundTripDelayProcedure; 02498 02499 #ifdef H323_H450 02500 H450xDispatcher * h450dispatcher; 02501 H4502Handler * h4502handler; 02502 H4504Handler * h4504handler; 02503 H4506Handler * h4506handler; 02504 H45011Handler * h45011handler; 02505 #endif 02506 02507 OpalRFC2833 * rfc2833handler; 02508 02509 #ifdef H323_T120 02510 OpalT120Protocol * t120handler; 02511 #endif 02512 02513 #ifdef H323_T38 02514 OpalT38Protocol * t38handler; 02515 #endif 02516 02517 #ifdef P_DTMF 02518 // The In-Band DTMF detector. This is used inside an audio filter which is 02519 // added to the audio channel. 02520 PDTMFDecoder dtmfDecoder; 02521 #endif 02522 02523 // used to detect remote NAT endpoints 02524 BOOL remoteIsNAT; 02525 02526 #ifdef H323_TRANSNEXUS_OSP 02527 public: 02528 OpalOSP::Transaction * GetOSPTransaction() const 02529 { return ospTransaction; } 02530 02531 void SetOSPTransaction(OpalOSP::Transaction * tran) 02532 { ospTransaction = tran; } 02533 02534 protected: 02535 OpalOSP::Transaction * ospTransaction; 02536 virtual void CleanUpOSP(); 02537 BOOL AuthoriseOSPTransaction(OpalOSP::Transaction & transaction, OpalOSP::Transaction::DestinationInfo & destInfo); 02538 #endif 02539 02540 private: 02541 PChannel * SwapHoldMediaChannels(PChannel * newChannel); 02542 02543 PTimedMutex outerMutex; 02544 PMutex innerMutex; 02545 }; 02546 02547 02548 PLIST(H323ConnectionList, H323Connection); 02549 PDICTIONARY(H323ConnectionDict, PString, H323Connection); 02550 PDICTIONARY(H323CallIdentityDict, PString, H323Connection); 02551 02552 02553 #endif // __OPAL_H323CON_H 02554 02555