Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

h323ep.h

Go to the documentation of this file.
00001 /* 00002 * h323ep.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: h323ep.h,v $ 00030 * Revision 1.61 2004/07/11 11:36:25 rjongbloed 00031 * Added virtual to CleanUpConnections, thanks Eize Slange 00032 * 00033 * Revision 1.60 2004/06/15 03:30:00 csoutheren 00034 * Added OnSendARQ to allow access to the ARQ message before sent by connection 00035 * 00036 * Revision 1.59 2004/06/04 07:05:10 csoutheren 00037 * Fixed obvious typos 00038 * 00039 * Revision 1.58 2004/06/01 05:48:02 csoutheren 00040 * Changed capability table to use abstract factory routines rather than internal linked list 00041 * 00042 * Revision 1.57 2004/05/17 12:14:24 csoutheren 00043 * Added support for different SETUP PDU types 00044 * 00045 * Revision 1.56 2003/12/29 04:58:55 csoutheren 00046 * Added callbacks on H323EndPoint when gatekeeper discovery succeeds or fails 00047 * 00048 * Revision 1.55 2003/12/28 02:52:15 csoutheren 00049 * Added virtual to a few functions 00050 * 00051 * Revision 1.54 2003/12/28 02:38:14 csoutheren 00052 * Added H323EndPoint::OnOutgoingCall 00053 * 00054 * Revision 1.53 2003/12/28 00:07:10 csoutheren 00055 * Added callbacks on H323EndPoint when gatekeeper registration succeeds or fails 00056 * 00057 * Revision 1.52 2003/04/24 01:49:33 dereks 00058 * Add ability to set no media timeout interval 00059 * 00060 * Revision 1.51 2003/04/10 09:39:48 robertj 00061 * Added associated transport to new GetInterfaceAddresses() function so 00062 * interfaces can be ordered according to active transport links. Improves 00063 * interoperability. 00064 * 00065 * Revision 1.50 2003/04/10 01:05:11 craigs 00066 * Added functions to access to lists of interfaces 00067 * 00068 * Revision 1.49 2003/04/07 13:09:25 robertj 00069 * Added ILS support to callto URL parsing in MakeCall(), ie can now call hosts 00070 * registered with an ILS directory. 00071 * 00072 * Revision 1.48 2003/02/13 00:11:31 robertj 00073 * Added missing virtual for controlling call transfer, thanks Andrey Pinaev 00074 * 00075 * Revision 1.47 2003/02/09 00:48:06 robertj 00076 * Added function to return if registered with gatekeeper. 00077 * 00078 * Revision 1.46 2003/02/04 07:06:41 robertj 00079 * Added STUN support. 00080 * 00081 * Revision 1.45 2003/01/26 05:57:58 robertj 00082 * Changed ParsePartyName so will accept addresses of the form 00083 * alias@gk:address which will do an LRQ call to "address" using "alias" 00084 * to determine the IP address to connect to. 00085 * 00086 * Revision 1.44 2003/01/23 02:36:30 robertj 00087 * Increased (and made configurable) timeout for H.245 channel TCP connection. 00088 * 00089 * Revision 1.43 2002/11/28 01:19:55 craigs 00090 * Added virtual to several functions 00091 * 00092 * Revision 1.42 2002/11/27 06:54:52 robertj 00093 * Added Service Control Session management as per Annex K/H.323 via RAS 00094 * only at this stage. 00095 * Added H.248 ASN and very primitive infrastructure for linking into the 00096 * Service Control Session management system. 00097 * Added basic infrastructure for Annex K/H.323 HTTP transport system. 00098 * Added Call Credit Service Control to display account balances. 00099 * 00100 * Revision 1.41 2002/11/15 05:17:22 robertj 00101 * Added facility redirect support without changing the call token for access 00102 * to the call. If it gets redirected a new H323Connection object is 00103 * created but it looks like the same thing to an application. 00104 * 00105 * Revision 1.40 2002/11/10 08:10:43 robertj 00106 * Moved constants for "well known" ports to better place (OPAL change). 00107 * 00108 * Revision 1.39 2002/10/31 00:32:15 robertj 00109 * Enhanced jitter buffer system so operates dynamically between minimum and 00110 * maximum values. Altered API to assure app writers note the change! 00111 * 00112 * Revision 1.38 2002/10/23 06:06:10 robertj 00113 * Added function to be smarter in using a gatekeeper for use by endpoint. 00114 * 00115 * Revision 1.37 2002/10/21 06:07:44 robertj 00116 * Added function to set gatekeeper access token OID. 00117 * 00118 * Revision 1.36 2002/09/16 01:14:15 robertj 00119 * Added #define so can select if #pragma interface/implementation is used on 00120 * platform basis (eg MacOS) rather than compiler, thanks Robert Monaghan. 00121 * 00122 * Revision 1.35 2002/09/10 06:32:25 robertj 00123 * Added function to get gatekeeper password. 00124 * 00125 * Revision 1.34 2002/09/03 06:19:36 robertj 00126 * Normalised the multi-include header prevention ifdef/define symbol. 00127 * 00128 * Revision 1.33 2002/07/19 03:39:19 robertj 00129 * Bullet proofed setting of RTP IP port base, can't be zero! 00130 * 00131 * Revision 1.32 2002/07/18 01:50:10 robertj 00132 * Changed port secltion code to force apps to use function interface. 00133 * 00134 * Revision 1.31 2002/06/22 05:48:38 robertj 00135 * Added partial implementation for H.450.11 Call Intrusion 00136 * 00137 * Revision 1.30 2002/06/13 06:15:19 robertj 00138 * Allowed TransferCall() to be used on H323Connection as well as H323EndPoint. 00139 * 00140 * Revision 1.29 2002/06/12 03:55:21 robertj 00141 * Added function to add/remove multiple listeners in one go comparing against 00142 * what is already running so does not interrupt unchanged listeners. 00143 * 00144 * Revision 1.28 2002/05/29 06:40:29 robertj 00145 * Changed sending of endSession/ReleaseComplete PDU's to occur immediately 00146 * on call clearance and not wait for background thread to do it. 00147 * Stricter compliance by waiting for reply endSession before closing down. 00148 * 00149 * Revision 1.27 2002/05/28 06:15:09 robertj 00150 * Split UDP (for RAS) from RTP port bases. 00151 * Added current port variable so cycles around the port range specified which 00152 * fixes some wierd problems on some platforms, thanks Federico Pinna 00153 * 00154 * Revision 1.26 2002/05/17 03:38:05 robertj 00155 * Fixed problems with H.235 authentication on RAS for server and client. 00156 * 00157 * Revision 1.25 2002/05/16 00:03:05 robertj 00158 * Added function to get the tokens for all active calls. 00159 * Improved documentation for use of T.38 and T.120 functions. 00160 * 00161 * Revision 1.24 2002/05/15 08:59:18 rogerh 00162 * Update comments 00163 * 00164 * Revision 1.23 2002/05/03 05:38:15 robertj 00165 * Added Q.931 Keypad IE mechanism for user indications (DTMF). 00166 * 00167 * Revision 1.22 2002/05/02 07:56:24 robertj 00168 * Added automatic clearing of call if no media (RTP data) is transferred in a 00169 * configurable (default 5 minutes) amount of time. 00170 * 00171 * Revision 1.21 2002/04/18 01:41:07 robertj 00172 * Fixed bad variable name for disabling DTMF detection, very confusing. 00173 * 00174 * Revision 1.20 2002/04/17 00:49:56 robertj 00175 * Added ability to disable the in band DTMF detection. 00176 * 00177 * Revision 1.19 2002/04/10 06:48:47 robertj 00178 * Added functions to set port member variables. 00179 * 00180 * Revision 1.18 2002/03/14 03:49:38 dereks 00181 * Fix minor documentation error. 00182 * 00183 * Revision 1.17 2002/02/04 07:17:52 robertj 00184 * Added H.450.2 Consultation Transfer, thanks Norwood Systems. 00185 * 00186 * Revision 1.16 2002/01/24 06:29:02 robertj 00187 * Added option to disable H.245 negotiation in SETUP pdu, this required 00188 * API change so have a bit mask instead of a series of booleans. 00189 * 00190 * Revision 1.15 2002/01/17 07:04:58 robertj 00191 * Added support for RFC2833 embedded DTMF in the RTP stream. 00192 * 00193 * Revision 1.14 2002/01/13 23:59:43 robertj 00194 * Added CallTransfer timeouts to endpoint, hanks Ben Madsen of Norwood Systems. 00195 * 00196 * Revision 1.13 2002/01/08 04:45:35 robertj 00197 * Added MakeCallLocked() so can start a call with the H323Connection instance 00198 * initally locked so can do things to it before the call really starts. 00199 * 00200 * Revision 1.12 2001/12/22 03:20:44 robertj 00201 * Added create protocol function to H323Connection. 00202 * 00203 * Revision 1.11 2001/12/13 10:55:30 robertj 00204 * Added gatekeeper access token OID specification for auto inclusion of 00205 * access tokens frm ACF to SETUP pdu. 00206 * 00207 * Revision 1.10 2001/11/09 05:39:54 craigs 00208 * Added initial T.38 support thanks to Adam Lazur 00209 * 00210 * Revision 1.9 2001/11/01 00:27:33 robertj 00211 * Added default Fast Start disabled and H.245 tunneling disable flags 00212 * to the endpoint instance. 00213 * 00214 * Revision 1.8 2001/09/11 01:24:36 robertj 00215 * Added conditional compilation to remove video and/or audio codecs. 00216 * 00217 * Revision 1.7 2001/09/11 00:21:21 robertj 00218 * Fixed missing stack sizes in endpoint for cleaner thread and jitter thread. 00219 * 00220 * Revision 1.6 2001/08/24 14:03:26 rogerh 00221 * Fix some spelling mistakes 00222 * 00223 * Revision 1.5 2001/08/16 07:49:16 robertj 00224 * Changed the H.450 support to be more extensible. Protocol handlers 00225 * are now in separate classes instead of all in H323Connection. 00226 * 00227 * Revision 1.4 2001/08/10 11:03:49 robertj 00228 * Major changes to H.235 support in RAS to support server. 00229 * 00230 * Revision 1.3 2001/08/08 23:54:11 robertj 00231 * Fixed problem with setting gk password before have a gk variable. 00232 * 00233 * Revision 1.2 2001/08/06 03:15:17 robertj 00234 * Improved access to H.235 secure RAS functionality. 00235 * 00236 * Revision 1.1 2001/08/06 03:08:11 robertj 00237 * Fission of h323.h to h323ep.h & h323con.h, h323.h now just includes files. 00238 * 00239 */ 00240 00241 #ifndef __OPAL_H323EP_H 00242 #define __OPAL_H323EP_H 00243 00244 00245 #include "h323con.h" 00246 #include "h235auth.h" 00247 00248 00249 /* The following classes have forward references to avoid including the VERY 00250 large header files for H225 and H245. If an application requires access 00251 to the protocol classes they can include them, but for simple usage their 00252 inclusion can be avoided. 00253 */ 00254 class H225_EndpointType; 00255 class H225_VendorIdentifier; 00256 class H225_H221NonStandard; 00257 class H225_ServiceControlDescriptor; 00258 00259 class H323SignalPDU; 00260 class H323ConnectionsCleaner; 00261 class H323ServiceControlSession; 00262 00263 class OpalT120Protocol; 00264 class OpalT38Protocol; 00265 00266 class PSTUNClient; 00267 00268 00269 #ifdef P_USE_PRAGMA 00270 #pragma interface 00271 #endif 00272 00273 00275 00288 class H323EndPoint : public PObject 00289 { 00290 PCLASSINFO(H323EndPoint, PObject); 00291 00292 public: 00293 enum { 00294 DefaultTcpPort = 1720 00295 }; 00296 00301 H323EndPoint(); 00302 00305 ~H323EndPoint(); 00306 00309 virtual void SetEndpointTypeInfo( 00310 H225_EndpointType & info 00311 ) const; 00312 00315 virtual void SetVendorIdentifierInfo( 00316 H225_VendorIdentifier & info 00317 ) const; 00318 00321 virtual void SetH221NonStandardInfo( 00322 H225_H221NonStandard & info 00323 ) const; 00325 00326 00337 void AddCapability( 00338 H323Capability * capability 00339 ); 00340 00361 PINDEX SetCapability( 00362 PINDEX descriptorNum, 00363 PINDEX simultaneous, 00364 H323Capability * cap 00365 ); 00366 00371 PINDEX AddAllCapabilities( 00372 PINDEX descriptorNum, 00373 PINDEX simultaneous, 00374 const PString & name 00375 ); 00376 00379 void AddAllUserInputCapabilities( 00380 PINDEX descriptorNum, 00381 PINDEX simultaneous 00382 ); 00383 00386 void RemoveCapabilities( 00387 const PStringArray & codecNames 00388 ); 00389 00392 void ReorderCapabilities( 00393 const PStringArray & preferenceOrder 00394 ); 00395 00398 H323Capability * FindCapability( 00399 const H245_Capability & cap 00400 ) const; 00401 00404 H323Capability * FindCapability( 00405 const H245_DataType & dataType 00406 ) const; 00407 00410 H323Capability * FindCapability( 00411 H323Capability::MainTypes mainType, 00412 unsigned subType 00413 ) const; 00415 00435 BOOL UseGatekeeper( 00436 const PString & address = PString::Empty(), 00437 const PString & identifier = PString::Empty(), 00438 const PString & localAddress = PString::Empty() 00439 ); 00440 00451 BOOL SetGatekeeper( 00452 const PString & address, 00453 H323Transport * transport = NULL 00454 ); 00455 00470 BOOL SetGatekeeperZone( 00471 const PString & address, 00472 const PString & identifier, 00473 H323Transport * transport = NULL 00474 ); 00475 00485 BOOL LocateGatekeeper( 00486 const PString & identifier, 00487 H323Transport * transport = NULL 00488 ); 00489 00498 BOOL DiscoverGatekeeper( 00499 H323Transport * transport = NULL 00500 ); 00501 00509 virtual H323Gatekeeper * CreateGatekeeper( 00510 H323Transport * transport 00511 ); 00512 00515 H323Gatekeeper * GetGatekeeper() const { return gatekeeper; } 00516 00519 BOOL IsRegisteredWithGatekeeper() const; 00520 00526 BOOL RemoveGatekeeper( 00527 int reason = -1 00528 ); 00529 00532 virtual void SetGatekeeperPassword( 00533 const PString & password 00534 ); 00535 00538 virtual const PString & GetGatekeeperPassword() const { return gatekeeperPassword; } 00539 00542 virtual H235Authenticators CreateAuthenticators(); 00543 00546 virtual void OnGatekeeperConfirm(); 00547 00550 virtual void OnGatekeeperReject(); 00551 00554 virtual void OnRegistrationConfirm(); 00555 00558 virtual void OnRegistrationReject(); 00560 00577 BOOL StartListener( 00578 H323Listener * listener 00579 ); 00580 00592 BOOL StartListener( 00593 const H323TransportAddress & iface 00594 ); 00595 00612 BOOL StartListeners( 00613 const H323TransportAddressArray & ifaces 00614 ); 00615 00619 BOOL RemoveListener( 00620 H323Listener * listener 00621 ); 00622 00625 H323TransportAddressArray GetInterfaceAddresses( 00626 BOOL excludeLocalHost = TRUE, 00627 H323Transport * associatedTransport = NULL 00629 ); 00630 00649 H323Connection * MakeCall( 00650 const PString & remoteParty, 00651 PString & token, 00652 void * userData = NULL 00653 ); 00654 00675 H323Connection * MakeCall( 00676 const PString & remoteParty, 00677 H323Transport * transport, 00678 PString & token, 00679 void * userData = NULL 00680 ); 00681 00692 H323Connection * MakeCallLocked( 00693 const PString & remoteParty, 00694 PString & token, 00695 void * userData = NULL, 00696 H323Transport * transport = NULL 00697 ); 00698 00720 virtual H323Connection * SetupTransfer( 00721 const PString & token, 00722 const PString & callIdentity, 00723 const PString & remoteParty, 00724 PString & newToken, 00725 void * userData = NULL 00726 ); 00727 00733 void TransferCall( 00734 const PString & token, 00735 const PString & remoteParty, 00736 const PString & callIdentity = PString::Empty() 00738 ); 00739 00746 void ConsultationTransfer( 00747 const PString & primaryCallToken, 00748 const PString & secondaryCallToken 00749 ); 00750 00754 void HoldCall( 00755 const PString & token, 00756 BOOL localHold 00757 ); 00758 00762 H323Connection * IntrudeCall( 00763 const PString & remoteParty, 00764 PString & token, 00765 unsigned capabilityLevel, 00766 void * userData = NULL 00767 ); 00768 00769 H323Connection * IntrudeCall( 00770 const PString & remoteParty, 00771 H323Transport * transport, 00772 PString & token, 00773 unsigned capabilityLevel, 00774 void * userData = NULL 00775 ); 00776 00783 BOOL ParsePartyName( 00784 const PString & party, 00785 PString & alias, 00786 H323TransportAddress & address 00787 ); 00788 00793 virtual BOOL ClearCall( 00794 const PString & token, 00795 H323Connection::CallEndReason reason = 00796 H323Connection::EndedByLocalUser 00797 ); 00798 00803 virtual BOOL ClearCallSynchronous( 00804 const PString & token, 00805 H323Connection::CallEndReason reason = 00806 H323Connection::EndedByLocalUser 00807 ); 00808 virtual BOOL ClearCallSynchronous( 00809 const PString & token, 00810 H323Connection::CallEndReason reason, 00811 PSyncPoint * sync 00812 ); 00813 00820 virtual void ClearAllCalls( 00821 H323Connection::CallEndReason reason = 00822 H323Connection::EndedByLocalUser, 00823 BOOL wait = TRUE 00824 ); 00825 00828 virtual BOOL HasConnection( 00829 const PString & token 00830 ); 00831 00843 H323Connection * FindConnectionWithLock( 00844 const PString & token 00845 ); 00846 00849 PStringList GetAllConnections(); 00850 00862 virtual BOOL OnIncomingCall( 00863 H323Connection & connection, 00864 const H323SignalPDU & setupPDU, 00865 H323SignalPDU & alertingPDU 00866 ); 00867 00872 virtual BOOL OnCallTransferInitiate( 00873 H323Connection & connection, 00874 const PString & remoteParty 00875 ); 00876 00881 virtual BOOL OnCallTransferIdentify( 00882 H323Connection & connection 00883 ); 00884 00889 virtual void OnSendARQ( 00890 H323Connection & conn, 00891 H225_AdmissionRequest & arq 00892 ); 00893 00912 virtual H323Connection::AnswerCallResponse OnAnswerCall( 00913 H323Connection & connection, 00914 const PString & callerName, 00915 const H323SignalPDU & setupPDU, 00916 H323SignalPDU & connectPDU 00917 ); 00918 00929 virtual BOOL OnAlerting( 00930 H323Connection & connection, 00931 const H323SignalPDU & alertingPDU, 00932 const PString & user 00933 ); 00934 00943 virtual BOOL OnConnectionForwarded( 00944 H323Connection & connection, 00945 const PString & forwardParty, 00946 const H323SignalPDU & pdu 00947 ); 00948 00957 virtual BOOL ForwardConnection( 00958 H323Connection & connection, 00959 const PString & forwardParty, 00960 const H323SignalPDU & pdu 00961 ); 00962 00969 virtual void OnConnectionEstablished( 00970 H323Connection & connection, 00971 const PString & token 00972 ); 00973 00976 virtual BOOL IsConnectionEstablished( 00977 const PString & token 00978 ); 00979 00986 virtual void OnConnectionCleared( 00987 H323Connection & connection, 00988 const PString & token 00989 ); 00990 00995 static PString BuildConnectionToken( 00996 const H323Transport & transport, 00997 unsigned callReference, 00998 BOOL fromRemote 00999 ); 01000 01006 virtual H323Connection * OnIncomingConnection( 01007 H323Transport * transport, 01008 H323SignalPDU & setupPDU 01009 ); 01010 01017 virtual BOOL OnOutgoingCall( 01018 H323Connection & conn, 01019 const H323SignalPDU & connectPDU 01020 ); 01021 01024 virtual H323Connection * CreateConnection( 01025 unsigned callReference, 01026 void * userData, 01027 H323Transport * transport, 01028 H323SignalPDU * setupPDU 01029 ); 01030 virtual H323Connection * CreateConnection( 01031 unsigned callReference, 01032 void * userData 01033 ); 01034 virtual H323Connection * CreateConnection( 01035 unsigned callReference 01036 ); 01037 01044 virtual void CleanUpConnections(); 01046 01047 01054 virtual BOOL OnStartLogicalChannel( 01055 H323Connection & connection, 01056 H323Channel & channel 01057 ); 01058 01063 virtual void OnClosedLogicalChannel( 01064 H323Connection & connection, 01065 const H323Channel & channel 01066 ); 01067 01075 virtual BOOL OpenAudioChannel( 01076 H323Connection & connection, 01077 BOOL isEncoding, 01078 unsigned bufferSize, 01079 H323AudioCodec & codec 01080 ); 01081 01082 #ifndef NO_H323_VIDEO 01083 01089 virtual BOOL OpenVideoChannel( 01090 H323Connection & connection, 01091 BOOL isEncoding, 01092 H323VideoCodec & codec 01093 ); 01094 #endif // NO_H323_VIDEO 01095 01103 virtual void OnRTPStatistics( 01104 const H323Connection & connection, 01105 const RTP_Session & session 01106 ) const; 01108 01115 virtual void OnUserInputString( 01116 H323Connection & connection, 01117 const PString & value 01118 ); 01119 01124 virtual void OnUserInputTone( 01125 H323Connection & connection, 01126 char tone, 01127 unsigned duration, 01128 unsigned logicalChannel, 01129 unsigned rtpTimestamp 01130 ); 01132 01142 virtual void OnHTTPServiceControl( 01143 unsigned operation, 01144 unsigned sessionId, 01145 const PString & url 01146 ); 01147 01157 virtual void OnCallCreditServiceControl( 01158 const PString & amount, 01159 BOOL mode 01160 ); 01161 01165 virtual void OnServiceControlSession( 01166 unsigned type, 01167 unsigned sessionid, 01168 const H323ServiceControlSession & session, 01169 H323Connection * connection 01170 ); 01171 01174 virtual H323ServiceControlSession * CreateServiceControlSession( 01175 const H225_ServiceControlDescriptor & contents 01176 ); 01178 01191 virtual OpalT120Protocol * CreateT120ProtocolHandler( 01192 const H323Connection & connection 01193 ) const; 01194 01205 virtual OpalT38Protocol * CreateT38ProtocolHandler( 01206 const H323Connection & connection 01207 ) const; 01209 01217 virtual BOOL OnConferenceInvite( 01218 const H323SignalPDU & setupPDU 01219 ); 01220 01226 virtual BOOL OnCallIndependentSupplementaryService( 01227 const H323SignalPDU & setupPDU 01228 ); 01229 01235 virtual BOOL OnNegotiateConferenceCapabilities( 01236 const H323SignalPDU & setupPDU 01237 ); 01239 01250 virtual void SetLocalUserName( 01251 const PString & name 01252 ); 01253 01258 virtual const PString & GetLocalUserName() const { return localAliasNames[0]; } 01259 01266 BOOL AddAliasName( 01267 const PString & name 01268 ); 01269 01273 BOOL RemoveAliasName( 01274 const PString & name 01275 ); 01276 01281 const PStringList & GetAliasNames() const { return localAliasNames; } 01282 01285 const PString & GetDefaultILSServer() const { return ilsServer; } 01286 01289 void SetDefaultILSServer( 01290 const PString & server 01291 ) { ilsServer = server; } 01292 01295 BOOL IsFastStartDisabled() const 01296 { return disableFastStart; } 01297 01300 void DisableFastStart( 01301 BOOL mode 01302 ) { disableFastStart = mode; } 01303 01306 BOOL IsH245TunnelingDisabled() const 01307 { return disableH245Tunneling; } 01308 01311 void DisableH245Tunneling( 01312 BOOL mode 01313 ) { disableH245Tunneling = mode; } 01314 01317 BOOL IsH245inSetupDisabled() const 01318 { return disableH245inSetup; } 01319 01322 void DisableH245inSetup( 01323 BOOL mode 01324 ) { disableH245inSetup = mode; } 01325 01328 BOOL DetectInBandDTMFDisabled() const 01329 { return disableDetectInBandDTMF; } 01330 01333 void DisableDetectInBandDTMF( 01334 BOOL mode 01335 ) { disableDetectInBandDTMF = mode; } 01336 01339 BOOL CanDisplayAmountString() const 01340 { return canDisplayAmountString; } 01341 01344 void SetCanDisplayAmountString( 01345 BOOL mode 01346 ) { canDisplayAmountString = mode; } 01347 01350 BOOL CanEnforceDurationLimit() const 01351 { return canEnforceDurationLimit; } 01352 01355 void SetCanEnforceDurationLimit( 01356 BOOL mode 01357 ) { canEnforceDurationLimit = mode; } 01358 01361 unsigned GetCallIntrusionProtectionLevel() const { return callIntrusionProtectionLevel; } 01362 01365 void SetCallIntrusionProtectionLevel( 01366 unsigned level // New level from 0 to 3 01367 ) { PAssert(level<=3, PInvalidParameter); callIntrusionProtectionLevel = level; } 01368 01376 virtual BOOL SetSoundChannelPlayDevice(const PString & name); 01377 01382 const PString & GetSoundChannelPlayDevice() const { return soundChannelPlayDevice; } 01383 01391 virtual BOOL SetSoundChannelRecordDevice(const PString & name); 01392 01397 const PString & GetSoundChannelRecordDevice() const { return soundChannelRecordDevice; } 01398 01401 unsigned GetSoundChannelBufferDepth() const { return soundChannelBuffers; } 01402 01405 void SetSoundChannelBufferDepth( 01406 unsigned depth // New depth 01407 ); 01408 01411 H323AudioCodec::SilenceDetectionMode GetSilenceDetectionMode() const 01412 { return defaultSilenceDetection; } 01413 01416 void SetSilenceDetectionMode( 01417 H323AudioCodec::SilenceDetectionMode mode 01418 ) { defaultSilenceDetection = mode; } 01419 01422 H323Connection::SendUserInputModes GetSendUserInputMode() const { return defaultSendUserInputMode; } 01423 01426 void SetSendUserInputMode(H323Connection::SendUserInputModes mode) { defaultSendUserInputMode = mode; } 01427 01430 BOOL CanAutoStartReceiveVideo() const { return autoStartReceiveVideo; } 01431 01434 BOOL CanAutoStartTransmitVideo() const { return autoStartTransmitVideo; } 01435 01438 BOOL CanAutoStartReceiveFax() const { return autoStartReceiveFax; } 01439 01442 BOOL CanAutoStartTransmitFax() const { return autoStartTransmitFax; } 01443 01446 BOOL CanAutoCallForward() const { return autoCallForward; } 01447 01450 const H323ListenerList & GetListeners() const { return listeners; } 01451 01454 const H323Capabilities & GetCapabilities() const { return capabilities; } 01455 01458 enum TerminalTypes { 01459 e_TerminalOnly = 50, 01460 e_TerminalAndMC = 70, 01461 e_GatewayOnly = 60, 01462 e_GatewayAndMC = 80, 01463 e_GatewayAndMCWithDataMP = 90, 01464 e_GatewayAndMCWithAudioMP = 100, 01465 e_GatewayAndMCWithAVMP = 110, 01466 e_GatekeeperOnly = 120, 01467 e_GatekeeperWithDataMP = 130, 01468 e_GatekeeperWithAudioMP = 140, 01469 e_GatekeeperWithAVMP = 150, 01470 e_MCUOnly = 160, 01471 e_MCUWithDataMP = 170, 01472 e_MCUWithAudioMP = 180, 01473 e_MCUWithAVMP = 190 01474 }; 01475 01478 TerminalTypes GetTerminalType() const { return terminalType; } 01479 01482 BOOL IsTerminal() const; 01483 01486 BOOL IsGateway() const; 01487 01490 BOOL IsGatekeeper() const; 01491 01494 BOOL IsMCU() const; 01495 01499 unsigned GetMinAudioJitterDelay() const { return minAudioJitterDelay; } 01500 01504 unsigned GetMaxAudioJitterDelay() const { return maxAudioJitterDelay; } 01505 01508 void SetAudioJitterDelay( 01509 unsigned minDelay, // New minimum jitter buffer delay in milliseconds 01510 unsigned maxDelay // New maximum jitter buffer delay in milliseconds 01511 ); 01512 01515 unsigned GetInitialBandwidth() const { return initialBandwidth; } 01516 01519 void SetInitialBandwidth(unsigned bandwidth) { initialBandwidth = bandwidth; } 01520 01526 PSTUNClient * GetSTUN( 01527 const PIPSocket::Address & address = 0 01528 ) const; 01529 01532 void SetSTUNServer( 01533 const PString & server 01534 ); 01535 01538 virtual BOOL IsLocalAddress( 01539 const PIPSocket::Address & remoteAddress 01540 ) const; 01541 01544 virtual void TranslateTCPAddress( 01545 PIPSocket::Address & /*localAddr*/, 01546 const PIPSocket::Address & /*remoteAddr */ 01547 ) { } 01548 01551 WORD GetTCPPortBase() const { return tcpPorts.base; } 01552 01555 WORD GetTCPPortMax() const { return tcpPorts.max; } 01556 01559 void SetTCPPorts(unsigned tcpBase, unsigned tcpMax); 01560 01563 WORD GetNextTCPPort(); 01564 01567 WORD GetUDPPortBase() const { return udpPorts.base; } 01568 01571 WORD GetUDPPortMax() const { return udpPorts.max; } 01572 01575 void SetUDPPorts(unsigned udpBase, unsigned udpMax); 01576 01579 WORD GetNextUDPPort(); 01580 01583 WORD GetRtpIpPortBase() const { return rtpIpPorts.base; } 01584 01587 WORD GetRtpIpPortMax() const { return rtpIpPorts.max; } 01588 01591 void SetRtpIpPorts(unsigned udpBase, unsigned udpMax); 01592 01595 WORD GetRtpIpPortPair(); 01596 01599 BYTE GetRtpIpTypeofService() const { return rtpIpTypeofService; } 01600 01603 void SetRtpIpTypeofService(unsigned tos) { rtpIpTypeofService = (BYTE)tos; } 01604 01607 const PTimeInterval & GetSignallingChannelCallTimeout() const { return signallingChannelCallTimeout; } 01608 01611 const PTimeInterval & GetControlChannelStartTimeout() const { return controlChannelStartTimeout; } 01612 01615 const PTimeInterval & GetEndSessionTimeout() const { return endSessionTimeout; } 01616 01619 const PTimeInterval & GetMasterSlaveDeterminationTimeout() const { return masterSlaveDeterminationTimeout; } 01620 01623 unsigned GetMasterSlaveDeterminationRetries() const { return masterSlaveDeterminationRetries; } 01624 01627 const PTimeInterval & GetCapabilityExchangeTimeout() const { return capabilityExchangeTimeout; } 01628 01631 const PTimeInterval & GetLogicalChannelTimeout() const { return logicalChannelTimeout; } 01632 01635 const PTimeInterval & GetRequestModeTimeout() const { return logicalChannelTimeout; } 01636 01639 const PTimeInterval & GetRoundTripDelayTimeout() const { return roundTripDelayTimeout; } 01640 01643 const PTimeInterval & GetRoundTripDelayRate() const { return roundTripDelayRate; } 01644 01647 BOOL ShouldClearCallOnRoundTripFail() const { return clearCallOnRoundTripFail; } 01648 01651 const PTimeInterval & GetNoMediaTimeout() const; 01652 01655 BOOL SetNoMediaTimeout(PTimeInterval newInterval); 01656 01659 const PTimeInterval & GetGatekeeperRequestTimeout() const { return gatekeeperRequestTimeout; } 01660 01663 unsigned GetGatekeeperRequestRetries() const { return gatekeeperRequestRetries; } 01664 01667 const PTimeInterval & GetRasRequestTimeout() const { return rasRequestTimeout; } 01668 01671 unsigned GetRasRequestRetries() const { return rasRequestRetries; } 01672 01676 const PTimeInterval & GetGatekeeperTimeToLive() const { return registrationTimeToLive; } 01677 01680 const PString & GetGkAccessTokenOID() const { return gkAccessTokenOID; } 01681 01684 void SetGkAccessTokenOID(const PString & token) { gkAccessTokenOID = token; } 01685 01688 const PTimeInterval & GetCallTransferT1() const { return callTransferT1; } 01689 01692 const PTimeInterval & GetCallTransferT2() const { return callTransferT2; } 01693 01696 const PTimeInterval & GetCallTransferT3() const { return callTransferT3; } 01697 01700 const PTimeInterval & GetCallTransferT4() const { return callTransferT4; } 01701 01703 const PTimeInterval & GetCallIntrusionT1() const { return callIntrusionT1; } 01704 const PTimeInterval & GetCallIntrusionT2() const { return callIntrusionT2; } 01705 const PTimeInterval & GetCallIntrusionT3() const { return callIntrusionT3; } 01706 const PTimeInterval & GetCallIntrusionT4() const { return callIntrusionT4; } 01707 const PTimeInterval & GetCallIntrusionT5() const { return callIntrusionT5; } 01708 const PTimeInterval & GetCallIntrusionT6() const { return callIntrusionT6; } 01709 01712 PINDEX GetCleanerThreadStackSize() const { return cleanerThreadStackSize; } 01713 01716 PINDEX GetListenerThreadStackSize() const { return listenerThreadStackSize; } 01717 01720 PINDEX GetSignallingThreadStackSize() const { return signallingThreadStackSize; } 01721 01724 PINDEX GetControlThreadStackSize() const { return controlThreadStackSize; } 01725 01728 PINDEX GetChannelThreadStackSize() const { return logicalThreadStackSize; } 01729 01732 PINDEX GetRasThreadStackSize() const { return rasThreadStackSize; } 01733 01736 PINDEX GetJitterThreadStackSize() const { return jitterThreadStackSize; } 01737 01740 H323CallIdentityDict& GetCallIdentityDictionary() { return secondaryConenctionsActive; } 01742 01746 static BYTE defaultT35CountryCode; 01747 static BYTE defaultT35Extension; 01748 static WORD defaultManufacturerCode; 01749 01750 protected: 01751 H323Gatekeeper * InternalCreateGatekeeper(H323Transport * transport); 01752 BOOL InternalRegisterGatekeeper(H323Gatekeeper * gk, BOOL discovered); 01753 H323Connection * FindConnectionWithoutLocks(const PString & token); 01754 H323Connection * InternalMakeCall( 01755 const PString & existingToken, 01756 const PString & callIdentity, 01757 unsigned capabilityLevel, 01758 const PString & remoteParty, 01759 H323Transport * transport, 01760 PString & token, 01761 void * userData 01762 ); 01763 01764 // Configuration variables, commonly changed 01765 PStringList localAliasNames; 01766 PString soundChannelPlayDevice; 01767 PString soundChannelRecordDevice; 01768 PString videoChannelPlayDevice; 01769 PString videoChannelRecordDevice; 01770 BOOL autoStartReceiveVideo; 01771 BOOL autoStartTransmitVideo; 01772 BOOL autoStartReceiveFax; 01773 BOOL autoStartTransmitFax; 01774 BOOL autoCallForward; 01775 BOOL disableFastStart; 01776 BOOL disableH245Tunneling; 01777 BOOL disableH245inSetup; 01778 BOOL disableDetectInBandDTMF; 01779 BOOL canDisplayAmountString; 01780 BOOL canEnforceDurationLimit; 01781 unsigned callIntrusionProtectionLevel; 01782 H323AudioCodec::SilenceDetectionMode defaultSilenceDetection; 01783 H323Connection::SendUserInputModes defaultSendUserInputMode; 01784 01785 PString ilsServer; 01786 01787 // Some more configuration variables, rarely changed. 01788 unsigned soundChannelBuffers; 01789 BYTE rtpIpTypeofService; 01790 PTimeInterval signallingChannelCallTimeout; 01791 PTimeInterval controlChannelStartTimeout; 01792 PTimeInterval endSessionTimeout; 01793 PTimeInterval masterSlaveDeterminationTimeout; 01794 unsigned masterSlaveDeterminationRetries; 01795 PTimeInterval capabilityExchangeTimeout; 01796 PTimeInterval logicalChannelTimeout; 01797 PTimeInterval requestModeTimeout; 01798 PTimeInterval roundTripDelayTimeout; 01799 PTimeInterval roundTripDelayRate; 01800 PTimeInterval noMediaTimeout; 01801 PTimeInterval gatekeeperRequestTimeout; 01802 unsigned gatekeeperRequestRetries; 01803 PTimeInterval rasRequestTimeout; 01804 unsigned rasRequestRetries; 01805 PTimeInterval registrationTimeToLive; 01806 PString gkAccessTokenOID; 01807 01808 unsigned minAudioJitterDelay; 01809 unsigned maxAudioJitterDelay; 01810 unsigned initialBandwidth; // in 100s of bits/sev 01811 BOOL clearCallOnRoundTripFail; 01812 01813 struct PortInfo { 01814 void Set( 01815 unsigned base, 01816 unsigned max, 01817 unsigned range, 01818 unsigned dflt 01819 ); 01820 WORD GetNext( 01821 unsigned increment 01822 ); 01823 01824 PMutex mutex; 01825 WORD base; 01826 WORD max; 01827 WORD current; 01828 } tcpPorts, udpPorts, rtpIpPorts; 01829 PSTUNClient * stun; 01830 01831 BYTE t35CountryCode; 01832 BYTE t35Extension; 01833 WORD manufacturerCode; 01834 01835 TerminalTypes terminalType; 01836 01837 /* Protect against absence of a response to the ctIdentify reqest 01838 (Transferring Endpoint - Call Transfer with a secondary Call) */ 01839 PTimeInterval callTransferT1; 01840 /* Protect against failure of completion of the call transfer operation 01841 involving a secondary Call (Transferred-to Endpoint) */ 01842 PTimeInterval callTransferT2; 01843 /* Protect against failure of the Transferred Endpoint not responding 01844 within sufficient time to the ctInitiate APDU (Transferring Endpoint) */ 01845 PTimeInterval callTransferT3; 01846 /* May optionally operate - protects against absence of a response to the 01847 ctSetup request (Transferred Endpoint) */ 01848 PTimeInterval callTransferT4; 01849 01851 PTimeInterval callIntrusionT1; 01852 PTimeInterval callIntrusionT2; 01853 PTimeInterval callIntrusionT3; 01854 PTimeInterval callIntrusionT4; 01855 PTimeInterval callIntrusionT5; 01856 PTimeInterval callIntrusionT6; 01857 01858 PINDEX cleanerThreadStackSize; 01859 PINDEX listenerThreadStackSize; 01860 PINDEX signallingThreadStackSize; 01861 PINDEX controlThreadStackSize; 01862 PINDEX logicalThreadStackSize; 01863 PINDEX rasThreadStackSize; 01864 PINDEX jitterThreadStackSize; 01865 01866 // Dynamic variables 01867 H323ListenerList listeners; 01868 H323Capabilities capabilities; 01869 H323Gatekeeper * gatekeeper; 01870 PString gatekeeperPassword; 01871 01872 H323ConnectionDict connectionsActive; 01873 H323CallIdentityDict secondaryConenctionsActive; 01874 PMutex connectionsMutex; 01875 PMutex noMediaMutex; 01876 PStringSet connectionsToBeCleaned; 01877 H323ConnectionsCleaner * connectionsCleaner; 01878 PSyncPoint connectionsAreCleaned; 01879 }; 01880 01881 01882 #endif // __OPAL_H323EP_H 01883 01884

Generated on Sat Jul 24 17:03:32 2004 for OpenH323 by doxygen 1.3.7