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.87  2006/06/26 02:52:51  shorne
00031  * Moved H460 feature loader from H323EndPoint Constructor
00032  *
00033  * Revision 1.86  2006/06/23 20:01:28  shorne
00034  * More H460 support
00035  *
00036  * Revision 1.85  2006/06/23 07:06:04  csoutheren
00037  * Fixed linux compile
00038  *
00039  * Revision 1.84  2006/06/23 06:02:44  csoutheren
00040  * Added missing declarations for H.224 backport
00041  *
00042  * Revision 1.83  2006/06/09 06:30:12  csoutheren
00043  * Remove compile warning and errors with gcc
00044  *
00045  * Revision 1.82  2006/05/30 11:14:55  hfriederich
00046  * Switch from DISABLE_H460 to H323_H460
00047  *
00048  * Revision 1.81  2006/05/16 11:44:09  shorne
00049  * extended DNS SRV, H460 Feature , Call Credit, extend conference goals
00050  *
00051  * Revision 1.80  2006/03/07 10:37:46  csoutheren
00052  * Add ability to disable GRQ on GK registration
00053  *
00054  * Revision 1.79  2006/01/26 03:47:17  shorne
00055  * Caller Authentication, more Nat Traversal support, more PBX support
00056  *
00057  * Revision 1.78  2006/01/20 00:32:24  csoutheren
00058  * First check-in of signalling aggregation code - incomplete and disabled by default
00059  *
00060  * Revision 1.77  2006/01/18 07:46:08  csoutheren
00061  * Initial version of RTP aggregation (disabled by default)
00062  *
00063  * Revision 1.76  2005/11/30 13:05:01  csoutheren
00064  * Changed tags for Doxygen
00065  *
00066  * Revision 1.75  2005/11/22 03:38:45  shorne
00067  * Added ToS support to TCP Transports. thx Norbert Bartalsky (TOPCALL)
00068  *
00069  * Revision 1.74  2005/11/21 21:02:19  shorne
00070  * Added GnuGK Nat detection support
00071  *
00072  * Revision 1.73  2005/09/16 08:12:49  csoutheren
00073  * Added ability to set timeout for connect
00074  *
00075  * Revision 1.72  2005/07/12 12:28:52  csoutheren
00076  * Fixes for H.450 errors and return values
00077  * Thanks to Iker Perez San Roman
00078  *
00079  * Revision 1.71  2005/03/10 07:01:29  csoutheren
00080  * Fixed problem with H.450 call identifiers not being unique across all calls on an
00081  *  endpoint. Thanks to Thien Nguyen
00082  *
00083  * Revision 1.70  2005/01/03 14:03:20  csoutheren
00084  * Added new configure options and ability to disable/enable modules
00085  *
00086  * Revision 1.69  2005/01/03 06:25:52  csoutheren
00087  * Added extensive support for disabling code modules at compile time
00088  *
00089  * Revision 1.68  2004/12/20 02:32:34  csoutheren
00090  * Cleeaned up OSP functions
00091  *
00092  * Revision 1.67  2004/12/08 01:59:22  csoutheren
00093  * initial support for Transnexus OSP toolkit
00094  *
00095  * Revision 1.66  2004/11/25 07:38:58  csoutheren
00096  * Ensured that external TCP address translation is performed when using STUN to handle UDP
00097  *
00098  * Revision 1.65  2004/09/03 01:06:09  csoutheren
00099  * Added initial hooks for H.460 GEF
00100  * Thanks to Simon Horne and ISVO (Asia) Pte Ltd. for this contribution
00101  *
00102  * Revision 1.64  2004/07/27 05:28:45  csoutheren
00103  * Added ability to set priority of channel threads
00104  *
00105  * Revision 1.63  2004/07/27 01:15:16  csoutheren
00106  * Added virtual to InternalMakeCall
00107  *
00108  * Revision 1.62  2004/07/19 13:19:55  csoutheren
00109  * Fixed typo in secondaryConnectionsActive
00110  *
00111  * Revision 1.61  2004/07/11 11:36:25  rjongbloed
00112  * Added virtual to CleanUpConnections, thanks Eize Slange
00113  *
00114  * Revision 1.60  2004/06/15 03:30:00  csoutheren
00115  * Added OnSendARQ to allow access to the ARQ message before sent by connection
00116  *
00117  * Revision 1.59  2004/06/04 07:05:10  csoutheren
00118  * Fixed obvious typos
00119  *
00120  * Revision 1.58  2004/06/01 05:48:02  csoutheren
00121  * Changed capability table to use abstract factory routines rather than internal linked list
00122  *
00123  * Revision 1.57  2004/05/17 12:14:24  csoutheren
00124  * Added support for different SETUP PDU types
00125  *
00126  * Revision 1.56  2003/12/29 04:58:55  csoutheren
00127  * Added callbacks on H323EndPoint when gatekeeper discovery succeeds or fails
00128  *
00129  * Revision 1.55  2003/12/28 02:52:15  csoutheren
00130  * Added virtual to a few functions
00131  *
00132  * Revision 1.54  2003/12/28 02:38:14  csoutheren
00133  * Added H323EndPoint::OnOutgoingCall
00134  *
00135  * Revision 1.53  2003/12/28 00:07:10  csoutheren
00136  * Added callbacks on H323EndPoint when gatekeeper registration succeeds or fails
00137  *
00138  * Revision 1.52  2003/04/24 01:49:33  dereks
00139  * Add ability to set no media timeout interval
00140  *
00141  * Revision 1.51  2003/04/10 09:39:48  robertj
00142  * Added associated transport to new GetInterfaceAddresses() function so
00143  *   interfaces can be ordered according to active transport links. Improves
00144  *   interoperability.
00145  *
00146  * Revision 1.50  2003/04/10 01:05:11  craigs
00147  * Added functions to access to lists of interfaces
00148  *
00149  * Revision 1.49  2003/04/07 13:09:25  robertj
00150  * Added ILS support to callto URL parsing in MakeCall(), ie can now call hosts
00151  *   registered with an ILS directory.
00152  *
00153  * Revision 1.48  2003/02/13 00:11:31  robertj
00154  * Added missing virtual for controlling call transfer, thanks Andrey Pinaev
00155  *
00156  * Revision 1.47  2003/02/09 00:48:06  robertj
00157  * Added function to return if registered with gatekeeper.
00158  *
00159  * Revision 1.46  2003/02/04 07:06:41  robertj
00160  * Added STUN support.
00161  *
00162  * Revision 1.45  2003/01/26 05:57:58  robertj
00163  * Changed ParsePartyName so will accept addresses of the form
00164  *   alias@gk:address which will do an LRQ call to "address" using "alias"
00165  *   to determine the IP address to connect to.
00166  *
00167  * Revision 1.44  2003/01/23 02:36:30  robertj
00168  * Increased (and made configurable) timeout for H.245 channel TCP connection.
00169  *
00170  * Revision 1.43  2002/11/28 01:19:55  craigs
00171  * Added virtual to several functions
00172  *
00173  * Revision 1.42  2002/11/27 06:54:52  robertj
00174  * Added Service Control Session management as per Annex K/H.323 via RAS
00175  *   only at this stage.
00176  * Added H.248 ASN and very primitive infrastructure for linking into the
00177  *   Service Control Session management system.
00178  * Added basic infrastructure for Annex K/H.323 HTTP transport system.
00179  * Added Call Credit Service Control to display account balances.
00180  *
00181  * Revision 1.41  2002/11/15 05:17:22  robertj
00182  * Added facility redirect support without changing the call token for access
00183  *   to the call. If it gets redirected a new H323Connection object is
00184  *   created but it looks like the same thing to an application.
00185  *
00186  * Revision 1.40  2002/11/10 08:10:43  robertj
00187  * Moved constants for "well known" ports to better place (OPAL change).
00188  *
00189  * Revision 1.39  2002/10/31 00:32:15  robertj
00190  * Enhanced jitter buffer system so operates dynamically between minimum and
00191  *   maximum values. Altered API to assure app writers note the change!
00192  *
00193  * Revision 1.38  2002/10/23 06:06:10  robertj
00194  * Added function to be smarter in using a gatekeeper for use by endpoint.
00195  *
00196  * Revision 1.37  2002/10/21 06:07:44  robertj
00197  * Added function to set gatekeeper access token OID.
00198  *
00199  * Revision 1.36  2002/09/16 01:14:15  robertj
00200  * Added #define so can select if #pragma interface/implementation is used on
00201  *   platform basis (eg MacOS) rather than compiler, thanks Robert Monaghan.
00202  *
00203  * Revision 1.35  2002/09/10 06:32:25  robertj
00204  * Added function to get gatekeeper password.
00205  *
00206  * Revision 1.34  2002/09/03 06:19:36  robertj
00207  * Normalised the multi-include header prevention ifdef/define symbol.
00208  *
00209  * Revision 1.33  2002/07/19 03:39:19  robertj
00210  * Bullet proofed setting of RTP IP port base, can't be zero!
00211  *
00212  * Revision 1.32  2002/07/18 01:50:10  robertj
00213  * Changed port secltion code to force apps to use function interface.
00214  *
00215  * Revision 1.31  2002/06/22 05:48:38  robertj
00216  * Added partial implementation for H.450.11 Call Intrusion
00217  *
00218  * Revision 1.30  2002/06/13 06:15:19  robertj
00219  * Allowed TransferCall() to be used on H323Connection as well as H323EndPoint.
00220  *
00221  * Revision 1.29  2002/06/12 03:55:21  robertj
00222  * Added function to add/remove multiple listeners in one go comparing against
00223  *   what is already running so does not interrupt unchanged listeners.
00224  *
00225  * Revision 1.28  2002/05/29 06:40:29  robertj
00226  * Changed sending of endSession/ReleaseComplete PDU's to occur immediately
00227  *   on call clearance and not wait for background thread to do it.
00228  * Stricter compliance by waiting for reply endSession before closing down.
00229  *
00230  * Revision 1.27  2002/05/28 06:15:09  robertj
00231  * Split UDP (for RAS) from RTP port bases.
00232  * Added current port variable so cycles around the port range specified which
00233  *   fixes some wierd problems on some platforms, thanks Federico Pinna
00234  *
00235  * Revision 1.26  2002/05/17 03:38:05  robertj
00236  * Fixed problems with H.235 authentication on RAS for server and client.
00237  *
00238  * Revision 1.25  2002/05/16 00:03:05  robertj
00239  * Added function to get the tokens for all active calls.
00240  * Improved documentation for use of T.38 and T.120 functions.
00241  *
00242  * Revision 1.24  2002/05/15 08:59:18  rogerh
00243  * Update comments
00244  *
00245  * Revision 1.23  2002/05/03 05:38:15  robertj
00246  * Added Q.931 Keypad IE mechanism for user indications (DTMF).
00247  *
00248  * Revision 1.22  2002/05/02 07:56:24  robertj
00249  * Added automatic clearing of call if no media (RTP data) is transferred in a
00250  *   configurable (default 5 minutes) amount of time.
00251  *
00252  * Revision 1.21  2002/04/18 01:41:07  robertj
00253  * Fixed bad variable name for disabling DTMF detection, very confusing.
00254  *
00255  * Revision 1.20  2002/04/17 00:49:56  robertj
00256  * Added ability to disable the in band DTMF detection.
00257  *
00258  * Revision 1.19  2002/04/10 06:48:47  robertj
00259  * Added functions to set port member variables.
00260  *
00261  * Revision 1.18  2002/03/14 03:49:38  dereks
00262  * Fix minor documentation error.
00263  *
00264  * Revision 1.17  2002/02/04 07:17:52  robertj
00265  * Added H.450.2 Consultation Transfer, thanks Norwood Systems.
00266  *
00267  * Revision 1.16  2002/01/24 06:29:02  robertj
00268  * Added option to disable H.245 negotiation in SETUP pdu, this required
00269  *   API change so have a bit mask instead of a series of booleans.
00270  *
00271  * Revision 1.15  2002/01/17 07:04:58  robertj
00272  * Added support for RFC2833 embedded DTMF in the RTP stream.
00273  *
00274  * Revision 1.14  2002/01/13 23:59:43  robertj
00275  * Added CallTransfer timeouts to endpoint, hanks Ben Madsen of Norwood Systems.
00276  *
00277  * Revision 1.13  2002/01/08 04:45:35  robertj
00278  * Added MakeCallLocked() so can start a call with the H323Connection instance
00279  *   initally locked so can do things to it before the call really starts.
00280  *
00281  * Revision 1.12  2001/12/22 03:20:44  robertj
00282  * Added create protocol function to H323Connection.
00283  *
00284  * Revision 1.11  2001/12/13 10:55:30  robertj
00285  * Added gatekeeper access token OID specification for auto inclusion of
00286  *   access tokens frm ACF to SETUP pdu.
00287  *
00288  * Revision 1.10  2001/11/09 05:39:54  craigs
00289  * Added initial T.38 support thanks to Adam Lazur
00290  *
00291  * Revision 1.9  2001/11/01 00:27:33  robertj
00292  * Added default Fast Start disabled and H.245 tunneling disable flags
00293  *   to the endpoint instance.
00294  *
00295  * Revision 1.8  2001/09/11 01:24:36  robertj
00296  * Added conditional compilation to remove video and/or audio codecs.
00297  *
00298  * Revision 1.7  2001/09/11 00:21:21  robertj
00299  * Fixed missing stack sizes in endpoint for cleaner thread and jitter thread.
00300  *
00301  * Revision 1.6  2001/08/24 14:03:26  rogerh
00302  * Fix some spelling mistakes
00303  *
00304  * Revision 1.5  2001/08/16 07:49:16  robertj
00305  * Changed the H.450 support to be more extensible. Protocol handlers
00306  *   are now in separate classes instead of all in H323Connection.
00307  *
00308  * Revision 1.4  2001/08/10 11:03:49  robertj
00309  * Major changes to H.235 support in RAS to support server.
00310  *
00311  * Revision 1.3  2001/08/08 23:54:11  robertj
00312  * Fixed problem with setting gk password before have a gk variable.
00313  *
00314  * Revision 1.2  2001/08/06 03:15:17  robertj
00315  * Improved access to H.235 secure RAS functionality.
00316  *
00317  * Revision 1.1  2001/08/06 03:08:11  robertj
00318  * Fission of h323.h to h323ep.h & h323con.h, h323.h now just includes files.
00319  *
00320  */
00321 
00322 #ifndef __OPAL_H323EP_H
00323 #define __OPAL_H323EP_H
00324 
00325 #include "h323.h"
00326 #include "h323con.h"
00327 
00328 class PHandleAggregator;
00329 
00330 #ifdef H323_TRANSNEXUS_OSP
00331 #include "opalosp.h"
00332 #endif
00333 
00334 /* The following classes have forward references to avoid including the VERY
00335    large header files for H225 and H245. If an application requires access
00336    to the protocol classes they can include them, but for simple usage their
00337    inclusion can be avoided.
00338  */
00339 class H225_EndpointType;
00340 class H225_VendorIdentifier;
00341 class H225_H221NonStandard;
00342 class H225_ServiceControlDescriptor;
00343 
00344 class H323SignalPDU;
00345 class H323ConnectionsCleaner;
00346 class H323ServiceControlSession;
00347 
00348 #if OPAL_H224
00349 class OpalH224Handler;
00350 class OpalH281Handler;
00351 #endif
00352 
00353 #ifndef DISABLE_CALLAUTH
00354 #include "h235auth.h"
00355 #endif
00356 
00357 #ifdef H323_T120
00358 class OpalT120Protocol;
00359 #endif
00360 
00361 #ifdef H323_T38
00362 class OpalT38Protocol;
00363 #endif
00364 
00365 #ifdef OPAL_H224
00366 class OpalH224Handler;
00367 class OpalH281Handler;
00368 #endif
00369 
00370 #ifdef P_STUN
00371 #include <ptclib/pnat.h>
00372 class PSTUNClient;
00373 #endif
00374 
00375 #ifdef P_USE_PRAGMA
00376 #pragma interface
00377 #endif
00378 
00379 #ifdef H323_H460
00380 #include "h4601.h"
00381 #endif
00382 
00384 
00397 class H323EndPoint : public PObject
00398 {
00399   PCLASSINFO(H323EndPoint, PObject);
00400 
00401   public:
00402     enum {
00403       DefaultTcpPort = 1720
00404     };
00405 
00410     H323EndPoint();
00411 
00414     ~H323EndPoint();
00415 
00418     virtual void SetEndpointTypeInfo(
00419       H225_EndpointType & info
00420     ) const;
00421 
00424     virtual void SetVendorIdentifierInfo(
00425       H225_VendorIdentifier & info
00426     ) const;
00427 
00430     virtual void SetH221NonStandardInfo(
00431       H225_H221NonStandard & info
00432     ) const;
00434 
00435 
00446     void AddCapability(
00447       H323Capability * capability   
00448     );
00449 
00470     PINDEX SetCapability(
00471       PINDEX descriptorNum, 
00472       PINDEX simultaneous,  
00473       H323Capability * cap  
00474     );
00475 
00480     PINDEX AddAllCapabilities(
00481       PINDEX descriptorNum, 
00482       PINDEX simultaneous,  
00483       const PString & name  
00484     );
00485 
00488     void AddAllUserInputCapabilities(
00489       PINDEX descriptorNum, 
00490       PINDEX simultaneous   
00491     );
00492 
00495     void RemoveCapabilities(
00496       const PStringArray & codecNames
00497     );
00498 
00501     void ReorderCapabilities(
00502       const PStringArray & preferenceOrder
00503     );
00504 
00507     H323Capability * FindCapability(
00508       const H245_Capability & cap  
00509     ) const;
00510 
00513     H323Capability * FindCapability(
00514       const H245_DataType & dataType  
00515     ) const;
00516 
00519     H323Capability * FindCapability(
00520       H323Capability::MainTypes mainType,   
00521       unsigned subType                      
00522     ) const;
00524 
00544     BOOL UseGatekeeper(
00545       const PString & address = PString::Empty(),     
00546       const PString & identifier = PString::Empty(),  
00547       const PString & localAddress = PString::Empty() 
00548     );
00549 
00560     BOOL SetGatekeeper(
00561       const PString & address,          
00562       H323Transport * transport = NULL  
00563     );
00564 
00579     BOOL SetGatekeeperZone(
00580       const PString & address,          
00581       const PString & identifier,       
00582       H323Transport * transport = NULL  
00583     );
00584 
00594     BOOL LocateGatekeeper(
00595       const PString & identifier,       
00596       H323Transport * transport = NULL  
00597     );
00598 
00607     BOOL DiscoverGatekeeper(
00608       H323Transport * transport = NULL  
00609     );
00610 
00618     virtual H323Gatekeeper * CreateGatekeeper(
00619       H323Transport * transport  
00620     );
00621 
00624     H323Gatekeeper * GetGatekeeper() const { return gatekeeper; }
00625 
00628     BOOL IsRegisteredWithGatekeeper() const;
00629 
00635     BOOL RemoveGatekeeper(
00636       int reason = -1    
00637     );
00638 
00641     virtual void SetGatekeeperPassword(
00642       const PString & password
00643     );
00644 
00647     virtual const PString & GetGatekeeperPassword() const { return gatekeeperPassword; }
00648 
00651     virtual H235Authenticators CreateAuthenticators();
00652 
00655     virtual void  OnGatekeeperConfirm();
00656 
00659     virtual void  OnGatekeeperReject();
00660 
00663     virtual void OnRegistrationConfirm();
00664 
00667     virtual void  OnRegistrationReject();
00669 
00670 #ifdef H323_TRANSNEXUS_OSP
00671 
00677     inline int SetOSPProvider(
00678       const PString & server
00679     )
00680     { return SetOSPProvider(server, PDirectory()); }
00681     virtual int SetOSPProvider(
00682       const PString & server,
00683       const PDirectory & ospDir
00684     );
00685     virtual void SetOSPProvider(
00686       OpalOSP::Provider * provider
00687     );
00688 
00691     virtual OpalOSP::Provider * GetOSPProvider()
00692     { return ospProvider; }
00693 
00694 #endif
00695 
00712     BOOL StartListener(
00713       H323Listener * listener 
00714     );
00715 
00727     BOOL StartListener(
00728       const H323TransportAddress & iface 
00729     );
00730 
00747     BOOL StartListeners(
00748       const H323TransportAddressArray & ifaces 
00749     );
00750 
00754     BOOL RemoveListener(
00755       H323Listener * listener 
00756     );
00757 
00760     H323TransportAddressArray GetInterfaceAddresses(
00761       BOOL excludeLocalHost = TRUE,       
00762       H323Transport * associatedTransport = NULL
00764     );
00765 
00766 #ifndef DISABLE_CALLAUTH
00767 
00771       H323Connection * MakeAuthenticatedCall (
00772                         const PString & remoteParty,  
00773                         const PString & UserName,     
00774                         const PString & Password,     
00775                         PString & token,              
00776                         void * userData = NULL        
00777      );                                                                                 
00778 #endif                                                          
00779 
00798     H323Connection * MakeCall(
00799       const PString & remoteParty,  
00800       PString & token,              
00801       void * userData = NULL        
00802     );
00803 
00824     H323Connection * MakeCall(
00825       const PString & remoteParty,  
00826       H323Transport * transport,    
00827       PString & token,              
00828       void * userData = NULL        
00829     );
00830 
00841     H323Connection * MakeCallLocked(
00842       const PString & remoteParty,     
00843       PString & token,                 
00844       void * userData = NULL,          
00845       H323Transport * transport = NULL 
00846     );
00847 
00848 #ifdef H323_H450
00849 
00870     virtual H323Connection * SetupTransfer(
00871       const PString & token,        
00872       const PString & callIdentity, 
00873       const PString & remoteParty,  
00874       PString & newToken,           
00875       void * userData = NULL        
00876     );
00877 
00883     void TransferCall(
00884       const PString & token,        
00885       const PString & remoteParty,  
00886       const PString & callIdentity = PString::Empty()
00888     );
00889 
00896     void ConsultationTransfer(
00897       const PString & primaryCallToken,   
00898       const PString & secondaryCallToken  
00899     );
00900 
00904     void HoldCall(
00905       const PString & token,        
00906       BOOL localHold   
00907     );
00908 
00912     H323Connection * IntrudeCall(
00913       const PString & remoteParty,  
00914       PString & token,              
00915       unsigned capabilityLevel,     
00916       void * userData = NULL        
00917     );
00918 
00919     H323Connection * IntrudeCall(
00920       const PString & remoteParty,  
00921       H323Transport * transport,    
00922       PString & token,              
00923       unsigned capabilityLevel,     
00924       void * userData = NULL        
00925     );
00926 
00927 #endif // H323_H450
00928 
00932     BOOL ResolveCallParty(
00933       const PString & _remoteParty, 
00934       PStringList & addresses
00935     );
00936 
00943     BOOL ParsePartyName(
00944       const PString & party,          
00945       PString & alias,                
00946       H323TransportAddress & address  
00947     );
00948 
00953     virtual BOOL ClearCall(
00954       const PString & token,  
00955       H323Connection::CallEndReason reason =
00956                   H323Connection::EndedByLocalUser 
00957     );
00958 
00964      virtual void OnCallClearing(H323Connection * connection,       
00965                               H323Connection::CallEndReason reason  
00966      );
00967 
00972     virtual BOOL ClearCallSynchronous(
00973       const PString & token,            
00974       H323Connection::CallEndReason reason =
00975                         H323Connection::EndedByLocalUser 
00976     );
00977     virtual BOOL ClearCallSynchronous(
00978       const PString & token,                
00979       H323Connection::CallEndReason reason, 
00980       PSyncPoint * sync
00981     );
00982 
00989     virtual void ClearAllCalls(
00990       H323Connection::CallEndReason reason =
00991                   H323Connection::EndedByLocalUser, 
00992       BOOL wait = TRUE   
00993     );
00994 
00997     virtual BOOL HasConnection(
00998       const PString & token   
00999     );
01000 
01012     H323Connection * FindConnectionWithLock(
01013       const PString & token     
01014     );
01015 
01018     PStringList GetAllConnections();
01019 
01031     virtual BOOL OnIncomingCall(
01032       H323Connection & connection,    
01033       const H323SignalPDU & setupPDU,   
01034       H323SignalPDU & alertingPDU       
01035     );
01036     virtual BOOL OnIncomingCall(
01037       H323Connection & connection,           
01038       const H323SignalPDU & setupPDU,        
01039       H323SignalPDU & alertingPDU,           
01040       H323Connection::CallEndReason & reason 
01041     );
01042 
01047     virtual BOOL OnCallTransferInitiate(
01048       H323Connection & connection,    
01049       const PString & remoteParty     
01050     );
01051 
01056     virtual BOOL OnCallTransferIdentify(
01057       H323Connection & connection    
01058     );
01059 
01064     virtual void OnSendARQ(
01065       H323Connection & conn,
01066       H225_AdmissionRequest & arq
01067     );
01068 
01087     virtual H323Connection::AnswerCallResponse OnAnswerCall(
01088       H323Connection & connection,    
01089       const PString & callerName,       
01090       const H323SignalPDU & setupPDU,   
01091       H323SignalPDU & connectPDU        
01092     );
01093 
01104     virtual BOOL OnAlerting(
01105       H323Connection & connection,    
01106       const H323SignalPDU & alertingPDU,  
01107       const PString & user                
01108     );
01109 
01118     virtual BOOL OnConnectionForwarded(
01119       H323Connection & connection,    
01120       const PString & forwardParty,   
01121       const H323SignalPDU & pdu       
01122     );
01123 
01132     virtual BOOL ForwardConnection(
01133       H323Connection & connection,    
01134       const PString & forwardParty,   
01135       const H323SignalPDU & pdu       
01136     );
01137 
01144     virtual void OnConnectionEstablished(
01145       H323Connection & connection,    
01146       const PString & token           
01147     );
01148 
01151     virtual BOOL IsConnectionEstablished(
01152       const PString & token   
01153     );
01154 
01161     virtual void OnConnectionCleared(
01162       H323Connection & connection,    
01163       const PString & token           
01164     );
01165 
01170     static PString BuildConnectionToken(
01171       const H323Transport & transport,  
01172       unsigned callReference,           
01173       BOOL fromRemote                   
01174     );
01175 
01181     virtual H323Connection * OnIncomingConnection(
01182       H323Transport * transport,  
01183       H323SignalPDU & setupPDU    
01184     );
01185 
01192     virtual BOOL OnOutgoingCall(
01193         H323Connection & conn, 
01194         const H323SignalPDU & connectPDU
01195     );
01196 
01199     virtual H323Connection * CreateConnection(
01200       unsigned callReference,     
01201       void * userData,            
01202       H323Transport * transport,  
01203       H323SignalPDU * setupPDU    
01204     );
01205     virtual H323Connection * CreateConnection(
01206       unsigned callReference,   
01207       void * userData           
01208     );
01209     virtual H323Connection * CreateConnection(
01210       unsigned callReference    
01211     );
01212 
01219     virtual void CleanUpConnections();
01221 
01222 #ifndef DISABLE_CALLAUTH
01223 
01231      virtual H235Authenticators CreateEPAuthenticators();
01232 
01236     virtual BOOL GetEPCredentials(PString & password,   
01237                                   PString & username    
01238                                   );
01239 
01242      virtual void SetEPCredentials(PString password,   
01243                                    PString username    
01244                                    );
01245 
01246      enum EPSecurityPolicy
01247      {
01248          SecNone,           
01249          SecRequest,        
01250          SecRequired        
01251      };
01252 
01255      virtual void SetEPSecurityPolicy(EPSecurityPolicy policy);
01256 
01259      virtual EPSecurityPolicy GetEPSecurityPolicy();
01260 
01264      H235AuthenticatorList GetAuthenticatorList();
01265 
01275       virtual BOOL OnCallAuthentication(const PString & username,  
01276                                         PString & password         
01277                                         );
01279 #endif
01280 
01287     virtual BOOL OnStartLogicalChannel(
01288       H323Connection & connection,    
01289       H323Channel & channel           
01290     );
01291 
01296     virtual void OnClosedLogicalChannel(
01297       H323Connection & connection,    
01298       const H323Channel & channel     
01299     );
01300 
01301 #ifndef NO_H323_AUDIO_CODECS
01302 
01309     virtual BOOL OpenAudioChannel(
01310       H323Connection & connection,  
01311       BOOL isEncoding,              
01312       unsigned bufferSize,          
01313       H323AudioCodec & codec        
01314     );
01315 #endif
01316 
01317 #ifndef NO_H323_VIDEO
01318 
01324     virtual BOOL OpenVideoChannel(
01325       H323Connection & connection,  
01326       BOOL isEncoding,              
01327       H323VideoCodec & codec        
01328     );
01329 #endif // NO_H323_VIDEO
01330 
01338     virtual void OnRTPStatistics(
01339       const H323Connection & connection,  
01340       const RTP_Session & session         
01341     ) const;
01343 
01350     virtual void OnUserInputString(
01351       H323Connection & connection,  
01352       const PString & value         
01353     );
01354 
01359     virtual void OnUserInputTone(
01360       H323Connection & connection,  
01361       char tone,                    
01362       unsigned duration,            
01363       unsigned logicalChannel,      
01364       unsigned rtpTimestamp         
01365     );
01366 
01370         virtual void OnGatekeeperNATDetect(
01371                 PIPSocket::Address publicAddr,         
01372                 PString & gkIdentifier,                
01373                 H323TransportAddress & gkRouteAddress  
01374                 );
01376 
01377 #ifdef H323_H248
01378 
01387     virtual void OnHTTPServiceControl(
01388       unsigned operation,  
01389       unsigned sessionId,  
01390       const PString & url  
01391     );
01392 
01393         virtual void OnCallCreditServiceControl(
01394       const PString & amount,         
01395       BOOL mode,                      
01396           const unsigned & durationLimit  
01397     );
01398 
01408     virtual void OnCallCreditServiceControl(
01409       const PString & amount,  
01410       BOOL mode          
01411     );
01412 
01416     virtual void OnServiceControlSession(
01417       unsigned type,
01418       unsigned sessionid,
01419       const H323ServiceControlSession & session,
01420       H323Connection * connection
01421     );
01422 
01425     virtual H323ServiceControlSession * CreateServiceControlSession(
01426       const H225_ServiceControlDescriptor & contents
01427     );
01429 #endif // H323_H248
01430 
01433 #ifdef H323_T120
01434 
01444     virtual OpalT120Protocol * CreateT120ProtocolHandler(
01445       const H323Connection & connection  
01446     ) const;
01447 #endif
01448 
01449 #ifdef H323_T38
01450 
01460     virtual OpalT38Protocol * CreateT38ProtocolHandler(
01461       const H323Connection & connection  
01462     ) const;
01464 #endif
01465 
01466 #if OPAL_H224
01467 
01477     virtual OpalH224Handler * CreateH224ProtocolHandler(
01478       H323Connection & connection, 
01479       unsigned sessionID
01480     ) const;
01481         
01491     virtual OpalH281Handler * CreateH281ProtocolHandler(
01492       OpalH224Handler & h224Handler
01493     ) const;
01494 #endif
01495 
01503     virtual BOOL OnConferenceInvite(
01504       BOOL sending,                       
01505       const H323Connection * connection,  
01506       const H323SignalPDU & setupPDU      
01507     );
01508 
01514     virtual BOOL OnSendCallIndependentSupplementaryService(
01515       const H323Connection * connection,  
01516       H323SignalPDU & pdu                 
01517     );
01518 
01519     virtual BOOL OnReceiveCallIndependentSupplementaryService(
01520       const H323Connection * connection,  
01521       const H323SignalPDU & pdu                 
01522     );
01523 
01529     virtual BOOL OnNegotiateConferenceCapabilities(
01530       const H323SignalPDU & setupPDU
01531     );
01533 
01544     virtual void SetLocalUserName(
01545       const PString & name  
01546     );
01547 
01552     virtual const PString & GetLocalUserName() const { return localAliasNames[0]; }
01553 
01560     BOOL AddAliasName(
01561       const PString & name  
01562     );
01563 
01567     BOOL RemoveAliasName(
01568       const PString & name  
01569     );
01570 
01575     const PStringList & GetAliasNames() const { return localAliasNames; }
01576 
01577 #if P_LDAP
01578 
01581     const PString & GetDefaultILSServer() const { return ilsServer; }
01582 
01585     void SetDefaultILSServer(
01586       const PString & server
01587       ) { ilsServer = server; }
01588 
01589 #endif
01590 
01593     BOOL IsFastStartDisabled() const
01594       { return disableFastStart; }
01595 
01598     void DisableFastStart(
01599       BOOL mode 
01600     ) { disableFastStart = mode; } 
01601 
01604     BOOL IsH245TunnelingDisabled() const
01605       { return disableH245Tunneling; }
01606 
01609     void DisableH245Tunneling(
01610       BOOL mode 
01611     ) { disableH245Tunneling = mode; } 
01612 
01615     BOOL IsH245inSetupDisabled() const
01616       { return disableH245inSetup; }
01617 
01620     void DisableH245inSetup(
01621       BOOL mode 
01622     ) { disableH245inSetup = mode; } 
01623 
01626     BOOL DetectInBandDTMFDisabled() const
01627       { return disableDetectInBandDTMF; }
01628 
01631     void DisableDetectInBandDTMF(
01632       BOOL mode 
01633     ) { disableDetectInBandDTMF = mode; } 
01634 
01637     BOOL CanDisplayAmountString() const
01638       { return canDisplayAmountString; }
01639 
01642     void SetCanDisplayAmountString(
01643       BOOL mode 
01644     ) { canDisplayAmountString = mode; } 
01645 
01648     BOOL CanEnforceDurationLimit() const
01649       { return canEnforceDurationLimit; }
01650 
01653     void SetCanEnforceDurationLimit(
01654       BOOL mode 
01655     ) { canEnforceDurationLimit = mode; } 
01656 
01657 #ifdef H323_RTP_AGGREGATE
01658 
01660     void SetRTPAggregatationSize(
01661       PINDEX size            
01662     ) { rtpAggregationSize = size; }
01663 
01666     PINDEX GetRTPAggregationSize() const
01667     { return rtpAggregationSize; }
01668 
01671     PHandleAggregator * GetRTPAggregator();
01672 #endif
01673 
01674 #ifdef H323_SIGNAL_AGGREGATE
01675 
01677     void SetSignallingAggregationSize(
01678       PINDEX size            
01679     ) { signallingAggregationSize = size; }
01680 
01683     PINDEX GetSignallingAggregationSize() const
01684     { return signallingAggregationSize; }
01685 
01688     PHandleAggregator * GetSignallingAggregator();
01689 #endif
01690 
01691 #ifdef H323_H450
01692 
01695     unsigned GetCallIntrusionProtectionLevel() const { return callIntrusionProtectionLevel; }
01696 
01699     void SetCallIntrusionProtectionLevel(
01700       unsigned level  
01701     ) { PAssert(level<=3, PInvalidParameter); callIntrusionProtectionLevel = level; }
01702 
01705     virtual void OnReceivedInitiateReturnError();
01706 
01707 #endif // H323_H450
01708 
01709 #ifdef H323_AUDIO_CODECS
01710 #ifdef P_AUDIO
01711 
01719     virtual BOOL SetSoundChannelPlayDevice(const PString & name);
01720     virtual BOOL SetSoundChannelPlayDriver(const PString & name);
01721 
01726     const PString & GetSoundChannelPlayDevice() const { return soundChannelPlayDevice; }
01727     const PString & GetSoundChannelPlayDriver() const { return soundChannelPlayDriver; }
01728 
01736     virtual BOOL SetSoundChannelRecordDevice(const PString & name);
01737     virtual BOOL SetSoundChannelRecordDriver(const PString & name);
01738 
01743     const PString & GetSoundChannelRecordDevice() const { return soundChannelRecordDevice; }
01744     const PString & GetSoundChannelRecordDriver() const { return soundChannelRecordDriver; }
01745 
01748     unsigned GetSoundChannelBufferDepth() const { return soundChannelBuffers; }
01749 
01752     void SetSoundChannelBufferDepth(
01753       unsigned depth    
01754     );
01755 
01756 #endif  // P_AUDIO
01757 
01760     H323AudioCodec::SilenceDetectionMode GetSilenceDetectionMode() const
01761       { return defaultSilenceDetection; }
01762 
01765     void SetSilenceDetectionMode(
01766       H323AudioCodec::SilenceDetectionMode mode 
01767     ) { defaultSilenceDetection = mode; } 
01768 
01769 #endif  // H323_AUDIO_CODECS
01770 
01773     H323Connection::SendUserInputModes GetSendUserInputMode() const { return defaultSendUserInputMode; }
01774 
01777     void SetSendUserInputMode(H323Connection::SendUserInputModes mode) { defaultSendUserInputMode = mode; }
01778 
01779 #ifdef H323_VIDEO
01780 
01783     BOOL CanAutoStartReceiveVideo() const { return autoStartReceiveVideo; }
01784 
01787     BOOL CanAutoStartTransmitVideo() const { return autoStartTransmitVideo; }
01788 
01789 #endif  // H323_VIDEO
01790 
01791 #ifdef H323_T38
01792 
01795     BOOL CanAutoStartReceiveFax() const { return autoStartReceiveFax; }
01796 
01799     BOOL CanAutoStartTransmitFax() const { return autoStartTransmitFax; }
01800 
01801 #endif // H323_T38
01802 
01805     BOOL CanAutoCallForward() const { return autoCallForward; }
01806 
01809     const H323ListenerList & GetListeners() const { return listeners; }
01810 
01813     const H323Capabilities & GetCapabilities() const { return capabilities; }
01814 
01817     enum TerminalTypes {
01818       e_TerminalOnly = 50,
01819       e_TerminalAndMC = 70,
01820       e_GatewayOnly = 60,
01821       e_GatewayAndMC = 80,
01822       e_GatewayAndMCWithDataMP = 90,
01823       e_GatewayAndMCWithAudioMP = 100,
01824       e_GatewayAndMCWithAVMP = 110,
01825       e_GatekeeperOnly = 120,
01826       e_GatekeeperWithDataMP = 130,
01827       e_GatekeeperWithAudioMP = 140,
01828       e_GatekeeperWithAVMP = 150,
01829       e_MCUOnly = 160,
01830       e_MCUWithDataMP = 170,
01831       e_MCUWithAudioMP = 180,
01832       e_MCUWithAVMP = 190
01833     };
01834 
01837     TerminalTypes GetTerminalType() const { return terminalType; }
01838 
01841     BOOL IsTerminal() const;
01842 
01845     BOOL IsGateway() const;
01846 
01849     BOOL IsGatekeeper() const;
01850 
01853     BOOL IsMCU() const;
01854 
01855 #ifdef H323_AUDIO_CODECS
01856 
01859     unsigned GetMinAudioJitterDelay() const { return minAudioJitterDelay; }
01860 
01864     unsigned GetMaxAudioJitterDelay() const { return maxAudioJitterDelay; }
01865 
01868     void SetAudioJitterDelay(
01869       unsigned minDelay,   
01870       unsigned maxDelay    
01871     );
01872 #endif
01873 
01876     unsigned GetInitialBandwidth() const { return initialBandwidth; }
01877 
01880     void SetInitialBandwidth(unsigned bandwidth) { initialBandwidth = bandwidth; }
01881 
01884     virtual BOOL OnSendFeatureSet(unsigned, H225_FeatureSet &);
01885 
01888     virtual void OnReceiveFeatureSet(unsigned, const H225_FeatureSet &);
01889 
01893         virtual void LoadBaseFeatureSet();
01894 
01898         virtual BOOL HandleUnsolicitedInformation(const H323SignalPDU & pdu);
01899 
01900 #ifdef H323_H460
01901 
01903     H460_FeatureSet & GetFeatureSet() {  return features.DeriveNewFeatureSet(); };
01904 #endif
01905 
01906 #ifdef P_STUN
01907 
01913     PSTUNClient * GetSTUN(
01914       const PIPSocket::Address & address = 0
01915     ) const;
01916 
01919     void SetSTUNServer(
01920       const PString & server
01921     );
01922 
01926     PNatMethod * GetPreferedNatMethod(
01927         const PIPSocket::Address & address = 0 
01928         );
01929 
01932     PNatStrategy GetNatMethods();
01933 
01934 #endif // P_NONCORE
01935 
01936     virtual BOOL OnUnsolicitedInformation(const H323SignalPDU & pdu)
01937     { return FALSE; }
01938 
01941     virtual BOOL IsLocalAddress(
01942       const PIPSocket::Address & remoteAddress
01943     ) const;
01944 
01947     virtual void TranslateTCPAddress(
01948       PIPSocket::Address & /*localAddr*/,
01949       const PIPSocket::Address & /*remoteAddr */
01950     ) { }
01951     void InternalTranslateTCPAddress(
01952       PIPSocket::Address & /*localAddr*/,
01953       const PIPSocket::Address & /*remoteAddr */
01954     );
01955 
01958     virtual void TranslateTCPPort( 
01959         WORD & /*ListenPort*/,                     
01960         const PIPSocket::Address & /*remoteAddr*/  
01961     ) { };
01962 
01965     WORD GetTCPPortBase() const { return tcpPorts.base; }
01966 
01969     WORD GetTCPPortMax() const { return tcpPorts.max; }
01970 
01973     void SetTCPPorts(unsigned tcpBase, unsigned tcpMax);
01974 
01977     WORD GetNextTCPPort();
01978 
01981     WORD GetUDPPortBase() const { return udpPorts.base; }
01982 
01985     WORD GetUDPPortMax() const { return udpPorts.max; }
01986 
01989     void SetUDPPorts(unsigned udpBase, unsigned udpMax);
01990 
01993     WORD GetNextUDPPort();
01994 
01997     WORD GetRtpIpPortBase() const { return rtpIpPorts.base; }
01998 
02001     WORD GetRtpIpPortMax() const { return rtpIpPorts.max; }
02002 
02005     void SetRtpIpPorts(unsigned udpBase, unsigned udpMax);
02006 
02009     WORD GetRtpIpPortPair();
02010 
02013     BYTE GetRtpIpTypeofService() const { return rtpIpTypeofService; }
02014 
02017     void SetRtpIpTypeofService(unsigned tos) { rtpIpTypeofService = (BYTE)tos; }
02018 
02021     BYTE GetTcpIpTypeofService() const { return tcpIpTypeofService; }
02022 
02025     void SetTcpIpTypeofService(unsigned tos) { tcpIpTypeofService = (BYTE)tos; }
02026 
02029     const PTimeInterval & GetSignallingChannelConnectTimeout() const { return signallingChannelConnectTimeout; }
02030 
02033     const PTimeInterval & GetSignallingChannelCallTimeout() const { return signallingChannelCallTimeout; }
02034 
02037     const PTimeInterval & GetControlChannelStartTimeout() const { return controlChannelStartTimeout; }
02038 
02041     const PTimeInterval & GetEndSessionTimeout() const { return endSessionTimeout; }
02042 
02045     const PTimeInterval & GetMasterSlaveDeterminationTimeout() const { return masterSlaveDeterminationTimeout; }
02046 
02049     unsigned GetMasterSlaveDeterminationRetries() const { return masterSlaveDeterminationRetries; }
02050 
02053     const PTimeInterval & GetCapabilityExchangeTimeout() const { return capabilityExchangeTimeout; }
02054 
02057     const PTimeInterval & GetLogicalChannelTimeout() const { return logicalChannelTimeout; }
02058 
02061     const PTimeInterval & GetRequestModeTimeout() const { return logicalChannelTimeout; }
02062 
02065     const PTimeInterval & GetRoundTripDelayTimeout() const { return roundTripDelayTimeout; }
02066 
02069     const PTimeInterval & GetRoundTripDelayRate() const { return roundTripDelayRate; }
02070 
02073     BOOL ShouldClearCallOnRoundTripFail() const { return clearCallOnRoundTripFail; }
02074 
02077     const PTimeInterval & GetNoMediaTimeout() const;
02078 
02081     BOOL SetNoMediaTimeout(PTimeInterval newInterval);
02082 
02085     const PTimeInterval & GetGatekeeperRequestTimeout() const { return gatekeeperRequestTimeout; }
02086 
02089     unsigned GetGatekeeperRequestRetries() const { return gatekeeperRequestRetries; }
02090 
02093     const PTimeInterval & GetRasRequestTimeout() const { return rasRequestTimeout; }
02094 
02097     unsigned GetRasRequestRetries() const { return rasRequestRetries; }
02098 
02102     const PTimeInterval & GetGatekeeperTimeToLive() const { return registrationTimeToLive; }
02103 
02106     const PString & GetGkAccessTokenOID() const { return gkAccessTokenOID; }
02107 
02110     void SetGkAccessTokenOID(const PString & token) { gkAccessTokenOID = token; }
02111 
02114     BOOL GetSendGRQ() const
02115     { return sendGRQ; }
02116 
02119     void SetSendGRQ(BOOL v) 
02120     { sendGRQ = v; }
02121 
02122 #ifdef H323_H450
02123 
02126     const PTimeInterval & GetCallTransferT1() const { return callTransferT1; }
02127 
02130     const PTimeInterval & GetCallTransferT2() const { return callTransferT2; }
02131 
02134     const PTimeInterval & GetCallTransferT3() const { return callTransferT3; }
02135 
02138     const PTimeInterval & GetCallTransferT4() const { return callTransferT4; }
02139 
02141     const PTimeInterval & GetCallIntrusionT1() const { return callIntrusionT1; }
02142     const PTimeInterval & GetCallIntrusionT2() const { return callIntrusionT2; }
02143     const PTimeInterval & GetCallIntrusionT3() const { return callIntrusionT3; }
02144     const PTimeInterval & GetCallIntrusionT4() const { return callIntrusionT4; }
02145     const PTimeInterval & GetCallIntrusionT5() const { return callIntrusionT5; }
02146     const PTimeInterval & GetCallIntrusionT6() const { return callIntrusionT6; }
02147 
02150     H323CallIdentityDict& GetCallIdentityDictionary() { return secondaryConnectionsActive; }
02151 
02154     unsigned GetNextH450CallIdentityValue() const { return ++nextH450CallIdentity; }
02155 
02156 #endif // H323_H450
02157 
02160     PINDEX GetCleanerThreadStackSize() const { return cleanerThreadStackSize; }
02161 
02164     PINDEX GetListenerThreadStackSize() const { return listenerThreadStackSize; }
02165 
02168     PINDEX GetSignallingThreadStackSize() const { return signallingThreadStackSize; }
02169 
02172     PINDEX GetControlThreadStackSize() const { return controlThreadStackSize; }
02173 
02176     PINDEX GetChannelThreadStackSize() const { return logicalThreadStackSize; }
02177 
02180     PINDEX GetRasThreadStackSize() const { return rasThreadStackSize; }
02181 
02184     PINDEX GetJitterThreadStackSize() const { return jitterThreadStackSize; }
02185 
02188     PThread::Priority GetChannelThreadPriority() const { return channelThreadPriority; }
02189 
02190     H323ConnectionDict GetConnections() { return connectionsActive; };
02191 
02193 
02197     static BYTE defaultT35CountryCode;
02198     static BYTE defaultT35Extension;
02199     static WORD defaultManufacturerCode;
02200 
02201   protected:
02202     H323Gatekeeper * InternalCreateGatekeeper(H323Transport * transport);
02203     BOOL InternalRegisterGatekeeper(H323Gatekeeper * gk, BOOL discovered);
02204     H323Connection * FindConnectionWithoutLocks(const PString & token);
02205     virtual H323Connection * InternalMakeCall(
02206       const PString & existingToken,
02207       const PString & callIdentity, 
02208       unsigned capabilityLevel,     
02209       const PString & remoteParty,  
02210       H323Transport * transport,    
02211       PString & token,              
02212       void * userData               
02213     );
02214 
02215     // Configuration variables, commonly changed
02216     PStringList localAliasNames;
02217 
02218 #ifdef H323_AUDIO_CODECS
02219     H323AudioCodec::SilenceDetectionMode defaultSilenceDetection;
02220     unsigned minAudioJitterDelay;
02221     unsigned maxAudioJitterDelay;
02222 #ifdef P_AUDIO
02223     PString     soundChannelPlayDevice;
02224     PString     soundChannelPlayDriver;
02225     PString     soundChannelRecordDevice;
02226     PString     soundChannelRecordDriver;
02227     unsigned    soundChannelBuffers;
02228 #endif // P_AUDIO
02229 #endif // H323_AUDIO_CODECS
02230 
02231 #ifdef H323_VIDEO
02232     PString     videoChannelPlayDevice;
02233     PString     videoChannelRecordDevice;
02234     BOOL        autoStartReceiveVideo;
02235     BOOL        autoStartTransmitVideo;
02236 #endif // H323_VIDEO
02237 
02238 #ifdef H323_T38
02239     BOOL        autoStartReceiveFax;
02240     BOOL        autoStartTransmitFax;
02241 #endif // H323_T38
02242 
02243     BOOL        autoCallForward;
02244     BOOL        disableFastStart;
02245     BOOL        disableH245Tunneling;
02246     BOOL        disableH245inSetup;
02247     BOOL        disableDetectInBandDTMF;
02248     BOOL        canDisplayAmountString;
02249     BOOL        canEnforceDurationLimit;
02250 
02251 #ifdef H323_H450
02252     unsigned    callIntrusionProtectionLevel;
02253 #endif // H323_H450
02254 
02255     H323Connection::SendUserInputModes defaultSendUserInputMode;
02256 
02257 #ifdef P_LDAP
02258     PString     ilsServer;
02259 #endif // P_LDAP
02260 
02261     // Some more configuration variables, rarely changed.
02262     BYTE          rtpIpTypeofService;
02263     BYTE          tcpIpTypeofService;
02264     PTimeInterval signallingChannelConnectTimeout;
02265     PTimeInterval signallingChannelCallTimeout;
02266     PTimeInterval controlChannelStartTimeout;
02267     PTimeInterval endSessionTimeout;
02268     PTimeInterval masterSlaveDeterminationTimeout;
02269     unsigned      masterSlaveDeterminationRetries;
02270     PTimeInterval capabilityExchangeTimeout;
02271     PTimeInterval logicalChannelTimeout;
02272     PTimeInterval requestModeTimeout;
02273     PTimeInterval roundTripDelayTimeout;
02274     PTimeInterval roundTripDelayRate;
02275     PTimeInterval noMediaTimeout;
02276     PTimeInterval gatekeeperRequestTimeout;
02277     unsigned      gatekeeperRequestRetries;
02278     PTimeInterval rasRequestTimeout;
02279     unsigned      rasRequestRetries;
02280     PTimeInterval registrationTimeToLive;
02281     PString       gkAccessTokenOID;
02282     BOOL          sendGRQ;
02283 
02284     unsigned initialBandwidth;  // in 100s of bits/sev
02285     BOOL     clearCallOnRoundTripFail;
02286 
02287     struct PortInfo {
02288       void Set(
02289         unsigned base,
02290         unsigned max,
02291         unsigned range,
02292         unsigned dflt
02293       );
02294       WORD GetNext(
02295         unsigned increment
02296       );
02297 
02298       PMutex mutex;
02299       WORD   base;
02300       WORD   max;
02301       WORD   current;
02302     } tcpPorts, udpPorts, rtpIpPorts;
02303 
02304 #ifdef P_STUN
02305     PSTUNClient * stun;
02306     PNatStrategy natMethods;
02307 #endif
02308 
02309     BYTE t35CountryCode;
02310     BYTE t35Extension;
02311     WORD manufacturerCode;
02312 
02313     TerminalTypes terminalType;
02314 
02315 #ifdef H323_H450
02316 
02317     /* Protect against absence of a response to the ctIdentify reqest
02318        (Transferring Endpoint - Call Transfer with a secondary Call) */
02319     PTimeInterval callTransferT1;
02320     /* Protect against failure of completion of the call transfer operation
02321        involving a secondary Call (Transferred-to Endpoint) */
02322     PTimeInterval callTransferT2;
02323     /* Protect against failure of the Transferred Endpoint not responding
02324        within sufficient time to the ctInitiate APDU (Transferring Endpoint) */
02325     PTimeInterval callTransferT3;
02326     /* May optionally operate - protects against absence of a response to the
02327        ctSetup request (Transferred Endpoint) */
02328     PTimeInterval callTransferT4;
02329 
02331     PTimeInterval callIntrusionT1;
02332     PTimeInterval callIntrusionT2;
02333     PTimeInterval callIntrusionT3;
02334     PTimeInterval callIntrusionT4;
02335     PTimeInterval callIntrusionT5;
02336     PTimeInterval callIntrusionT6;
02337 
02338     H323CallIdentityDict secondaryConnectionsActive;
02339 
02340     mutable PAtomicInteger nextH450CallIdentity; 
02342 
02343 #endif // H323_H450
02344 
02345     PINDEX cleanerThreadStackSize;
02346     PINDEX listenerThreadStackSize;
02347     PINDEX signallingThreadStackSize;
02348     PINDEX controlThreadStackSize;
02349     PINDEX logicalThreadStackSize;
02350     PINDEX rasThreadStackSize;
02351     PINDEX jitterThreadStackSize;
02352 
02353 #ifdef H323_RTP_AGGREGATE
02354     PINDEX rtpAggregationSize;
02355     PHandleAggregator * rtpAggregator;
02356 #endif
02357 
02358 #ifdef H323_SIGNAL_AGGREGATE
02359     PINDEX signallingAggregationSize;
02360     PHandleAggregator * signallingAggregator;
02361 #endif
02362 
02363     PThread::Priority channelThreadPriority;
02364 
02365     // Dynamic variables
02366     H323ListenerList listeners;
02367     H323Capabilities capabilities;
02368     H323Gatekeeper * gatekeeper;
02369     PString          gatekeeperPassword;
02370 
02371     H323ConnectionDict       connectionsActive;
02372 
02373     PMutex                   connectionsMutex;
02374     PMutex                   noMediaMutex;
02375     PStringSet               connectionsToBeCleaned;
02376     H323ConnectionsCleaner * connectionsCleaner;
02377     PSyncPoint               connectionsAreCleaned;
02378 
02379 #ifndef DISABLE_CALLAUTH
02380     // Call Authentication
02381     PString EPSecurityUserName;    
02382     PString EPSecurityPassword;    
02383     BOOL isSecureCall;                     
02384     EPSecurityPolicy CallAuthPolicy;   
02385     H235AuthenticatorList EPAuthList;  
02386 #endif
02387 
02388 #ifdef H323_TRANSNEXUS_OSP
02389     OpalOSP::Provider * ospProvider;
02390 #endif
02391 
02392 #ifdef H323_H460
02393         H460_FeatureSet features;
02394 #endif
02395 
02396 };
02397 
02398 
02399 #endif // __OPAL_H323EP_H
02400 
02401 

Generated on Wed Feb 6 09:02:38 2008 for OpenH323 by  doxygen 1.5.4