00001 /* 00002 * h323.h 00003 * 00004 * H.323 protocol handler 00005 * 00006 * Open H323 Library 00007 * 00008 * Copyright (c) 1998-2000 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: h323.h,v $ 00030 * Revision 2.9 2006/08/01 12:46:32 rjongbloed 00031 * Added build solution for plug ins 00032 * Removed now redundent code due to plug ins addition 00033 * 00034 * Revision 2.8 2006/07/24 14:03:38 csoutheren 00035 * Merged in audio and video plugins from CVS branch PluginBranch 00036 * 00037 * Revision 2.7.4.1 2006/03/16 07:06:00 csoutheren 00038 * Initial support for audio plugins 00039 * 00040 * Revision 2.7 2004/03/11 06:54:26 csoutheren 00041 * Added ability to disable SIP or H.323 stacks 00042 * 00043 * Revision 2.6 2004/02/19 10:46:43 rjongbloed 00044 * Merged OpenH323 version 1.13.1 changes. 00045 * 00046 * Revision 2.5 2002/11/10 11:33:16 robertj 00047 * Updated to OpenH323 v1.10.3 00048 * 00049 * Revision 2.4 2002/07/01 04:56:29 robertj 00050 * Updated to OpenH323 v1.9.1 00051 * 00052 * Revision 2.3 2001/11/02 10:45:19 robertj 00053 * Updated to OpenH323 v1.7.3 00054 * 00055 * Revision 2.2 2001/10/05 00:22:13 robertj 00056 * Updated to PWLib 1.2.0 and OpenH323 1.7.0 00057 * 00058 * Revision 2.1 2001/08/13 05:10:39 robertj 00059 * Updates from OpenH323 v1.6.0 release. 00060 * 00061 * Revision 1.132 2003/06/06 02:19:03 rjongbloed 00062 * Added iLBC codec 00063 * 00064 * Revision 1.131 2003/05/14 03:29:56 rjongbloed 00065 * Added H.263 codec and autoconf options header file. 00066 * 00067 * Revision 1.130 2002/11/05 02:18:03 robertj 00068 * Changed default for speex codec to be included. 00069 * 00070 * Revision 1.129 2002/11/04 02:57:24 dereks 00071 * Put test around include of speexcodec.h SPEEX is now an optional codec. 00072 * 00073 * Revision 1.128 2002/10/24 05:34:03 robertj 00074 * Added speex codec 00075 * 00076 * Revision 1.127 2002/10/01 03:07:12 robertj 00077 * Added version number functions for OpenH323 library itself, plus included 00078 * library version in the default vendor information. 00079 * 00080 * Revision 1.126 2002/06/27 03:08:57 robertj 00081 * Added code to include G.729 & G.726 codecs on static linking. 00082 * 00083 * Revision 1.125 2001/10/23 02:18:06 dereks 00084 * Initial release of CU30 video codec. 00085 * 00086 * Revision 1.124 2001/09/11 01:24:36 robertj 00087 * Added conditional compilation to remove video and/or audio codecs. 00088 * 00089 * Revision 1.123 2001/08/06 03:08:11 robertj 00090 * Fission of h323.h to h323ep.h & h323con.h, h323.h now just includes files. 00091 * 00092 * Revision 1.122 2001/08/01 00:46:16 craigs 00093 * Added ability to early start without Alerting 00094 * 00095 * Revision 1.121 2001/07/17 04:44:29 robertj 00096 * Partial implementation of T.120 and T.38 logical channels. 00097 * 00098 * Revision 1.120 2001/07/06 02:29:12 robertj 00099 * Moved initialisation of local capabilities back to constructor for 00100 * backward compatibility reasons. 00101 * 00102 * Revision 1.119 2001/07/05 04:18:23 robertj 00103 * Added call back for setting local capabilities. 00104 * 00105 * Revision 1.118 2001/06/19 03:55:28 robertj 00106 * Added transport to CreateConnection() function so can use that as part of 00107 * the connection creation decision making process. 00108 * 00109 * Revision 1.117 2001/06/14 23:18:04 robertj 00110 * Change to allow for CreateConnection() to return NULL to abort call. 00111 * 00112 * Revision 1.116 2001/06/14 04:24:16 robertj 00113 * Changed incoming call to pass setup pdu to endpoint so it can create 00114 * different connection subclasses depending on the pdu eg its alias 00115 * 00116 * Revision 1.115 2001/06/13 06:38:23 robertj 00117 * Added early start (media before connect) functionality. 00118 * 00119 * Revision 1.114 2001/05/31 01:28:47 robertj 00120 * Added functions to determine if call currently being held. 00121 * 00122 * Revision 1.113 2001/05/30 23:34:54 robertj 00123 * Added functions to send TCS=0 for transmitter side pause. 00124 * 00125 * Revision 1.112 2001/05/17 07:11:29 robertj 00126 * Added more call end types for common transport failure modes. 00127 * 00128 * Revision 1.111 2001/05/17 03:31:07 robertj 00129 * Fixed support for transmiter side paused (TCS=0), thanks Paul van de Wijngaard 00130 * 00131 * Revision 1.110 2001/05/14 05:56:25 robertj 00132 * Added H323 capability registration system so can add capabilities by 00133 * string name instead of having to instantiate explicit classes. 00134 * 00135 * Revision 1.109 2001/05/09 04:59:02 robertj 00136 * Bug fixes in H.450.2, thanks Klein Stefan. 00137 * 00138 * Revision 1.108 2001/05/09 04:07:53 robertj 00139 * Added more call end codes for busy and congested. 00140 * 00141 * Revision 1.107 2001/05/01 04:34:10 robertj 00142 * Changed call transfer API slightly to be consistent with new hold function. 00143 * 00144 * Revision 1.106 2001/05/01 02:12:48 robertj 00145 * Added H.450.4 call hold (Near End only), thanks David M. Cassel. 00146 * 00147 * Revision 1.105 2001/04/23 01:31:13 robertj 00148 * Improved the locking of connections especially at shutdown. 00149 * 00150 * Revision 1.104 2001/04/11 03:01:27 robertj 00151 * Added H.450.2 (call transfer), thanks a LOT to Graeme Reid & Norwood Systems 00152 * 00153 * Revision 1.103 2001/03/21 04:52:40 robertj 00154 * Added H.235 security to gatekeepers, thanks Fürbass Franz! 00155 * 00156 * Revision 1.102 2001/03/16 06:46:19 robertj 00157 * Added ability to set endpoints desired time to live on a gatekeeper. 00158 * 00159 * Revision 1.101 2001/03/15 00:24:01 robertj 00160 * Added function for setting gatekeeper with address and identifier values. 00161 * 00162 * Revision 1.100 2001/03/08 07:45:04 robertj 00163 * Fixed issues with getting media channels started in some early start 00164 * regimes, in particular better Cisco compatibility. 00165 * 00166 * Revision 1.99 2001/03/02 06:59:57 robertj 00167 * Enhanced the globally unique identifier class. 00168 * 00169 * Revision 1.98 2001/02/16 04:11:46 robertj 00170 * Added ability for RemoveListener() to remove all listeners. 00171 * 00172 * Revision 1.97 2001/02/09 05:16:24 robertj 00173 * Added #pragma interface for GNU C++. 00174 * 00175 * Revision 1.96 2000/12/19 22:33:44 dereks 00176 * Adjust so that the video channel is used for reading/writing raw video 00177 * data, which better modularizes the video codec. 00178 * 00179 * Revision 1.95 2000/12/18 08:58:30 craigs 00180 * Added ability set ports 00181 * 00182 * Revision 1.94 2000/12/18 01:22:28 robertj 00183 * Changed semantics or HasConnection() so returns TRUE until the connection 00184 * has been deleted and not just until ClearCall() was executure on it. 00185 * 00186 * Revision 1.93 2000/12/05 01:52:00 craigs 00187 * Made ClearCall functions virtual to allow overiding 00188 * 00189 * Revision 1.92 2000/11/27 02:44:06 craigs 00190 * Added ClearCall Synchronous to H323Connection and H323Endpoint to 00191 * avoid race conditions with destroying descendant classes 00192 * 00193 * Revision 1.91 2000/11/26 23:13:23 craigs 00194 * Added ability to pass user data to H323Connection constructor 00195 * 00196 * Revision 1.90 2000/11/12 23:49:16 craigs 00197 * Added per connection versions of OnEstablished and OnCleared 00198 * 00199 * Revision 1.89 2000/11/08 04:30:00 robertj 00200 * Added function to be able to alter/remove the call proceeding PDU. 00201 * 00202 * Revision 1.88 2000/10/20 06:10:20 robertj 00203 * Fixed very small race condition on creating new connectionon incoming call. 00204 * 00205 * Revision 1.87 2000/10/19 04:06:54 robertj 00206 * Added function to be able to remove a listener. 00207 * 00208 * Revision 1.86 2000/10/16 09:51:16 robertj 00209 * Fixed problem with not opening fast start video receive if do not have transmit enabled. 00210 * 00211 * Revision 1.85 2000/10/13 02:15:23 robertj 00212 * Added support for Progress Indicator Q.931/H.225 message. 00213 * 00214 * Revision 1.84 2000/10/04 12:20:50 robertj 00215 * Changed setting of callToken in H323Connection to be as early as possible. 00216 * 00217 * Revision 1.83 2000/09/25 12:59:16 robertj 00218 * Added StartListener() function that takes a H323TransportAddress to start 00219 * listeners bound to specific interfaces. 00220 * 00221 * Revision 1.82 2000/09/22 01:35:02 robertj 00222 * Added support for handling LID's that only do symmetric codecs. 00223 * 00224 * Revision 1.81 2000/09/20 01:50:22 craigs 00225 * Added ability to set jitter buffer on a per-connection basis 00226 * 00227 * Revision 1.80 2000/09/05 01:16:19 robertj 00228 * Added "security" call end reason code. 00229 * 00230 * Revision 1.79 2000/09/01 02:12:54 robertj 00231 * Added ability to select a gatekeeper on LAN via it's identifier name. 00232 * 00233 * Revision 1.78 2000/07/31 14:08:09 robertj 00234 * Added fast start and H.245 tunneling flags to the H323Connection constructor so can 00235 * disabled these features in easier manner to overriding virtuals. 00236 * 00237 * Revision 1.77 2000/07/13 12:33:38 robertj 00238 * Split autoStartVideo so can select receive and transmit independently 00239 * 00240 * Revision 1.76 2000/07/04 04:14:06 robertj 00241 * Fixed capability check of "combinations" for fast start cases. 00242 * 00243 * Revision 1.75 2000/07/04 01:16:49 robertj 00244 * Added check for capability allowed in "combinations" set, still needs more done yet. 00245 * 00246 * Revision 1.74 2000/06/29 10:59:53 robertj 00247 * Added user interface for sound buffer depth adjustment. 00248 * 00249 * Revision 1.73 2000/06/23 02:48:23 robertj 00250 * Added ability to adjust sound channel buffer depth, needed increasing under Win32. 00251 * 00252 * Revision 1.72 2000/06/21 08:07:38 robertj 00253 * Added cause/reason to release complete PDU, where relevent. 00254 * 00255 * Revision 1.71 2000/06/10 02:03:36 robertj 00256 * Fixed typo in comment 00257 * 00258 * Revision 1.70 2000/06/07 05:47:55 robertj 00259 * Added call forwarding. 00260 * 00261 * Revision 1.69 2000/06/05 06:33:08 robertj 00262 * Fixed problem with roud trip time statistic not being calculated if constant traffic. 00263 * 00264 * Revision 1.68 2000/05/23 12:57:28 robertj 00265 * Added ability to change IP Type Of Service code from applications. 00266 * 00267 * Revision 1.67 2000/05/23 11:32:26 robertj 00268 * Rewrite of capability table to combine 2 structures into one and move functionality into that class 00269 * allowing some normalisation of usage across several applications. 00270 * Changed H323Connection so gets a copy of capabilities instead of using endponts, allows adjustments 00271 * to be done depending on the remote client application. 00272 * 00273 * Revision 1.66 2000/05/18 11:53:33 robertj 00274 * Changes to support doc++ documentation generation. 00275 * 00276 * Revision 1.65 2000/05/16 08:12:37 robertj 00277 * Added documentation for FindChannel() function. 00278 * Added function to get a logical channel by channel number. 00279 * 00280 * Revision 1.64 2000/05/16 02:06:00 craigs 00281 * Added access functions for particular sessions 00282 * 00283 * Revision 1.63 2000/05/09 12:19:22 robertj 00284 * Added ability to get and set "distinctive ring" Q.931 functionality. 00285 * 00286 * Revision 1.62 2000/05/08 14:07:26 robertj 00287 * Improved the provision and detection of calling and caller numbers, aliases and hostnames. 00288 * 00289 * Revision 1.61 2000/05/02 04:32:24 robertj 00290 * Fixed copyright notice comment. 00291 * 00292 * Revision 1.60 2000/05/01 13:00:09 robertj 00293 * Changed SetCapability() to append capabilities to TCS, helps with assuring no gaps in set. 00294 * 00295 * Revision 1.59 2000/04/14 21:08:53 robertj 00296 * Work around for compatibility problem wth broken Altigen AltaServ-IG PBX. 00297 * 00298 * Revision 1.58 2000/04/14 20:01:38 robertj 00299 * Added function to get remote endpoints application name. 00300 * 00301 * Revision 1.57 2000/04/11 04:02:47 robertj 00302 * Improved call initiation with gatekeeper, no longer require @address as 00303 * will default to gk alias if no @ and registered with gk. 00304 * Added new call end reasons for gatekeeper denied calls. 00305 * 00306 * Revision 1.56 2000/04/10 20:02:49 robertj 00307 * Added support for more sophisticated DTMF and hook flash user indication. 00308 * 00309 * Revision 1.55 2000/04/06 17:50:15 robertj 00310 * Added auto-start (including fast start) of video channels, selectable via boolean on the endpoint. 00311 * 00312 * Revision 1.54 2000/04/05 03:17:30 robertj 00313 * Added more RTP statistics gathering and H.245 round trip delay calculation. 00314 * 00315 * Revision 1.53 2000/03/29 04:32:55 robertj 00316 * Improved some trace logging messages. 00317 * 00318 * Revision 1.52 2000/03/29 02:12:38 robertj 00319 * Changed TerminationReason to CallEndReason to use correct telephony nomenclature. 00320 * Added CallEndReason for capability exchange failure. 00321 * 00322 * Revision 1.51 2000/03/25 02:03:18 robertj 00323 * Added default transport for gatekeeper to be UDP. 00324 * 00325 * Revision 1.50 2000/03/23 02:44:49 robertj 00326 * Changed ClearAllCalls() so will wait for calls to be closed (usefull in endpoint dtors). 00327 * 00328 * Revision 1.49 2000/03/02 02:18:13 robertj 00329 * Further fixes for early H245 establishment confusing the fast start code. 00330 * 00331 * Revision 1.48 2000/01/07 08:19:14 robertj 00332 * Added status functions for connection and tidied up the answer call function 00333 * 00334 * Revision 1.47 2000/01/04 00:14:26 craigs 00335 * Added additional states to AnswerCall callback 00336 * 00337 * Revision 1.46 1999/12/23 23:02:34 robertj 00338 * File reorganision for separating RTP from H.323 and creation of LID for VPB support. 00339 * 00340 * Revision 1.45 1999/12/11 02:20:53 robertj 00341 * Added ability to have multiple aliases on local endpoint. 00342 * 00343 * Revision 1.44 1999/11/22 10:07:23 robertj 00344 * Fixed some errors in correct termination states. 00345 * 00346 * Revision 1.43 1999/11/19 08:15:41 craigs 00347 * Added connectionStartTime 00348 * 00349 * Revision 1.42 1999/11/17 00:01:11 robertj 00350 * Improved determination of caller name, thanks Ian MacDonald 00351 * 00352 * Revision 1.41 1999/11/10 23:29:37 robertj 00353 * Changed OnAnswerCall() call back function to allow for asyncronous response. 00354 * 00355 * Revision 1.40 1999/11/06 05:37:44 robertj 00356 * Complete rewrite of termination of connection to avoid numerous race conditions. 00357 * 00358 * Revision 1.39 1999/10/30 12:34:13 robertj 00359 * Added information callback for closed logical channel on H323EndPoint. 00360 * 00361 * Revision 1.38 1999/10/29 02:26:13 robertj 00362 * Added reason for termination code to H323Connection. 00363 * 00364 * Revision 1.37 1999/10/19 00:03:20 robertj 00365 * Changed OpenAudioChannel and OpenVideoChannel to allow a codec AttachChannel with no autodelete. 00366 * Added function to set initial bandwidth limit on a new connection. 00367 * 00368 * Revision 1.36 1999/10/14 12:05:03 robertj 00369 * Fixed deadlock possibilities in clearing calls. 00370 * 00371 * Revision 1.35 1999/10/09 01:19:07 craigs 00372 * Added codecs to OpenAudioChannel and OpenVideoDevice functions 00373 * 00374 * Revision 1.34 1999/09/23 07:25:12 robertj 00375 * Added open audio and video function to connection and started multi-frame codec send functionality. 00376 * 00377 * Revision 1.33 1999/09/21 14:24:34 robertj 00378 * Changed SetCapability() so automatically calls AddCapability(). 00379 * 00380 * Revision 1.32 1999/09/21 14:05:21 robertj 00381 * Fixed incorrect PTRACING test and removed uneeded include of videoio.h 00382 * 00383 * Revision 1.31 1999/09/21 08:29:13 craigs 00384 * Added support for video codecs and H261 00385 * 00386 * Revision 1.30 1999/09/15 01:26:27 robertj 00387 * Changed capability set call backs to have more specific class as parameter. 00388 * 00389 * Revision 1.29 1999/09/14 06:52:54 robertj 00390 * Added better support for multi-homed client hosts. 00391 * 00392 * Revision 1.28 1999/09/13 14:23:11 robertj 00393 * Changed MakeCall() function return value to be something useful. 00394 * 00395 * Revision 1.27 1999/09/10 03:36:47 robertj 00396 * Added simple Q.931 Status response to Q.931 Status Enquiry 00397 * 00398 * Revision 1.26 1999/09/08 04:05:48 robertj 00399 * Added support for video capabilities & codec, still needs the actual codec itself! 00400 * 00401 * Revision 1.25 1999/08/31 12:34:18 robertj 00402 * Added gatekeeper support. 00403 * 00404 * Revision 1.24 1999/08/27 09:46:05 robertj 00405 * Added sepearte function to initialise vendor information from endpoint. 00406 * 00407 * Revision 1.23 1999/08/25 05:14:49 robertj 00408 * File fission (critical mass reached). 00409 * Improved way in which remote capabilities are created, removed case statement! 00410 * Changed MakeCall, so immediately spawns thread, no black on TCP connect. 00411 * 00412 * Revision 1.22 1999/08/08 10:02:49 robertj 00413 * Added access functions to remote capability table. 00414 * 00415 * Revision 1.21 1999/07/23 02:37:53 robertj 00416 * Fixed problems with hang ups and crash closes of connections. 00417 * 00418 * Revision 1.20 1999/07/18 14:29:31 robertj 00419 * Fixed bugs in slow start with H245 tunnelling, part 3. 00420 * 00421 * Revision 1.19 1999/07/16 14:05:10 robertj 00422 * Added application level jitter buffer adjustment. 00423 * 00424 * Revision 1.18 1999/07/16 06:15:59 robertj 00425 * Corrected semantics for tunnelled master/slave determination in fast start. 00426 * 00427 * Revision 1.17 1999/07/15 14:45:35 robertj 00428 * Added propagation of codec open error to shut down logical channel. 00429 * Fixed control channel start up bug introduced with tunnelling. 00430 * 00431 * Revision 1.16 1999/07/14 06:06:13 robertj 00432 * Fixed termination problems (race conditions) with deleting connection object. 00433 * 00434 * Revision 1.15 1999/07/13 02:50:58 craigs 00435 * Changed semantics of SetPlayDevice/SetRecordDevice, only descendent 00436 * endpoint assumes PSoundChannel devices for audio codec. 00437 * 00438 * Revision 1.14 1999/07/10 02:59:26 robertj 00439 * Fixed ability to hang up incoming connection. 00440 * 00441 * Revision 1.13 1999/07/09 06:09:49 robertj 00442 * Major implementation. An ENORMOUS amount of stuff added everywhere. 00443 * 00444 * Revision 1.12 1999/06/25 10:25:35 robertj 00445 * Added maintentance of callIdentifier variable in H.225 channel. 00446 * 00447 * Revision 1.11 1999/06/22 13:45:05 robertj 00448 * Added user question on listener version to accept incoming calls. 00449 * 00450 * Revision 1.10 1999/06/14 05:15:56 robertj 00451 * Changes for using RTP sessions correctly in H323 Logical Channel context 00452 * 00453 * Revision 1.9 1999/06/13 12:41:14 robertj 00454 * Implement logical channel transmitter. 00455 * Fixed H245 connect on receiving call. 00456 * 00457 * Revision 1.8 1999/06/09 06:18:00 robertj 00458 * GCC compatibiltiy. 00459 * 00460 * Revision 1.7 1999/06/09 05:26:19 robertj 00461 * Major restructuring of classes. 00462 * 00463 * Revision 1.6 1999/06/06 06:06:36 robertj 00464 * Changes for new ASN compiler and v2 protocol ASN files. 00465 * 00466 * Revision 1.5 1999/04/26 06:14:46 craigs 00467 * Initial implementation for RTP decoding and lots of stuff 00468 * As a whole, these changes are called "First Noise" 00469 * 00470 * Revision 1.4 1999/02/23 11:04:28 robertj 00471 * Added capability to make outgoing call. 00472 * 00473 * Revision 1.3 1999/01/16 01:31:34 robertj 00474 * Major implementation. 00475 * 00476 * Revision 1.2 1999/01/02 04:00:59 robertj 00477 * Added higher level protocol negotiations. 00478 * 00479 * Revision 1.1 1998/12/14 09:13:12 robertj 00480 * Initial revision 00481 * 00482 */ 00483 00484 #include <h323/h323ep.h> 00485 #include <h323/h323con.h> 00486 #include <h323/gkclient.h> 00487 #include <opal/buildopts.h> 00488 00489 PString OpalGetVersion(); 00490 unsigned OpalGetMajorVersion(); 00491 unsigned OpalGetMinorVersion(); 00492 unsigned OpalGetBuildNumber(); 00493 00494