h323con.h

Go to the documentation of this file.
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 2.67  2007/08/13 16:19:08  csoutheren
00031  * Ensure CreateMediaStream is only called *once* for each stream in H.323 calls
00032  *
00033  * Revision 2.66  2007/07/26 00:41:17  csoutheren
00034  * Remove functions which are identical to ancestor
00035  *
00036  * Revision 2.65  2007/05/09 14:59:19  hfriederich
00037  * Make SetRemotePartyInfo() virtual
00038  *
00039  * Revision 2.64  2007/04/26 07:01:00  csoutheren
00040  * Add extra code to deal with getting media formats from connections early enough to do proper
00041  * gatewaying between calls. The SIP and H.323 code need to have the handing of the remote
00042  * and local formats standardized, but this will do for now
00043  *
00044  * Revision 2.63  2007/04/10 05:15:53  rjongbloed
00045  * Fixed issue with use of static C string variables in DLL environment,
00046  *   must use functional interface for correct initialisation.
00047  *
00048  * Revision 2.62  2007/03/13 03:34:00  csoutheren
00049  * Fixed use of wrong ifdef
00050  *
00051  * Revision 2.61  2007/03/13 02:16:56  csoutheren
00052  * Remove warnings/errors when compiling with various turned off
00053  *
00054  * Revision 2.60  2007/03/13 00:32:16  csoutheren
00055  * Simple but messy changes to allow compile time removal of protocol
00056  * options such as H.450 and H.460
00057  * Fix MakeConnection overrides
00058  *
00059  * Revision 2.59  2007/03/01 05:51:03  rjongbloed
00060  * Fixed backward compatibility of OnIncomingConnection() virtual
00061  *   functions on various classes. If an old override returned FALSE
00062  *   then it will now abort the call as it used to.
00063  *
00064  * Revision 2.58  2007/02/19 04:42:27  csoutheren
00065  * Added OnIncomingMediaChannels so incoming calls can optionally be handled in two stages
00066  *
00067  * Revision 2.57  2007/01/24 04:00:55  csoutheren
00068  * Arrrghh. Changing OnIncomingConnection turned out to have a lot of side-effects
00069  * Added some pure viritual functions to prevent old code from breaking silently
00070  * New OpalEndpoint and OpalConnection descendants will need to re-implement
00071  * OnIncomingConnection. Sorry :)
00072  *
00073  * Revision 2.56  2007/01/18 04:45:16  csoutheren
00074  * Messy, but simple change to add additional options argument to OpalConnection constructor
00075  * This allows the provision of non-trivial arguments for connections
00076  *
00077  * Revision 2.55  2006/12/18 03:18:41  csoutheren
00078  * Messy but simple fixes
00079  *   - Add access to SIP REGISTER timeout
00080  *   - Ensure OpalConnection options are correctly progagated
00081  *
00082  * Revision 2.54  2006/11/11 12:23:17  hfriederich
00083  * Code reorganisation to improve RFC2833 handling for both SIP and H.323. Thanks Simon Zwahlen for the idea
00084  *
00085  * Revision 2.53  2006/08/22 08:55:46  csoutheren
00086  * Removed duplicate declaration of remoteIsNAT that was hiding variable of same name in the ancestor
00087  *
00088  * Revision 2.52  2006/08/12 03:55:39  csoutheren
00089  * Applied 1538066 - Make H323 StartControlNegotiations virtual
00090  * Thanks to Adam Butcher
00091  *
00092  * Revision 2.51  2006/08/03 04:57:12  csoutheren
00093  * Port additional NAT handling logic from OpenH323 and extend into OpalConnection class
00094  *
00095  * Revision 2.50  2006/06/27 13:07:37  csoutheren
00096  * Patch 1374533 - add h323 Progress handling
00097  * Thanks to Frederich Heem
00098  *
00099  * Revision 2.49  2006/06/27 12:54:35  csoutheren
00100  * Patch 1374489 - h450.7 message center support
00101  * Thanks to Frederich Heem
00102  *
00103  * Revision 2.48  2006/06/09 04:22:24  csoutheren
00104  * Implemented mapping between SIP release codes and Q.931 codes as specified
00105  *  by RFC 3398
00106  *
00107  * Revision 2.47  2006/05/30 11:33:02  hfriederich
00108  * Porting support for H.460 from OpenH323
00109  *
00110  * Revision 2.46  2006/05/30 04:58:05  csoutheren
00111  * Added suport for SIP INFO message (untested as yet)
00112  * Fixed some issues with SIP state machine on answering calls
00113  * Fixed some formatting issues
00114  *
00115  * Revision 2.45  2006/04/20 16:52:22  hfriederich
00116  * Adding support for H.224/H.281
00117  *
00118  * Revision 2.44  2006/01/02 15:52:38  dsandras
00119  * Added what was required to merge changes from OpenH323 Altas_devel_2 in gkclient.cxx, gkserver.cxx and channels.cxx.
00120  *
00121  * Revision 2.43  2005/12/09 05:41:10  csoutheren
00122  * Added ability to set explicit Q.931 cause code on call end
00123  *
00124  * Revision 2.42  2005/11/30 13:35:26  csoutheren
00125  * Changed tags for Doxygen
00126  *
00127  * Revision 2.41  2005/11/24 04:46:41  dereksmithies
00128  * Remove detectInBandDTMF, as it is already declared in the OpalConnection
00129  * class. Thanks to valgrind on suse 10 for finding this one.
00130  *
00131  * Revision 2.40  2005/10/04 13:01:51  rjongbloed
00132  * Moved addition of a media stream to list in OpalConnection to OnOpenMediaStream
00133  *   so is consistent across protocols.
00134  *
00135  * Revision 2.39  2005/09/29 20:20:36  dsandras
00136  * Added call to OnOpenMediaStream so that the stream can be added to the mediaStreams.
00137  *
00138  * Revision 2.38  2005/09/04 06:23:38  rjongbloed
00139  * Added OpalMediaCommand mechanism (via PNotifier) for media streams
00140  *   and media transcoders to send commands back to remote.
00141  *
00142  * Revision 2.37  2005/08/05 19:21:04  csoutheren
00143  * Ensure H323Connection calls OnAlerting even if no ALERT is received
00144  *
00145  * Revision 2.36  2005/07/11 01:52:15  csoutheren
00146  * Extended AnsweringCall to work for SIP as well as H.323
00147  * Fixed problems with external RTP connection in H.323
00148  * Added call to OnClosedMediaStream
00149  *
00150  * Revision 2.35  2005/04/10 20:35:20  dsandras
00151  * Added support for blind transfert.
00152  *
00153  * Revision 2.34  2005/04/10 20:33:53  dsandras
00154  * Added support to hold and retrieve a connection. Basically a rename of the old
00155  * functions while keeping backward compatibility.
00156  *
00157  * Revision 2.33  2005/04/10 20:31:17  dsandras
00158  * Added support to return the "best guess" callback h323 url.
00159  *
00160  * Revision 2.32  2005/03/01 17:51:02  dsandras
00161  * Removed erroneous definition of RTP_SessionManager preventing the get the RTP_Session from the connection when called on an OpalConnection object. The RTP_SessionManager is now part of OpalConnection.
00162  *
00163  * Revision 2.31  2005/01/16 11:28:04  csoutheren
00164  * Added GetIdentifier virtual function to OpalConnection, and changed H323
00165  * and SIP descendants to use this function. This allows an application to
00166  * obtain a GUID for any connection regardless of the protocol used
00167  *
00168  * Revision 2.30  2004/12/12 12:29:02  dsandras
00169  * Moved GetRemoteApplication () to OpalConnection so that it is usable for all types of connection.
00170  *
00171  * Revision 2.29  2004/08/14 07:56:28  rjongbloed
00172  * Major revision to utilise the PSafeCollection classes for the connections and calls.
00173  *
00174  * Revision 2.28  2004/06/04 06:54:17  csoutheren
00175  * Migrated updates from OpenH323 1.14.1
00176  *
00177  * Revision 2.27  2004/05/09 13:12:37  rjongbloed
00178  * Fixed issues with non fast start and non-tunnelled connections
00179  *
00180  * Revision 2.26  2004/05/01 10:00:41  rjongbloed
00181  * Fixed ClearCallSynchronous so now is actually signalled when call is destroyed.
00182  *
00183  * Revision 2.25  2004/04/26 04:33:03  rjongbloed
00184  * Move various call progress times from H.323 specific to general conenction.
00185  *
00186  * Revision 2.24  2004/03/13 06:25:49  rjongbloed
00187  * Slight rearrangement of local party name and alias list to beter match common
00188  *   behaviour in ancestor.
00189  * Abstracted local party name for endpoint into ancestor from H.,323.
00190  *
00191  * Revision 2.23  2004/02/24 11:28:45  rjongbloed
00192  * Normalised RTP session management across protocols
00193  *
00194  * Revision 2.22  2004/02/19 10:46:43  rjongbloed
00195  * Merged OpenH323 version 1.13.1 changes.
00196  *
00197  * Revision 2.21  2003/03/17 10:26:59  robertj
00198  * Added video support.
00199  *
00200  * Revision 2.20  2003/03/06 03:57:46  robertj
00201  * IVR support (work in progress) requiring large changes everywhere.
00202  *
00203  * Revision 2.19  2003/01/07 04:39:52  robertj
00204  * Updated to OpenH323 v1.11.2
00205  *
00206  * Revision 2.18  2002/11/10 22:59:20  robertj
00207  * Fixed override of SetCallEndReason to have same parameters as base virtual.
00208  *
00209  * Revision 2.17  2002/11/10 11:33:16  robertj
00210  * Updated to OpenH323 v1.10.3
00211  *
00212  * Revision 2.16  2002/09/16 02:52:33  robertj
00213  * Added #define so can select if #pragma interface/implementation is used on
00214  *   platform basis (eg MacOS) rather than compiler, thanks Robert Monaghan.
00215  *
00216  * Revision 2.15  2002/09/04 06:01:46  robertj
00217  * Updated to OpenH323 v1.9.6
00218  *
00219  * Revision 2.14  2002/07/01 04:56:29  robertj
00220  * Updated to OpenH323 v1.9.1
00221  *
00222  * Revision 2.13  2002/04/09 00:17:08  robertj
00223  * Changed "callAnswered" to better description of "originating".
00224  *
00225  * Revision 2.12  2002/02/19 07:43:40  robertj
00226  * Restructured media bypass functions to fix problems with RFC2833.
00227  *
00228  * Revision 2.11  2002/02/11 09:32:11  robertj
00229  * Updated to openH323 v1.8.0
00230  *
00231  * Revision 2.10  2002/02/11 07:37:43  robertj
00232  * Added media bypass for streams between compatible protocols.
00233  *
00234  * Revision 2.9  2002/01/22 04:59:04  robertj
00235  * Update from OpenH323, RFC2833 support
00236  *
00237  * Revision 2.8  2002/01/14 06:35:56  robertj
00238  * Updated to OpenH323 v1.7.9
00239  *
00240  * Revision 2.7  2001/11/02 10:45:19  robertj
00241  * Updated to OpenH323 v1.7.3
00242  *
00243  * Revision 2.6  2001/10/15 04:31:14  robertj
00244  * Removed answerCall signal and replaced with state based functions.
00245  * Maintained H.323 answerCall API for backward compatibility.
00246  *
00247  * Revision 2.5  2001/10/05 00:22:13  robertj
00248  * Updated to PWLib 1.2.0 and OpenH323 1.7.0
00249  *
00250  * Revision 2.4  2001/10/03 05:56:15  robertj
00251  * Changes abndwidth management API.
00252  *
00253  * Revision 2.3  2001/08/22 09:42:14  robertj
00254  * Removed duplicate member variables moved to ancestor.
00255  *
00256  * Revision 2.2  2001/08/17 08:21:15  robertj
00257  * Update from OpenH323
00258  * Moved call end reasons enum from OpalConnection to global.
00259  *
00260  * Revision 2.1  2001/08/01 05:11:04  robertj
00261  * Moved media formats list from endpoint to connection.
00262  *
00263  * Revision 2.0  2001/07/27 15:48:24  robertj
00264  * Conversion of OpenH323 to Open Phone Abstraction Library (OPAL)
00265  *
00266  * Revision 1.64  2003/12/28 02:38:14  csoutheren
00267  * Added H323EndPoint::OnOutgoingCall
00268  *
00269  * Revision 1.63  2003/12/14 10:42:29  rjongbloed
00270  * Changes for compilability without video support.
00271  *
00272  * Revision 1.62  2003/10/27 06:03:38  csoutheren
00273  * Added support for QoS
00274  *   Thanks to Henry Harrison of AliceStreet
00275  *
00276  * Revision 1.61  2003/10/09 09:47:45  csoutheren
00277  * Fixed problem with re-opening RTP half-channels under unusual
00278  * circumstances. Thanks to Damien Sandras
00279  *
00280  * Revision 1.60  2003/04/30 00:28:50  robertj
00281  * Redesigned the alternate credentials in ARQ system as old implementation
00282  *   was fraught with concurrency issues, most importantly it can cause false
00283  *   detection of replay attacks taking out an endpoint completely.
00284  *
00285  * Revision 1.59  2003/02/12 23:59:22  robertj
00286  * Fixed adding missing endpoint identifer in SETUP packet when gatekeeper
00287  * routed, pointed out by Stefan Klein
00288  * Also fixed correct rutrn of gk routing in IRR packet.
00289  *
00290  * Revision 1.58  2002/11/27 06:54:52  robertj
00291  * Added Service Control Session management as per Annex K/H.323 via RAS
00292  *   only at this stage.
00293  * Added H.248 ASN and very primitive infrastructure for linking into the
00294  *   Service Control Session management system.
00295  * Added basic infrastructure for Annex K/H.323 HTTP transport system.
00296  * Added Call Credit Service Control to display account balances.
00297  *
00298  * Revision 1.57  2002/11/15 05:17:22  robertj
00299  * Added facility redirect support without changing the call token for access
00300  *   to the call. If it gets redirected a new H323Connection object is
00301  *   created but it looks like the same thing to an application.
00302  *
00303  * Revision 1.56  2002/11/13 04:37:23  robertj
00304  * Added ability to get (and set) Q.931 release complete cause codes.
00305  *
00306  * Revision 1.55  2002/11/10 06:17:26  robertj
00307  * Fixed minor documentation errors.
00308  *
00309  * Revision 1.54  2002/11/05 00:24:09  robertj
00310  * Added function to determine if Q.931 CONNECT sent/received.
00311  *
00312  * Revision 1.53  2002/10/31 00:31:47  robertj
00313  * Enhanced jitter buffer system so operates dynamically between minimum and
00314  *   maximum values. Altered API to assure app writers note the change!
00315  *
00316  * Revision 1.52  2002/09/16 01:14:15  robertj
00317  * Added #define so can select if #pragma interface/implementation is used on
00318  *   platform basis (eg MacOS) rather than compiler, thanks Robert Monaghan.
00319  *
00320  * Revision 1.51  2002/09/03 06:19:36  robertj
00321  * Normalised the multi-include header prevention ifdef/define symbol.
00322  *
00323  * Revision 1.50  2002/08/05 10:03:47  robertj
00324  * Cosmetic changes to normalise the usage of pragma interface/implementation.
00325  *
00326  * Revision 1.49  2002/08/05 05:17:37  robertj
00327  * Fairly major modifications to support different authentication credentials
00328  *   in ARQ to the logged in ones on RRQ. For both client and server.
00329  * Various other H.235 authentication bugs and anomalies fixed on the way.
00330  *
00331  * Revision 1.48  2002/07/05 02:22:56  robertj
00332  * Added support for standard and non-standard T.38 mode change.
00333  *
00334  * Revision 1.47  2002/07/04 00:40:31  robertj
00335  * More H.450.11 call intrusion implementation, thanks Aleksandar Todorovic
00336  *
00337  * Revision 1.46  2002/06/22 06:11:30  robertj
00338  * Fixed bug on sometimes missing received endSession causing 10 second
00339  *   timeout in connection clean up.
00340  *
00341  * Revision 1.45  2002/06/22 05:48:38  robertj
00342  * Added partial implementation for H.450.11 Call Intrusion
00343  *
00344  * Revision 1.44  2002/06/13 06:15:19  robertj
00345  * Allowed TransferCall() to be used on H323Connection as well as H323EndPoint.
00346  *
00347  * Revision 1.43  2002/06/05 08:58:58  robertj
00348  * Fixed documentation of remote application name string.
00349  * Added missing virtual keywards on some protocol handler functions.
00350  *
00351  * Revision 1.42  2002/05/29 06:40:29  robertj
00352  * Changed sending of endSession/ReleaseComplete PDU's to occur immediately
00353  *   on call clearance and not wait for background thread to do it.
00354  * Stricter compliance by waiting for reply endSession before closing down.
00355  *
00356  * Revision 1.41  2002/05/29 03:55:17  robertj
00357  * Added protocol version number checking infrastructure, primarily to improve
00358  *   interoperability with stacks that are unforgiving of new features.
00359  *
00360  * Revision 1.40  2002/05/21 09:32:49  robertj
00361  * Added ability to set multiple alias names ona  connection by connection
00362  *   basis, defaults to endpoint list, thanks Artis Kugevics
00363  *
00364  * Revision 1.39  2002/05/15 23:59:33  robertj
00365  * Added memory management of created T.38 and T.120 handlers.
00366  * Improved documentation for use of T.38 and T.120 functions.
00367  * Added ability to initiate a mode change for non-standard T.38
00368  *
00369  * Revision 1.38  2002/05/07 01:31:51  dereks
00370  * Fix typo in documentation.
00371  *
00372  * Revision 1.37  2002/05/03 05:38:15  robertj
00373  * Added Q.931 Keypad IE mechanism for user indications (DTMF).
00374  *
00375  * Revision 1.36  2002/05/02 07:56:24  robertj
00376  * Added automatic clearing of call if no media (RTP data) is transferred in a
00377  *   configurable (default 5 minutes) amount of time.
00378  *
00379  * Revision 1.35  2002/04/25 20:55:25  dereks
00380  * Fix documentation. Thanks Olaf Schulz.
00381  *
00382  * Revision 1.34  2002/04/17 00:50:34  robertj
00383  * Added ability to disable the in band DTMF detection.
00384  *
00385  * Revision 1.33  2002/03/27 06:04:42  robertj
00386  * Added Temporary Failure end code for connection, an application may
00387  *   immediately retry the call if this occurs.
00388  *
00389  * Revision 1.32  2002/02/11 04:20:48  robertj
00390  * Fixed documentation errors, thanks Horacio J. Peņa
00391  *
00392  * Revision 1.31  2002/02/11 04:16:37  robertj
00393  * Fixed bug where could send DRQ if never received an ACF.
00394  *
00395  * Revision 1.30  2002/02/06 06:30:47  craigs
00396  * Fixed problem whereby MSD/TCS was stalled if H245 was included in
00397  * SETUP, but other end did not respond
00398  *
00399  * Revision 1.29  2002/02/04 07:17:52  robertj
00400  * Added H.450.2 Consultation Transfer, thanks Norwood Systems.
00401  *
00402  * Revision 1.28  2002/01/25 05:20:05  robertj
00403  * Moved static strings for enum printing to inside of function, could crash with DLL's
00404  *
00405  * Revision 1.27  2002/01/24 06:29:02  robertj
00406  * Added option to disable H.245 negotiation in SETUP pdu, this required
00407  *   API change so have a bit mask instead of a series of booleans.
00408  *
00409  * Revision 1.26  2002/01/23 12:45:37  rogerh
00410  * Add the DTMF decoder. This identifies DTMF tones in an audio stream.
00411  *
00412  * Revision 1.25  2002/01/23 07:12:48  robertj
00413  * Added hooks for in band DTMF detection. Now need the detector!
00414  *
00415  * Revision 1.24  2002/01/22 22:48:21  robertj
00416  * Fixed RFC2833 support (transmitter) requiring large rewrite
00417  *
00418  * Revision 1.23  2002/01/18 06:02:08  robertj
00419  * Added some H323v4 functions (fastConnectRefused & TCS in SETUP)
00420  *
00421  * Revision 1.22  2002/01/17 07:04:58  robertj
00422  * Added support for RFC2833 embedded DTMF in the RTP stream.
00423  *
00424  * Revision 1.21  2002/01/14 00:05:24  robertj
00425  * Added H.450.6, better H.450.2 error handling and  and Music On Hold.
00426  * Added destExtraCallInfo field for ARQ.
00427  *   Thanks Ben Madsen of Norwood Systems
00428  *
00429  * Revision 1.20  2002/01/10 05:13:50  robertj
00430  * Added support for external RTP stacks, thanks NuMind Software Systems.
00431  *
00432  * Revision 1.19  2002/01/09 00:21:36  robertj
00433  * Changes to support outgoing H.245 RequstModeChange.
00434  *
00435  * Revision 1.18  2001/12/22 03:20:31  robertj
00436  * Added create protocol function to H323Connection.
00437  *
00438  * Revision 1.17  2001/12/22 03:09:36  robertj
00439  * Changed OnRequstModeChange to return ack, then actually do the change.
00440  *
00441  * Revision 1.16  2001/12/22 01:52:54  robertj
00442  * Added more support for H.245 RequestMode operation.
00443  *
00444  * Revision 1.15  2001/12/15 08:09:54  robertj
00445  * Added alerting, connect and end of call times to be sent to RAS server.
00446  *
00447  * Revision 1.14  2001/12/13 10:54:23  robertj
00448  * Added ability to automatically add ACF access token to SETUP pdu.
00449  *
00450  * Revision 1.13  2001/11/01 06:11:54  robertj
00451  * Plugged very small mutex hole that could cause crashes.
00452  *
00453  * Revision 1.12  2001/11/01 00:27:33  robertj
00454  * Added default Fast Start disabled and H.245 tunneling disable flags
00455  *   to the endpoint instance.
00456  *
00457  * Revision 1.11  2001/10/24 00:54:13  robertj
00458  * Made cosmetic changes to H.245 miscellaneous command function.
00459  *
00460  * Revision 1.10  2001/10/23 02:18:06  dereks
00461  * Initial release of CU30 video codec.
00462  *
00463  * Revision 1.9  2001/09/26 06:20:56  robertj
00464  * Fixed properly nesting connection locking and unlocking requiring a quite
00465  *   large change to teh implementation of how calls are answered.
00466  *
00467  * Revision 1.8  2001/09/19 03:30:53  robertj
00468  * Added some support for overlapped dialing, thanks Chris Purvis & Nick Hoath.
00469  *
00470  * Revision 1.7  2001/09/13 06:48:13  robertj
00471  * Added call back functions for remaining Q.931/H.225 messages.
00472  * Added call back to allow modification of Release Complete,thanks Nick Hoath
00473  *
00474  * Revision 1.6  2001/09/12 06:57:58  robertj
00475  * Added support for iNow Access Token from gk, thanks Nick Hoath
00476  *
00477  * Revision 1.5  2001/09/12 06:04:36  robertj
00478  * Added support for sending UUIE's to gk on request, thanks Nick Hoath
00479  *
00480  * Revision 1.4  2001/09/11 01:24:36  robertj
00481  * Added conditional compilation to remove video and/or audio codecs.
00482  *
00483  * Revision 1.3  2001/08/22 06:54:50  robertj
00484  * Changed connection locking to use double mutex to guarantee that
00485  *   no threads can ever deadlock or access deleted connection.
00486  *
00487  * Revision 1.2  2001/08/16 07:49:16  robertj
00488  * Changed the H.450 support to be more extensible. Protocol handlers
00489  *   are now in separate classes instead of all in H323Connection.
00490  *
00491  * Revision 1.1  2001/08/06 03:08:11  robertj
00492  * Fission of h323.h to h323ep.h & h323con.h, h323.h now just includes files.
00493  */
00494 
00495 #ifndef __OPAL_H323CON_H
00496 #define __OPAL_H323CON_H
00497 
00498 #ifdef P_USE_PRAGMA
00499 #pragma interface
00500 #endif
00501 
00502 
00503 #include <opal/connection.h>
00504 #include <opal/guid.h>
00505 #include <opal/buildopts.h>
00506 #include <h323/h323caps.h>
00507 #include <ptclib/dtmf.h>
00508 
00509 
00510 /* The following classes have forward references to avoid including the VERY
00511    large header files for H225 and H245. If an application requires access
00512    to the protocol classes they can include them, but for simple usage their
00513    inclusion can be avoided.
00514  */
00515 class PPER_Stream;
00516 class PASN_OctetString;
00517 
00518 class H225_EndpointType;
00519 class H225_TransportAddress;
00520 class H225_ArrayOf_PASN_OctetString;
00521 class H225_ProtocolIdentifier;
00522 class H225_AdmissionRequest;
00523 class H225_FeatureSet;
00524 
00525 class H245_TerminalCapabilitySet;
00526 class H245_TerminalCapabilitySetReject;
00527 class H245_OpenLogicalChannel;
00528 class H245_OpenLogicalChannelAck;
00529 class H245_TransportAddress;
00530 class H245_UserInputIndication;
00531 class H245_RequestMode;
00532 class H245_RequestModeAck;
00533 class H245_RequestModeReject;
00534 class H245_ModeDescription;
00535 class H245_ArrayOf_ModeDescription;
00536 class H245_SendTerminalCapabilitySet;
00537 class H245_MultiplexCapability;
00538 class H245_FlowControlCommand;
00539 class H245_MiscellaneousCommand;
00540 class H245_MiscellaneousIndication;
00541 class H245_JitterIndication;
00542 
00543 class H323SignalPDU;
00544 class H323ControlPDU;
00545 class H323EndPoint;
00546 class H323TransportAddress;
00547 
00548 class H235Authenticators;
00549 
00550 class H245NegMasterSlaveDetermination;
00551 class H245NegTerminalCapabilitySet;
00552 class H245NegLogicalChannels;
00553 class H245NegRequestMode;
00554 class H245NegRoundTripDelay;
00555 
00556 class H450xDispatcher;
00557 class H4502Handler;
00558 class H4504Handler;
00559 class H4506Handler;
00560 class H4507Handler;
00561 class H45011Handler;
00562 
00563 class OpalCall;
00564 
00565 #ifdef H323_H460
00566 class H460_FeatureSet;
00567 #endif
00568 
00569 
00571 
00578 class H323Connection : public OpalConnection
00579 {
00580   PCLASSINFO(H323Connection, OpalConnection);
00581 
00582   public:
00587     H323Connection(
00588       OpalCall & call,                         
00589       H323EndPoint & endpoint,                 
00590       const PString & token,                   
00591       const PString & alias,                   
00592       const H323TransportAddress & address,    
00593       unsigned options = 0,                    
00594       OpalConnection::StringOptions * stringOptions = NULL 
00595     );
00596 
00599     ~H323Connection();
00601 
00610     virtual BOOL SetUpConnection();
00611 
00621     virtual BOOL SetAlerting(
00622       const PString & calleeName,   
00623       BOOL withMedia                
00624     );
00625 
00630     virtual BOOL SetConnected();
00631 
00638     virtual void OnSendARQ(
00639       H225_AdmissionRequest & arq
00640     );
00641 
00642     
00647     virtual BOOL SetProgressed();
00648     
00652     virtual void OnEstablished();
00653 
00671     virtual void OnReleased();
00672 
00677     virtual PString GetDestinationAddress();
00678 
00686     virtual OpalMediaFormatList GetMediaFormats() const;
00687 
00690     virtual BOOL OpenSourceMediaStream(
00691       const OpalMediaFormatList & mediaFormats, 
00692       unsigned sessionID                   
00693     );
00694     
00709     virtual OpalMediaStream * CreateMediaStream(
00710       const OpalMediaFormat & mediaFormat, 
00711       unsigned sessionID,                  
00712       BOOL isSource                        
00713     );
00714 
00717     void OnPatchMediaStream(BOOL isSource, OpalMediaPatch & patch);
00718 
00723     virtual BOOL IsMediaBypassPossible(
00724       unsigned sessionID                  
00725     ) const;
00726 
00731     virtual BOOL GetMediaInformation(
00732       unsigned sessionID,     
00733       MediaInformation & info 
00734     ) const;
00736 
00742     virtual void OnCleared();
00743 
00749     BOOL IsEstablished() const { return connectionState == EstablishedConnection; }
00750 
00759     virtual void CleanUpOnCallEnd();
00761 
00762 
00767     void AttachSignalChannel(
00768       const PString & token,    
00769       H323Transport * channel,  
00770       BOOL answeringCall        
00771     );
00772 
00775     BOOL WriteSignalPDU(
00776       H323SignalPDU & pdu       
00777     );
00778 
00782     virtual void HandleSignallingChannel();
00783 
00787     virtual BOOL HandleSignalPDU(
00788       H323SignalPDU & pdu       
00789     );
00790 
00794     virtual void HandleTunnelPDU(
00795       H323SignalPDU * txPDU       
00796     );
00797 
00805     virtual BOOL OnReceivedSignalSetup(
00806       const H323SignalPDU & pdu   
00807     );
00808 
00815     virtual BOOL OnReceivedSignalSetupAck(
00816       const H323SignalPDU & pdu   
00817     );
00818 
00825     virtual BOOL OnReceivedSignalInformation(
00826       const H323SignalPDU & pdu   
00827     );
00828 
00837     virtual BOOL OnReceivedCallProceeding(
00838       const H323SignalPDU & pdu   
00839     );
00840 
00849     virtual BOOL OnReceivedProgress(
00850       const H323SignalPDU & pdu   
00851     );
00852 
00859     virtual BOOL OnReceivedAlerting(
00860       const H323SignalPDU & pdu   
00861     );
00862 
00871     virtual BOOL OnReceivedSignalConnect(
00872       const H323SignalPDU & pdu   
00873     );
00874 
00883     virtual BOOL OnReceivedFacility(
00884       const H323SignalPDU & pdu   
00885     );
00886 
00893     virtual BOOL OnReceivedSignalNotify(
00894       const H323SignalPDU & pdu   
00895     );
00896 
00903     virtual BOOL OnReceivedSignalStatus(
00904       const H323SignalPDU & pdu   
00905     );
00906 
00913     virtual BOOL OnReceivedStatusEnquiry(
00914       const H323SignalPDU & pdu   
00915     );
00916 
00921     virtual void OnReceivedReleaseComplete(
00922       const H323SignalPDU & pdu   
00923     );
00924 
00931     virtual BOOL OnUnknownSignalPDU(
00932       const H323SignalPDU & pdu  
00933     );
00934 
00946     virtual BOOL OnIncomingCall(
00947       const H323SignalPDU & setupPDU,   
00948       H323SignalPDU & alertingPDU       
00949     );
00950 
00960     virtual BOOL ForwardCall(
00961       const PString & forwardParty   
00962     );
00963 
00964 #if OPAL_H450
00965 
00970     void TransferCall(
00971       const PString & remoteParty,   
00972       const PString & callIdentity = PString::Empty()
00974     );
00975 
00980     void ConsultationTransfer(
00981       const PString & primaryCallToken  
00982     );
00983 
00990     virtual void HandleConsultationTransfer(
00991       const PString & callIdentity, 
00993       H323Connection & incoming     
00994     );
00995 
00998     BOOL IsTransferringCall() const;
00999 
01002     BOOL IsTransferredCall() const;
01003 
01008     virtual void HandleTransferCall(
01009       const PString & token,
01010       const PString & identity
01011     );
01012 
01017     int GetCallTransferInvokeId();
01018 
01026     virtual void HandleCallTransferFailure(
01027       const int returnError    
01028     );
01029 
01034     void SetAssociatedCallToken(
01035       const PString & token  
01036     );
01037 
01042     virtual void OnConsultationTransferSuccess(
01043       H323Connection & secondaryCall  
01044     );
01045 
01049     virtual void TransferConnection(
01050       const PString & remoteParty,
01051       const PString & callIdentity = PString::Empty()
01052     );
01053 
01057     virtual void HoldConnection();
01058 
01063     virtual void RetrieveConnection();
01064 
01068     virtual BOOL IsConnectionOnHold();
01069 
01074     void HoldCall(
01075       BOOL localHold   
01076     );
01077 
01083     void RetrieveCall();
01084 
01091     void SetHoldMedia(
01092       PChannel * audioChannel
01093     );
01094 
01097     BOOL IsMediaOnHold() const;
01098 
01101     BOOL IsLocalHold() const;
01102 
01105     BOOL IsRemoteHold() const;
01106 
01109     BOOL IsCallOnHold() const;
01110 
01115     virtual void IntrudeCall(
01116       unsigned capabilityLevel
01117     );
01118 
01123     virtual void HandleIntrudeCall(
01124       const PString & token,
01125       const PString & identity
01126     );
01127 
01133     void SetCallIntrusion() { isCallIntrusion = TRUE; }
01134 
01135     BOOL IsCallIntrusion() { return isCallIntrusion; }
01136 
01139     unsigned GetLocalCallIntrusionProtectionLevel() { return callIntrusionProtectionLevel; }
01140 
01144     virtual BOOL GetRemoteCallIntrusionProtectionLevel(
01145       const PString & callToken,
01146       unsigned callIntrusionProtectionLevel
01147     );
01148 
01149     virtual void SetIntrusionImpending();
01150 
01151     virtual void SetForcedReleaseAccepted();
01152 
01153     virtual void SetIntrusionNotAuthorized();
01154 
01161     void SendCallWaitingIndication(
01162       const unsigned nbOfAddWaitingCalls = 0   
01163     );
01164 
01165 #endif
01166 
01193     virtual AnswerCallResponse OnAnswerCall(
01194       const PString & callerName,       
01195       const H323SignalPDU & setupPDU,   
01196       H323SignalPDU & connectPDU,       
01197       H323SignalPDU & progressPDU       
01198     );
01199     
01200     virtual AnswerCallResponse OnAnswerCall(
01201       const PString & callerName        
01202     );
01203 
01214     void AnsweringCall(
01215       AnswerCallResponse response 
01216     );
01217 
01228     virtual CallEndReason SendSignalSetup(
01229       const PString & alias,                
01230       const H323TransportAddress & address  
01231     );
01232 
01244     virtual BOOL OnSendSignalSetup(
01245       H323SignalPDU & setupPDU   
01246     );
01247 
01256     virtual BOOL OnSendCallProceeding(
01257       H323SignalPDU & callProceedingPDU   
01258     );
01259 
01271     virtual BOOL OnSendReleaseComplete(
01272       H323SignalPDU & releaseCompletePDU 
01273     );
01274 
01285     virtual BOOL OnAlerting(
01286       const H323SignalPDU & alertingPDU,  
01287       const PString & user                
01288     );
01289 
01304     virtual BOOL OnInsufficientDigits();
01305 
01318     virtual void SendMoreDigits(
01319       const PString & digits    
01320     );
01321 
01331     virtual BOOL OnOutgoingCall(
01332       const H323SignalPDU & connectPDU   
01333     );
01334 
01346     virtual BOOL SendFastStartAcknowledge(
01347       H225_ArrayOf_PASN_OctetString & array   
01348     );
01349 
01361     virtual BOOL HandleFastStartAcknowledge(
01362       const H225_ArrayOf_PASN_OctetString & array   
01363     );
01365 
01379     virtual BOOL CreateOutgoingControlChannel(
01380       const H225_TransportAddress & h245Address   
01381     );
01382 
01395     virtual BOOL CreateIncomingControlChannel(
01396       H225_TransportAddress & h245Address  
01397     );
01398 
01403     virtual BOOL WriteControlPDU(
01404       const H323ControlPDU & pdu
01405     );
01406 
01409     virtual BOOL StartControlNegotiations();
01410 
01413     virtual void HandleControlChannel();
01414 
01421     virtual BOOL HandleControlData(
01422       PPER_Stream & strm
01423     );
01424 
01431     virtual BOOL HandleControlPDU(
01432       const H323ControlPDU & pdu
01433     );
01434 
01444     virtual BOOL OnUnknownControlPDU(
01445       const H323ControlPDU & pdu  
01446     );
01447 
01451     virtual BOOL OnH245Request(
01452       const H323ControlPDU & pdu  
01453     );
01454 
01458     virtual BOOL OnH245Response(
01459       const H323ControlPDU & pdu  
01460     );
01461 
01465     virtual BOOL OnH245Command(
01466       const H323ControlPDU & pdu  
01467     );
01468 
01472     virtual BOOL OnH245Indication(
01473       const H323ControlPDU & pdu  
01474     );
01475 
01478     virtual BOOL OnH245_SendTerminalCapabilitySet(
01479       const H245_SendTerminalCapabilitySet & pdu  
01480     );
01481 
01486     virtual BOOL OnH245_FlowControlCommand(
01487       const H245_FlowControlCommand & pdu  
01488     );
01489 
01494     virtual BOOL OnH245_MiscellaneousCommand(
01495       const H245_MiscellaneousCommand & pdu  
01496     );
01497 
01502     virtual BOOL OnH245_MiscellaneousIndication(
01503       const H245_MiscellaneousIndication & pdu  
01504     );
01505 
01510     virtual BOOL OnH245_JitterIndication(
01511       const H245_JitterIndication & pdu  
01512     );
01513 
01516     enum ControlProtocolErrors {
01517       e_MasterSlaveDetermination,
01518       e_CapabilityExchange,
01519       e_LogicalChannel,
01520       e_ModeRequest,
01521       e_RoundTripDelay
01522     };
01523 
01535     virtual BOOL OnControlProtocolError(
01536       ControlProtocolErrors errorSource,  
01537       const void * errorData = NULL       
01538     );
01539 
01547     virtual void OnSendCapabilitySet(
01548       H245_TerminalCapabilitySet & pdu  
01549     );
01550 
01562     virtual BOOL OnReceivedCapabilitySet(
01563       const H323Capabilities & remoteCaps,      
01564       const H245_MultiplexCapability * muxCap,  
01565       H245_TerminalCapabilitySetReject & reject 
01566     );
01567 
01570     virtual void SendCapabilitySet(
01571       BOOL empty  
01572     );
01573 
01582     virtual void OnSetLocalCapabilities();
01583 
01586     BOOL IsH245Master() const;
01587 
01590     void StartRoundTripDelay();
01591 
01594     PTimeInterval GetRoundTripDelay() const;
01596 
01636     virtual void OnSelectLogicalChannels();
01637 
01640     virtual void SelectDefaultLogicalChannel(
01641       unsigned sessionID    
01642     );
01643 
01647     virtual void SelectFastStartChannels(
01648       unsigned sessionID,   
01649       BOOL transmitter,     
01650       BOOL receiver         
01651     );
01652 
01656     virtual void StartFastStartChannel(
01657       unsigned sessionID,               
01658       H323Channel::Directions direction 
01659     );
01660 
01675     virtual BOOL OpenLogicalChannel(
01676       const H323Capability & capability,  
01677       unsigned sessionID,                 
01678       H323Channel::Directions dir         
01679     );
01680 
01690     virtual BOOL OnOpenLogicalChannel(
01691       const H245_OpenLogicalChannel & openPDU,  
01692       H245_OpenLogicalChannelAck & ackPDU,      
01693       unsigned & errorCode                      
01694     );
01695 
01703     virtual BOOL OnConflictingLogicalChannel(
01704       H323Channel & channel    
01705     );
01706 
01711     virtual H323Channel * CreateLogicalChannel(
01712       const H245_OpenLogicalChannel & open, 
01713       BOOL startingFast,                    
01714       unsigned & errorCode                  
01715     );
01716 
01751     virtual H323Channel * CreateRealTimeLogicalChannel(
01752       const H323Capability & capability, 
01753       H323Channel::Directions dir,       
01754       unsigned sessionID,                
01755       const H245_H2250LogicalChannelParameters * param,
01757       RTP_QOS * rtpqos = NULL            
01758     );
01759 
01770     virtual BOOL OnCreateLogicalChannel(
01771       const H323Capability & capability,  
01772       H323Channel::Directions dir,        
01773       unsigned & errorCode                
01774     );
01775 
01780     virtual BOOL OnStartLogicalChannel(
01781       H323Channel & channel    
01782     );
01783 
01786     virtual void CloseLogicalChannel(
01787       unsigned number,    
01788       BOOL fromRemote     
01789     );
01790 
01793     virtual void CloseLogicalChannelNumber(
01794       const H323ChannelNumber & number    
01795     );
01796 
01799     virtual void CloseAllLogicalChannels(
01800       BOOL fromRemote     
01801     );
01802 
01808     virtual void OnClosedLogicalChannel(
01809       const H323Channel & channel   
01810     );
01811 
01820     virtual BOOL OnClosingLogicalChannel(
01821       H323Channel & channel   
01822     );
01823 
01832     virtual void OnLogicalChannelFlowControl(
01833       H323Channel * channel,   
01834       long bitRateRestriction  
01835     );
01836 
01845     virtual void OnLogicalChannelJitter(
01846       H323Channel * channel,   
01847       DWORD jitter,            
01848       int skippedFrameCount,   
01849       int additionalBuffer     
01850     );
01851 
01855     H323Channel * GetLogicalChannel(
01856       unsigned number,    
01857       BOOL fromRemote     
01858     ) const;
01859 
01865     H323Channel * FindChannel(
01866       unsigned sessionId,   
01867       BOOL fromRemote       
01868     ) const;
01870 
01877     virtual BOOL SetBandwidthAvailable(
01878       unsigned newBandwidth,    
01879       BOOL force = FALSE        
01880     );
01881 
01886     virtual unsigned GetBandwidthUsed() const;
01888 
01896     virtual SendUserInputModes GetRealSendUserInputMode() const;
01897 
01911     virtual BOOL SendUserInputString(
01912       const PString & value                   
01913     );
01914 
01939     virtual BOOL SendUserInputTone(
01940       char tone,             
01941       unsigned duration = 0  
01942     );
01943 
01950     virtual BOOL SendUserInputIndicationQ931(
01951       const PString & value                   
01952     );
01953 
01960     virtual BOOL SendUserInputIndicationString(
01961       const PString & value                   
01962     );
01963 
01968     virtual BOOL SendUserInputIndicationTone(
01969       char tone,                   
01970       unsigned duration = 0,       
01971       unsigned logicalChannel = 0, 
01972       unsigned rtpTimestamp = 0    
01973     );
01974 
01983     virtual BOOL SendUserInputIndication(
01984       const H245_UserInputIndication & pdu    
01985     );
01986 
01991     virtual void OnUserInputIndication(
01992       const H245_UserInputIndication & pdu  
01993     );
01995 
02001     virtual H323_RTP_Session * GetSessionCallbacks(
02002       unsigned sessionID
02003     ) const;
02004 
02014     virtual RTP_Session * UseSession(
02015       const OpalTransport & transport,
02016       unsigned sessionID,
02017       RTP_QOS * rtpqos = NULL
02018     );
02019 
02023     virtual void ReleaseSession(
02024       unsigned sessionID
02025     );
02026 
02034     virtual void OnRTPStatistics(
02035       const RTP_Session & session   
02036     ) const;
02037 
02041     virtual PString GetSessionCodecNames(
02042       unsigned sessionID
02043     ) const;
02044 
02046 
02064     virtual BOOL RequestModeChange(
02065       const PString & newModes  
02066     );
02067 
02075     virtual BOOL RequestModeChange(
02076       const H245_ArrayOf_ModeDescription & newModes  
02077     );
02078 
02081     virtual BOOL OnRequestModeChange(
02082       const H245_RequestMode & pdu,     
02083       H245_RequestModeAck & ack,        
02084       H245_RequestModeReject & reject,  
02085       PINDEX & selectedMode           
02086     );
02087 
02094     virtual void OnModeChanged(
02095       const H245_ModeDescription & newMode
02096     );
02097 
02102     virtual void OnAcceptModeChange(
02103       const H245_RequestModeAck & pdu  
02104     );
02105 
02110     virtual void OnRefusedModeChange(
02111       const H245_RequestModeReject * pdu  
02112     );
02114 
02119     virtual BOOL RequestModeChangeT38(
02120       const char * capabilityNames = "T.38\nT38FaxUDP"
02121     );
02122 
02132     virtual BOOL GetAdmissionRequestAuthentication(
02133       const H225_AdmissionRequest & arq,  
02134       H235Authenticators & authenticators 
02135     );
02137 
02142     H323EndPoint & GetEndPoint() const { return endpoint; }
02143 
02146     BOOL HadAnsweredCall() const { return !originating; }
02147 
02150     BOOL IsGatekeeperRouted() const { return gatekeeperRouted; }
02151 
02156     unsigned GetDistinctiveRing() const { return distinctiveRing; }
02157 
02164     void SetDistinctiveRing(unsigned pattern) { distinctiveRing = pattern&7; }
02165 
02169     const PString & GetCallToken() const { return GetToken(); }
02170 
02173     unsigned GetCallReference() const { return callReference; }
02174 
02178     inline const OpalGloballyUniqueID & GetCallIdentifier() const 
02179     { return GetIdentifier(); }
02180 
02183     const OpalGloballyUniqueID & GetConferenceIdentifier() const { return conferenceIdentifier; }
02184 
02187     void SetLocalPartyName(const PString & name);
02188 
02191     const PStringList & GetLocalAliasNames() const { return localAliasNames; }
02192 
02195     virtual void SetRemotePartyInfo(
02196       const H323SignalPDU & pdu 
02197     );
02198 
02201     void SetRemoteApplication(
02202       const H225_EndpointType & pdu 
02203     );
02204     
02209     const PString GetRemotePartyCallbackURL() const;
02210     
02213     const H323Capabilities & GetLocalCapabilities() const { return localCapabilities; }
02214 
02217     const H323Capabilities & GetRemoteCapabilities() const { return remoteCapabilities; }
02218 
02221     unsigned GetRemoteMaxAudioDelayJitter() const { return remoteMaxAudioDelayJitter; }
02222 
02225     const H323Transport * GetSignallingChannel() const { return signallingChannel; }
02226 
02229     unsigned GetSignallingVersion() const { return h225version; }
02230 
02233     const H323Transport & GetControlChannel() const;
02234 
02237     OpalTransport & GetTransport() const;
02238 
02241     unsigned GetControlVersion() const { return h245version; }
02242 
02245     unsigned GetUUIEsRequested() const { return uuiesRequested; }
02246 
02249     void SetUUIEsRequested(unsigned mask) { uuiesRequested = mask; }
02250 
02253     const PString GetGkAccessTokenOID() const { return gkAccessTokenOID; }
02254 
02257     void SetGkAccessTokenOID(const PString & oid) { gkAccessTokenOID = oid; }
02258 
02261     const PBYTEArray & GetGkAccessTokenData() const { return gkAccessTokenData; }
02262 
02265     void SetDestExtraCallInfo(
02266       const PString & info
02267     ) { destExtraCallInfo = info; }
02268 
02271     void SetRemotCallWaiting(const unsigned value) { remoteCallWaiting = value; }
02272 
02278     const int GetRemoteCallWaiting() const { return remoteCallWaiting; }
02279 
02284     void SetEnforcedDurationLimit(
02285       unsigned seconds  
02286     );
02288         
02289     virtual BOOL OnSendFeatureSet(unsigned, H225_FeatureSet &) const;
02290         
02291         virtual void OnReceiveFeatureSet(unsigned, const H225_FeatureSet &) const;
02292 
02293 #if H323_H460
02294 
02296     virtual H460_FeatureSet * GetFeatureSet();
02297 #endif
02298 
02299     
02304 #if OPAL_H450
02305     H4507Handler&  getH4507handler(){return *h4507handler;}
02306 #endif
02307 
02308     virtual BOOL OnOpenIncomingMediaChannels();
02309 
02310   protected:
02316     virtual void InternalEstablishedConnectionCheck();
02317     BOOL InternalEndSessionCheck(PPER_Stream & strm);
02318     void SetRemoteVersions(const H225_ProtocolIdentifier & id);
02319     void MonitorCallStatus();
02320     PDECLARE_NOTIFIER(PThread, H323Connection, StartOutgoing);
02321     PDECLARE_NOTIFIER(PThread, H323Connection, NewOutgoingControlChannel);
02322     PDECLARE_NOTIFIER(PThread, H323Connection, NewIncomingControlChannel);
02323 
02324     H323EndPoint & endpoint;
02325 
02326     int                  remoteCallWaiting; // Number of call's waiting at the remote endpoint
02327     BOOL                 gatekeeperRouted;
02328     unsigned             distinctiveRing;
02329     unsigned             callReference;
02330     OpalGloballyUniqueID conferenceIdentifier;
02331 
02332     PString            localDestinationAddress;
02333     PStringList        localAliasNames;
02334     H323Capabilities   localCapabilities; // Capabilities local system supports
02335     PString            destExtraCallInfo;
02336     H323Capabilities   remoteCapabilities; // Capabilities remote system supports
02337     unsigned           remoteMaxAudioDelayJitter;
02338     PTimer             roundTripDelayTimer;
02339     WORD               maxAudioDelayJitter;
02340     unsigned           uuiesRequested;
02341     PString            gkAccessTokenOID;
02342     PBYTEArray         gkAccessTokenData;
02343     BOOL               addAccessTokenToSetup;
02344     BOOL               alertDone;
02345 
02346     H323Transport * signallingChannel;
02347     H323Transport * controlChannel;
02348     OpalListener  * controlListener;
02349     BOOL            h245Tunneling;
02350     H323SignalPDU * h245TunnelRxPDU;
02351     H323SignalPDU * h245TunnelTxPDU;
02352     H323SignalPDU * setupPDU;
02353     H323SignalPDU * alertingPDU;
02354     H323SignalPDU * connectPDU;
02355     H323SignalPDU * progressPDU;
02356 
02357     enum ConnectionStates {
02358       NoConnectionActive,
02359       AwaitingGatekeeperAdmission,
02360       AwaitingTransportConnect,
02361       AwaitingSignalConnect,
02362       AwaitingLocalAnswer,
02363       HasExecutedSignalConnect,
02364       EstablishedConnection,
02365       ShuttingDownConnection,
02366       NumConnectionStates
02367     } connectionState;
02368 
02369     unsigned   h225version;
02370     unsigned   h245version;
02371     BOOL       h245versionSet;
02372     BOOL doH245inSETUP;
02373     BOOL lastPDUWasH245inSETUP;
02374 
02375     BOOL mustSendDRQ;
02376     BOOL mediaWaitForConnect;
02377     BOOL transmitterSidePaused;
02378     BOOL earlyStart;
02379 #if OPAL_T120
02380     BOOL startT120;
02381 #endif
02382 #if OPAL_H224
02383     BOOL startH224;
02384 #endif
02385     PString    t38ModeChangeCapabilities;
02386     PSyncPoint digitsWaitFlag;
02387     BOOL       endSessionNeeded;
02388     PSyncPoint endSessionReceived;
02389     PTimer     enforcedDurationLimit;
02390 
02391     // Used as part of a local call hold operation involving MOH
02392     PChannel * holdMediaChannel;
02393     BOOL       isConsultationTransfer;
02394 
02396     BOOL     isCallIntrusion;
02397     unsigned callIntrusionProtectionLevel;
02398 
02399     enum FastStartStates {
02400       FastStartDisabled,
02401       FastStartInitiate,
02402       FastStartResponse,
02403       FastStartAcknowledged,
02404       NumFastStartStates
02405     };
02406     FastStartStates        fastStartState;
02407     H323LogicalChannelList fastStartChannels;
02408     OpalMediaStream      * transmitterMediaStream;
02409 
02410 #if PTRACING
02411     static const char * GetConnectionStatesName(ConnectionStates s);
02412     friend ostream & operator<<(ostream & o, ConnectionStates s) { return o << GetConnectionStatesName(s); }
02413     static const char * GetFastStartStateName(FastStartStates s);
02414     friend ostream & operator<<(ostream & o, FastStartStates s) { return o << GetFastStartStateName(s); }
02415 #endif
02416 
02417 
02418     // The following pointers are to protocol procedures, they are pointers to
02419     // hide their complexity from the H323Connection classes users.
02420     H245NegMasterSlaveDetermination  * masterSlaveDeterminationProcedure;
02421     H245NegTerminalCapabilitySet     * capabilityExchangeProcedure;
02422     H245NegLogicalChannels           * logicalChannels;
02423     H245NegRequestMode               * requestModeProcedure;
02424     H245NegRoundTripDelay            * roundTripDelayProcedure;
02425 
02426 #if OPAL_H450
02427     H450xDispatcher                  * h450dispatcher;
02428     H4502Handler                     * h4502handler;
02429     H4504Handler                     * h4504handler;
02430     H4506Handler                     * h4506handler;
02431     H4507Handler                     * h4507handler;
02432     H45011Handler                    * h45011handler;
02433 #endif
02434 
02435 #ifdef H323_H460
02436         H460_FeatureSet & features;
02437 #endif
02438 
02439     virtual OpalMediaStream * InternalCreateMediaStream(const OpalMediaFormat & mediaFormat, unsigned sessionID, BOOL isSource);
02440 
02441   private:
02442     PChannel * SwapHoldMediaChannels(PChannel * newChannel);
02443 };
02444 
02445 
02446 PDICTIONARY(H323CallIdentityDict, PString, H323Connection);
02447 
02448 
02449 #endif // __OPAL_H323CON_H
02450 
02451 

Generated on Fri Mar 7 06:33:31 2008 for OPAL by  doxygen 1.5.1