00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075
00076
00077
00078
00079
00080
00081
00082
00083
00084
00085
00086
00087
00088
00089
00090
00091
00092
00093
00094
00095
00096
00097
00098
00099
00100
00101
00102
00103
00104
00105
00106
00107
00108
00109
00110
00111
00112
00113
00114
00115
00116
00117
00118
00119
00120
00121
00122
00123
00124
00125
00126
00127
00128
00129
00130
00131
00132
00133
00134
00135
00136
00137
00138
00139
00140
00141
00142
00143
00144
00145
00146
00147
00148
00149
00150
00151
00152
00153
00154
00155
00156
00157
00158
00159
00160
00161
00162
00163
00164
00165
00166
00167
00168
00169
00170
00171
00172
00173
00174
00175
00176
00177
00178
00179
00180
00181
00182
00183
00184
00185
00186
00187
00188
00189
00190
00191
00192
00193
00194
00195
00196
00197
00198
00199
00200
00201
00202
00203
00204
00205
00206
00207
00208
00209
00210
00211
00212
00213
00214
00215
00216
00217
00218
00219
00220
00221
00222
00223
00224
00225
00226
00227
00228
00229
00230
00231
00232
00233
00234
00235
00236
00237
00238
00239
00240
00241
00242
00243
00244
00245
00246
00247
00248
00249
00250
00251
00252
00253
00254
00255
00256
00257
00258
00259
00260
00261
00262
00263
00264
00265
00266
00267
00268
00269
00270
00271
00272
00273
00274
00275
00276
00277
00278
00279
00280
00281
00282
00283
00284
00285
00286
00287
00288
00289 #ifndef __OPAL_H323EP_H
00290 #define __OPAL_H323EP_H
00291
00292 #include "h323.h"
00293 #include "h323con.h"
00294 #include "h235auth.h"
00295
00296 #ifdef H323_TRANSNEXUS_OSP
00297 #include "opalosp.h"
00298 #endif
00299
00300
00301
00302
00303
00304
00305 class H225_EndpointType;
00306 class H225_VendorIdentifier;
00307 class H225_H221NonStandard;
00308 class H225_ServiceControlDescriptor;
00309
00310 class H323SignalPDU;
00311 class H323ConnectionsCleaner;
00312 class H323ServiceControlSession;
00313
00314 #ifdef H323_T120
00315 class OpalT120Protocol;
00316 #endif
00317
00318 #ifdef H323_T38
00319 class OpalT38Protocol;
00320 #endif
00321
00322 #ifdef P_STUN
00323 class PSTUNClient;
00324 #endif
00325
00326 #ifdef P_USE_PRAGMA
00327 #pragma interface
00328 #endif
00329
00330
00332
00345 class H323EndPoint : public PObject
00346 {
00347 PCLASSINFO(H323EndPoint, PObject);
00348
00349 public:
00350 enum {
00351 DefaultTcpPort = 1720
00352 };
00353
00358 H323EndPoint();
00359
00362 ~H323EndPoint();
00363
00366 virtual void SetEndpointTypeInfo(
00367 H225_EndpointType & info
00368 ) const;
00369
00372 virtual void SetVendorIdentifierInfo(
00373 H225_VendorIdentifier & info
00374 ) const;
00375
00378 virtual void SetH221NonStandardInfo(
00379 H225_H221NonStandard & info
00380 ) const;
00382
00383
00394 void AddCapability(
00395 H323Capability * capability
00396 );
00397
00418 PINDEX SetCapability(
00419 PINDEX descriptorNum,
00420 PINDEX simultaneous,
00421 H323Capability * cap
00422 );
00423
00428 PINDEX AddAllCapabilities(
00429 PINDEX descriptorNum,
00430 PINDEX simultaneous,
00431 const PString & name
00432 );
00433
00436 void AddAllUserInputCapabilities(
00437 PINDEX descriptorNum,
00438 PINDEX simultaneous
00439 );
00440
00443 void RemoveCapabilities(
00444 const PStringArray & codecNames
00445 );
00446
00449 void ReorderCapabilities(
00450 const PStringArray & preferenceOrder
00451 );
00452
00455 H323Capability * FindCapability(
00456 const H245_Capability & cap
00457 ) const;
00458
00461 H323Capability * FindCapability(
00462 const H245_DataType & dataType
00463 ) const;
00464
00467 H323Capability * FindCapability(
00468 H323Capability::MainTypes mainType,
00469 unsigned subType
00470 ) const;
00472
00492 BOOL UseGatekeeper(
00493 const PString & address = PString::Empty(),
00494 const PString & identifier = PString::Empty(),
00495 const PString & localAddress = PString::Empty()
00496 );
00497
00508 BOOL SetGatekeeper(
00509 const PString & address,
00510 H323Transport * transport = NULL
00511 );
00512
00527 BOOL SetGatekeeperZone(
00528 const PString & address,
00529 const PString & identifier,
00530 H323Transport * transport = NULL
00531 );
00532
00542 BOOL LocateGatekeeper(
00543 const PString & identifier,
00544 H323Transport * transport = NULL
00545 );
00546
00555 BOOL DiscoverGatekeeper(
00556 H323Transport * transport = NULL
00557 );
00558
00566 virtual H323Gatekeeper * CreateGatekeeper(
00567 H323Transport * transport
00568 );
00569
00572 H323Gatekeeper * GetGatekeeper() const { return gatekeeper; }
00573
00576 BOOL IsRegisteredWithGatekeeper() const;
00577
00583 BOOL RemoveGatekeeper(
00584 int reason = -1
00585 );
00586
00589 virtual void SetGatekeeperPassword(
00590 const PString & password
00591 );
00592
00595 virtual const PString & GetGatekeeperPassword() const { return gatekeeperPassword; }
00596
00599 virtual H235Authenticators CreateAuthenticators();
00600
00603 virtual void OnGatekeeperConfirm();
00604
00607 virtual void OnGatekeeperReject();
00608
00611 virtual void OnRegistrationConfirm();
00612
00615 virtual void OnRegistrationReject();
00617
00618 #ifdef H323_TRANSNEXUS_OSP
00619
00625 inline int SetOSPProvider(
00626 const PString & server
00627 )
00628 { return SetOSPProvider(server, PDirectory()); }
00629 virtual int SetOSPProvider(
00630 const PString & server,
00631 const PDirectory & ospDir
00632 );
00633 virtual void SetOSPProvider(
00634 OpalOSP::Provider * provider
00635 );
00636
00639 virtual OpalOSP::Provider * GetOSPProvider()
00640 { return ospProvider; }
00641
00642 #endif
00643
00660 BOOL StartListener(
00661 H323Listener * listener
00662 );
00663
00675 BOOL StartListener(
00676 const H323TransportAddress & iface
00677 );
00678
00695 BOOL StartListeners(
00696 const H323TransportAddressArray & ifaces
00697 );
00698
00702 BOOL RemoveListener(
00703 H323Listener * listener
00704 );
00705
00708 H323TransportAddressArray GetInterfaceAddresses(
00709 BOOL excludeLocalHost = TRUE,
00710 H323Transport * associatedTransport = NULL
00712 );
00713
00732 H323Connection * MakeCall(
00733 const PString & remoteParty,
00734 PString & token,
00735 void * userData = NULL
00736 );
00737
00758 H323Connection * MakeCall(
00759 const PString & remoteParty,
00760 H323Transport * transport,
00761 PString & token,
00762 void * userData = NULL
00763 );
00764
00775 H323Connection * MakeCallLocked(
00776 const PString & remoteParty,
00777 PString & token,
00778 void * userData = NULL,
00779 H323Transport * transport = NULL
00780 );
00781
00782 #ifdef H323_H450
00783
00804 virtual H323Connection * SetupTransfer(
00805 const PString & token,
00806 const PString & callIdentity,
00807 const PString & remoteParty,
00808 PString & newToken,
00809 void * userData = NULL
00810 );
00811
00817 void TransferCall(
00818 const PString & token,
00819 const PString & remoteParty,
00820 const PString & callIdentity = PString::Empty()
00822 );
00823
00830 void ConsultationTransfer(
00831 const PString & primaryCallToken,
00832 const PString & secondaryCallToken
00833 );
00834
00838 void HoldCall(
00839 const PString & token,
00840 BOOL localHold
00841 );
00842
00846 H323Connection * IntrudeCall(
00847 const PString & remoteParty,
00848 PString & token,
00849 unsigned capabilityLevel,
00850 void * userData = NULL
00851 );
00852
00853 H323Connection * IntrudeCall(
00854 const PString & remoteParty,
00855 H323Transport * transport,
00856 PString & token,
00857 unsigned capabilityLevel,
00858 void * userData = NULL
00859 );
00860
00861 #endif // H323_H450
00862
00869 BOOL ParsePartyName(
00870 const PString & party,
00871 PString & alias,
00872 H323TransportAddress & address
00873 );
00874
00879 virtual BOOL ClearCall(
00880 const PString & token,
00881 H323Connection::CallEndReason reason =
00882 H323Connection::EndedByLocalUser
00883 );
00884
00889 virtual BOOL ClearCallSynchronous(
00890 const PString & token,
00891 H323Connection::CallEndReason reason =
00892 H323Connection::EndedByLocalUser
00893 );
00894 virtual BOOL ClearCallSynchronous(
00895 const PString & token,
00896 H323Connection::CallEndReason reason,
00897 PSyncPoint * sync
00898 );
00899
00906 virtual void ClearAllCalls(
00907 H323Connection::CallEndReason reason =
00908 H323Connection::EndedByLocalUser,
00909 BOOL wait = TRUE
00910 );
00911
00914 virtual BOOL HasConnection(
00915 const PString & token
00916 );
00917
00929 H323Connection * FindConnectionWithLock(
00930 const PString & token
00931 );
00932
00935 PStringList GetAllConnections();
00936
00948 virtual BOOL OnIncomingCall(
00949 H323Connection & connection,
00950 const H323SignalPDU & setupPDU,
00951 H323SignalPDU & alertingPDU
00952 );
00953 virtual BOOL OnIncomingCall(
00954 H323Connection & connection,
00955 const H323SignalPDU & setupPDU,
00956 H323SignalPDU & alertingPDU,
00957 H323Connection::CallEndReason & reason
00958 );
00959
00964 virtual BOOL OnCallTransferInitiate(
00965 H323Connection & connection,
00966 const PString & remoteParty
00967 );
00968
00973 virtual BOOL OnCallTransferIdentify(
00974 H323Connection & connection
00975 );
00976
00981 virtual void OnSendARQ(
00982 H323Connection & conn,
00983 H225_AdmissionRequest & arq
00984 );
00985
01004 virtual H323Connection::AnswerCallResponse OnAnswerCall(
01005 H323Connection & connection,
01006 const PString & callerName,
01007 const H323SignalPDU & setupPDU,
01008 H323SignalPDU & connectPDU
01009 );
01010
01021 virtual BOOL OnAlerting(
01022 H323Connection & connection,
01023 const H323SignalPDU & alertingPDU,
01024 const PString & user
01025 );
01026
01035 virtual BOOL OnConnectionForwarded(
01036 H323Connection & connection,
01037 const PString & forwardParty,
01038 const H323SignalPDU & pdu
01039 );
01040
01049 virtual BOOL ForwardConnection(
01050 H323Connection & connection,
01051 const PString & forwardParty,
01052 const H323SignalPDU & pdu
01053 );
01054
01061 virtual void OnConnectionEstablished(
01062 H323Connection & connection,
01063 const PString & token
01064 );
01065
01068 virtual BOOL IsConnectionEstablished(
01069 const PString & token
01070 );
01071
01078 virtual void OnConnectionCleared(
01079 H323Connection & connection,
01080 const PString & token
01081 );
01082
01087 static PString BuildConnectionToken(
01088 const H323Transport & transport,
01089 unsigned callReference,
01090 BOOL fromRemote
01091 );
01092
01098 virtual H323Connection * OnIncomingConnection(
01099 H323Transport * transport,
01100 H323SignalPDU & setupPDU
01101 );
01102
01109 virtual BOOL OnOutgoingCall(
01110 H323Connection & conn,
01111 const H323SignalPDU & connectPDU
01112 );
01113
01116 virtual H323Connection * CreateConnection(
01117 unsigned callReference,
01118 void * userData,
01119 H323Transport * transport,
01120 H323SignalPDU * setupPDU
01121 );
01122 virtual H323Connection * CreateConnection(
01123 unsigned callReference,
01124 void * userData
01125 );
01126 virtual H323Connection * CreateConnection(
01127 unsigned callReference
01128 );
01129
01136 virtual void CleanUpConnections();
01138
01139
01146 virtual BOOL OnStartLogicalChannel(
01147 H323Connection & connection,
01148 H323Channel & channel
01149 );
01150
01155 virtual void OnClosedLogicalChannel(
01156 H323Connection & connection,
01157 const H323Channel & channel
01158 );
01159
01160 #ifndef NO_H323_AUDIO_CODECS
01161
01168 virtual BOOL OpenAudioChannel(
01169 H323Connection & connection,
01170 BOOL isEncoding,
01171 unsigned bufferSize,
01172 H323AudioCodec & codec
01173 );
01174 #endif
01175
01176 #ifndef NO_H323_VIDEO
01177
01183 virtual BOOL OpenVideoChannel(
01184 H323Connection & connection,
01185 BOOL isEncoding,
01186 H323VideoCodec & codec
01187 );
01188 #endif // NO_H323_VIDEO
01189
01197 virtual void OnRTPStatistics(
01198 const H323Connection & connection,
01199 const RTP_Session & session
01200 ) const;
01202
01209 virtual void OnUserInputString(
01210 H323Connection & connection,
01211 const PString & value
01212 );
01213
01218 virtual void OnUserInputTone(
01219 H323Connection & connection,
01220 char tone,
01221 unsigned duration,
01222 unsigned logicalChannel,
01223 unsigned rtpTimestamp
01224 );
01225
01229 virtual void OnGatekeeperNATDetect(
01230 PIPSocket::Address publicAddr,
01231 PString & gkIdentifier,
01232 H323TransportAddress & gkRouteAddress
01233 );
01235
01236 #ifdef H323_H248
01237
01246 virtual void OnHTTPServiceControl(
01247 unsigned operation,
01248 unsigned sessionId,
01249 const PString & url
01250 );
01251
01261 virtual void OnCallCreditServiceControl(
01262 const PString & amount,
01263 BOOL mode
01264 );
01265
01269 virtual void OnServiceControlSession(
01270 unsigned type,
01271 unsigned sessionid,
01272 const H323ServiceControlSession & session,
01273 H323Connection * connection
01274 );
01275
01278 virtual H323ServiceControlSession * CreateServiceControlSession(
01279 const H225_ServiceControlDescriptor & contents
01280 );
01282 #endif // H323_H248
01283
01286 #ifdef H323_T120
01287
01297 virtual OpalT120Protocol * CreateT120ProtocolHandler(
01298 const H323Connection & connection
01299 ) const;
01300 #endif
01301
01302 #ifdef H323_T38
01303
01313 virtual OpalT38Protocol * CreateT38ProtocolHandler(
01314 const H323Connection & connection
01315 ) const;
01317 #endif
01318
01326 virtual BOOL OnConferenceInvite(
01327 const H323SignalPDU & setupPDU
01328 );
01329
01335 virtual BOOL OnCallIndependentSupplementaryService(
01336 const H323SignalPDU & setupPDU
01337 );
01338
01344 virtual BOOL OnNegotiateConferenceCapabilities(
01345 const H323SignalPDU & setupPDU
01346 );
01348
01359 virtual void SetLocalUserName(
01360 const PString & name
01361 );
01362
01367 virtual const PString & GetLocalUserName() const { return localAliasNames[0]; }
01368
01375 BOOL AddAliasName(
01376 const PString & name
01377 );
01378
01382 BOOL RemoveAliasName(
01383 const PString & name
01384 );
01385
01390 const PStringList & GetAliasNames() const { return localAliasNames; }
01391
01392 #if P_LDAP
01393
01396 const PString & GetDefaultILSServer() const { return ilsServer; }
01397
01400 void SetDefaultILSServer(
01401 const PString & server
01402 ) { ilsServer = server; }
01403
01404 #endif
01405
01408 BOOL IsFastStartDisabled() const
01409 { return disableFastStart; }
01410
01413 void DisableFastStart(
01414 BOOL mode
01415 ) { disableFastStart = mode; }
01416
01419 BOOL IsH245TunnelingDisabled() const
01420 { return disableH245Tunneling; }
01421
01424 void DisableH245Tunneling(
01425 BOOL mode
01426 ) { disableH245Tunneling = mode; }
01427
01430 BOOL IsH245inSetupDisabled() const
01431 { return disableH245inSetup; }
01432
01435 void DisableH245inSetup(
01436 BOOL mode
01437 ) { disableH245inSetup = mode; }
01438
01441 BOOL DetectInBandDTMFDisabled() const
01442 { return disableDetectInBandDTMF; }
01443
01446 void DisableDetectInBandDTMF(
01447 BOOL mode
01448 ) { disableDetectInBandDTMF = mode; }
01449
01452 BOOL CanDisplayAmountString() const
01453 { return canDisplayAmountString; }
01454
01457 void SetCanDisplayAmountString(
01458 BOOL mode
01459 ) { canDisplayAmountString = mode; }
01460
01463 BOOL CanEnforceDurationLimit() const
01464 { return canEnforceDurationLimit; }
01465
01468 void SetCanEnforceDurationLimit(
01469 BOOL mode
01470 ) { canEnforceDurationLimit = mode; }
01471
01472 #ifdef H323_H450
01473
01476 unsigned GetCallIntrusionProtectionLevel() const { return callIntrusionProtectionLevel; }
01477
01480 void SetCallIntrusionProtectionLevel(
01481 unsigned level
01482 ) { PAssert(level<=3, PInvalidParameter); callIntrusionProtectionLevel = level; }
01483
01486 virtual void OnReceivedInitiateReturnError();
01487
01488 #endif // H323_H450
01489
01490 #ifdef H323_AUDIO_CODECS
01491 #ifdef P_AUDIO
01492
01500 virtual BOOL SetSoundChannelPlayDevice(const PString & name);
01501 virtual BOOL SetSoundChannelPlayDriver(const PString & name);
01502
01507 const PString & GetSoundChannelPlayDevice() const { return soundChannelPlayDevice; }
01508 const PString & GetSoundChannelPlayDriver() const { return soundChannelPlayDriver; }
01509
01517 virtual BOOL SetSoundChannelRecordDevice(const PString & name);
01518 virtual BOOL SetSoundChannelRecordDriver(const PString & name);
01519
01524 const PString & GetSoundChannelRecordDevice() const { return soundChannelRecordDevice; }
01525 const PString & GetSoundChannelRecordDriver() const { return soundChannelRecordDriver; }
01526
01529 unsigned GetSoundChannelBufferDepth() const { return soundChannelBuffers; }
01530
01533 void SetSoundChannelBufferDepth(
01534 unsigned depth
01535 );
01536
01537 #endif // P_AUDIO
01538
01541 H323AudioCodec::SilenceDetectionMode GetSilenceDetectionMode() const
01542 { return defaultSilenceDetection; }
01543
01546 void SetSilenceDetectionMode(
01547 H323AudioCodec::SilenceDetectionMode mode
01548 ) { defaultSilenceDetection = mode; }
01549
01550 #endif // H323_AUDIO_CODECS
01551
01554 H323Connection::SendUserInputModes GetSendUserInputMode() const { return defaultSendUserInputMode; }
01555
01558 void SetSendUserInputMode(H323Connection::SendUserInputModes mode) { defaultSendUserInputMode = mode; }
01559
01560 #ifdef H323_VIDEO
01561
01564 BOOL CanAutoStartReceiveVideo() const { return autoStartReceiveVideo; }
01565
01568 BOOL CanAutoStartTransmitVideo() const { return autoStartTransmitVideo; }
01569
01570 #endif // H323_VIDEO
01571
01572 #ifdef H323_T38
01573
01576 BOOL CanAutoStartReceiveFax() const { return autoStartReceiveFax; }
01577
01580 BOOL CanAutoStartTransmitFax() const { return autoStartTransmitFax; }
01581
01582 #endif // H323_T38
01583
01586 BOOL CanAutoCallForward() const { return autoCallForward; }
01587
01590 const H323ListenerList & GetListeners() const { return listeners; }
01591
01594 const H323Capabilities & GetCapabilities() const { return capabilities; }
01595
01598 enum TerminalTypes {
01599 e_TerminalOnly = 50,
01600 e_TerminalAndMC = 70,
01601 e_GatewayOnly = 60,
01602 e_GatewayAndMC = 80,
01603 e_GatewayAndMCWithDataMP = 90,
01604 e_GatewayAndMCWithAudioMP = 100,
01605 e_GatewayAndMCWithAVMP = 110,
01606 e_GatekeeperOnly = 120,
01607 e_GatekeeperWithDataMP = 130,
01608 e_GatekeeperWithAudioMP = 140,
01609 e_GatekeeperWithAVMP = 150,
01610 e_MCUOnly = 160,
01611 e_MCUWithDataMP = 170,
01612 e_MCUWithAudioMP = 180,
01613 e_MCUWithAVMP = 190
01614 };
01615
01618 TerminalTypes GetTerminalType() const { return terminalType; }
01619
01622 BOOL IsTerminal() const;
01623
01626 BOOL IsGateway() const;
01627
01630 BOOL IsGatekeeper() const;
01631
01634 BOOL IsMCU() const;
01635
01636 #ifdef H323_AUDIO_CODECS
01637
01640 unsigned GetMinAudioJitterDelay() const { return minAudioJitterDelay; }
01641
01645 unsigned GetMaxAudioJitterDelay() const { return maxAudioJitterDelay; }
01646
01649 void SetAudioJitterDelay(
01650 unsigned minDelay,
01651 unsigned maxDelay
01652 );
01653 #endif
01654
01657 unsigned GetInitialBandwidth() const { return initialBandwidth; }
01658
01661 void SetInitialBandwidth(unsigned bandwidth) { initialBandwidth = bandwidth; }
01662
01665 virtual BOOL OnSendFeatureSet(unsigned, H225_FeatureSet &);
01666
01669 virtual void OnReceiveFeatureSet(unsigned, const H225_FeatureSet &);
01670
01671 #ifdef P_STUN
01672
01678 PSTUNClient * GetSTUN(
01679 const PIPSocket::Address & address = 0
01680 ) const;
01681
01684 void SetSTUNServer(
01685 const PString & server
01686 );
01687
01688 #endif // P_NONCORE
01689
01692 virtual BOOL IsLocalAddress(
01693 const PIPSocket::Address & remoteAddress
01694 ) const;
01695
01698 virtual void TranslateTCPAddress(
01699 PIPSocket::Address & ,
01700 const PIPSocket::Address &
01701 ) { }
01702 void InternalTranslateTCPAddress(
01703 PIPSocket::Address & ,
01704 const PIPSocket::Address &
01705 );
01706
01709 WORD GetTCPPortBase() const { return tcpPorts.base; }
01710
01713 WORD GetTCPPortMax() const { return tcpPorts.max; }
01714
01717 void SetTCPPorts(unsigned tcpBase, unsigned tcpMax);
01718
01721 WORD GetNextTCPPort();
01722
01725 WORD GetUDPPortBase() const { return udpPorts.base; }
01726
01729 WORD GetUDPPortMax() const { return udpPorts.max; }
01730
01733 void SetUDPPorts(unsigned udpBase, unsigned udpMax);
01734
01737 WORD GetNextUDPPort();
01738
01741 WORD GetRtpIpPortBase() const { return rtpIpPorts.base; }
01742
01745 WORD GetRtpIpPortMax() const { return rtpIpPorts.max; }
01746
01749 void SetRtpIpPorts(unsigned udpBase, unsigned udpMax);
01750
01753 WORD GetRtpIpPortPair();
01754
01757 BYTE GetRtpIpTypeofService() const { return rtpIpTypeofService; }
01758
01761 void SetRtpIpTypeofService(unsigned tos) { rtpIpTypeofService = (BYTE)tos; }
01762
01765 BYTE GetTcpIpTypeofService() const { return tcpIpTypeofService; }
01766
01769 void SetTcpIpTypeofService(unsigned tos) { tcpIpTypeofService = (BYTE)tos; }
01770
01773 const PTimeInterval & GetSignallingChannelConnectTimeout() const { return signallingChannelConnectTimeout; }
01774
01777 const PTimeInterval & GetSignallingChannelCallTimeout() const { return signallingChannelCallTimeout; }
01778
01781 const PTimeInterval & GetControlChannelStartTimeout() const { return controlChannelStartTimeout; }
01782
01785 const PTimeInterval & GetEndSessionTimeout() const { return endSessionTimeout; }
01786
01789 const PTimeInterval & GetMasterSlaveDeterminationTimeout() const { return masterSlaveDeterminationTimeout; }
01790
01793 unsigned GetMasterSlaveDeterminationRetries() const { return masterSlaveDeterminationRetries; }
01794
01797 const PTimeInterval & GetCapabilityExchangeTimeout() const { return capabilityExchangeTimeout; }
01798
01801 const PTimeInterval & GetLogicalChannelTimeout() const { return logicalChannelTimeout; }
01802
01805 const PTimeInterval & GetRequestModeTimeout() const { return logicalChannelTimeout; }
01806
01809 const PTimeInterval & GetRoundTripDelayTimeout() const { return roundTripDelayTimeout; }
01810
01813 const PTimeInterval & GetRoundTripDelayRate() const { return roundTripDelayRate; }
01814
01817 BOOL ShouldClearCallOnRoundTripFail() const { return clearCallOnRoundTripFail; }
01818
01821 const PTimeInterval & GetNoMediaTimeout() const;
01822
01825 BOOL SetNoMediaTimeout(PTimeInterval newInterval);
01826
01829 const PTimeInterval & GetGatekeeperRequestTimeout() const { return gatekeeperRequestTimeout; }
01830
01833 unsigned GetGatekeeperRequestRetries() const { return gatekeeperRequestRetries; }
01834
01837 const PTimeInterval & GetRasRequestTimeout() const { return rasRequestTimeout; }
01838
01841 unsigned GetRasRequestRetries() const { return rasRequestRetries; }
01842
01846 const PTimeInterval & GetGatekeeperTimeToLive() const { return registrationTimeToLive; }
01847
01850 const PString & GetGkAccessTokenOID() const { return gkAccessTokenOID; }
01851
01854 void SetGkAccessTokenOID(const PString & token) { gkAccessTokenOID = token; }
01855
01856 #ifdef H323_H450
01857
01860 const PTimeInterval & GetCallTransferT1() const { return callTransferT1; }
01861
01864 const PTimeInterval & GetCallTransferT2() const { return callTransferT2; }
01865
01868 const PTimeInterval & GetCallTransferT3() const { return callTransferT3; }
01869
01872 const PTimeInterval & GetCallTransferT4() const { return callTransferT4; }
01873
01875 const PTimeInterval & GetCallIntrusionT1() const { return callIntrusionT1; }
01876 const PTimeInterval & GetCallIntrusionT2() const { return callIntrusionT2; }
01877 const PTimeInterval & GetCallIntrusionT3() const { return callIntrusionT3; }
01878 const PTimeInterval & GetCallIntrusionT4() const { return callIntrusionT4; }
01879 const PTimeInterval & GetCallIntrusionT5() const { return callIntrusionT5; }
01880 const PTimeInterval & GetCallIntrusionT6() const { return callIntrusionT6; }
01881
01884 H323CallIdentityDict& GetCallIdentityDictionary() { return secondaryConnectionsActive; }
01885
01888 unsigned GetNextH450CallIdentityValue() const { return ++nextH450CallIdentity; }
01889
01890 #endif // H323_H450
01891
01894 PINDEX GetCleanerThreadStackSize() const { return cleanerThreadStackSize; }
01895
01898 PINDEX GetListenerThreadStackSize() const { return listenerThreadStackSize; }
01899
01902 PINDEX GetSignallingThreadStackSize() const { return signallingThreadStackSize; }
01903
01906 PINDEX GetControlThreadStackSize() const { return controlThreadStackSize; }
01907
01910 PINDEX GetChannelThreadStackSize() const { return logicalThreadStackSize; }
01911
01914 PINDEX GetRasThreadStackSize() const { return rasThreadStackSize; }
01915
01918 PINDEX GetJitterThreadStackSize() const { return jitterThreadStackSize; }
01919
01922 PThread::Priority GetChannelThreadPriority() const { return channelThreadPriority; }
01923
01925
01929 static BYTE defaultT35CountryCode;
01930 static BYTE defaultT35Extension;
01931 static WORD defaultManufacturerCode;
01932
01933 protected:
01934 H323Gatekeeper * InternalCreateGatekeeper(H323Transport * transport);
01935 BOOL InternalRegisterGatekeeper(H323Gatekeeper * gk, BOOL discovered);
01936 H323Connection * FindConnectionWithoutLocks(const PString & token);
01937 virtual H323Connection * InternalMakeCall(
01938 const PString & existingToken,
01939 const PString & callIdentity,
01940 unsigned capabilityLevel,
01941 const PString & remoteParty,
01942 H323Transport * transport,
01943 PString & token,
01944 void * userData
01945 );
01946
01947
01948 PStringList localAliasNames;
01949
01950 #ifdef H323_AUDIO_CODECS
01951 H323AudioCodec::SilenceDetectionMode defaultSilenceDetection;
01952 unsigned minAudioJitterDelay;
01953 unsigned maxAudioJitterDelay;
01954 #ifdef P_AUDIO
01955 PString soundChannelPlayDevice;
01956 PString soundChannelPlayDriver;
01957 PString soundChannelRecordDevice;
01958 PString soundChannelRecordDriver;
01959 unsigned soundChannelBuffers;
01960 #endif // P_AUDIO
01961 #endif // H323_AUDIO_CODECS
01962
01963 #ifdef H323_VIDEO
01964 PString videoChannelPlayDevice;
01965 PString videoChannelRecordDevice;
01966 BOOL autoStartReceiveVideo;
01967 BOOL autoStartTransmitVideo;
01968 #endif // H323_VIDEO
01969
01970 #ifdef H323_T38
01971 BOOL autoStartReceiveFax;
01972 BOOL autoStartTransmitFax;
01973 #endif // H323_T38
01974
01975 BOOL autoCallForward;
01976 BOOL disableFastStart;
01977 BOOL disableH245Tunneling;
01978 BOOL disableH245inSetup;
01979 BOOL disableDetectInBandDTMF;
01980 BOOL canDisplayAmountString;
01981 BOOL canEnforceDurationLimit;
01982
01983 #ifdef H323_H450
01984 unsigned callIntrusionProtectionLevel;
01985 #endif // H323_H450
01986
01987 H323Connection::SendUserInputModes defaultSendUserInputMode;
01988
01989 #ifdef P_LDAP
01990 PString ilsServer;
01991 #endif // P_LDAP
01992
01993
01994 BYTE rtpIpTypeofService;
01995 BYTE tcpIpTypeofService;
01996 PTimeInterval signallingChannelConnectTimeout;
01997 PTimeInterval signallingChannelCallTimeout;
01998 PTimeInterval controlChannelStartTimeout;
01999 PTimeInterval endSessionTimeout;
02000 PTimeInterval masterSlaveDeterminationTimeout;
02001 unsigned masterSlaveDeterminationRetries;
02002 PTimeInterval capabilityExchangeTimeout;
02003 PTimeInterval logicalChannelTimeout;
02004 PTimeInterval requestModeTimeout;
02005 PTimeInterval roundTripDelayTimeout;
02006 PTimeInterval roundTripDelayRate;
02007 PTimeInterval noMediaTimeout;
02008 PTimeInterval gatekeeperRequestTimeout;
02009 unsigned gatekeeperRequestRetries;
02010 PTimeInterval rasRequestTimeout;
02011 unsigned rasRequestRetries;
02012 PTimeInterval registrationTimeToLive;
02013 PString gkAccessTokenOID;
02014
02015 unsigned initialBandwidth;
02016 BOOL clearCallOnRoundTripFail;
02017
02018 struct PortInfo {
02019 void Set(
02020 unsigned base,
02021 unsigned max,
02022 unsigned range,
02023 unsigned dflt
02024 );
02025 WORD GetNext(
02026 unsigned increment
02027 );
02028
02029 PMutex mutex;
02030 WORD base;
02031 WORD max;
02032 WORD current;
02033 } tcpPorts, udpPorts, rtpIpPorts;
02034
02035 #ifdef P_STUN
02036 PSTUNClient * stun;
02037 #endif
02038
02039 BYTE t35CountryCode;
02040 BYTE t35Extension;
02041 WORD manufacturerCode;
02042
02043 TerminalTypes terminalType;
02044
02045 #ifdef H323_H450
02046
02047
02048
02049 PTimeInterval callTransferT1;
02050
02051
02052 PTimeInterval callTransferT2;
02053
02054
02055 PTimeInterval callTransferT3;
02056
02057
02058 PTimeInterval callTransferT4;
02059
02061 PTimeInterval callIntrusionT1;
02062 PTimeInterval callIntrusionT2;
02063 PTimeInterval callIntrusionT3;
02064 PTimeInterval callIntrusionT4;
02065 PTimeInterval callIntrusionT5;
02066 PTimeInterval callIntrusionT6;
02067
02068 H323CallIdentityDict secondaryConnectionsActive;
02069
02070 mutable PAtomicInteger nextH450CallIdentity;
02072
02073 #endif // H323_H450
02074
02075 PINDEX cleanerThreadStackSize;
02076 PINDEX listenerThreadStackSize;
02077 PINDEX signallingThreadStackSize;
02078 PINDEX controlThreadStackSize;
02079 PINDEX logicalThreadStackSize;
02080 PINDEX rasThreadStackSize;
02081 PINDEX jitterThreadStackSize;
02082
02083 PThread::Priority channelThreadPriority;
02084
02085
02086 H323ListenerList listeners;
02087 H323Capabilities capabilities;
02088 H323Gatekeeper * gatekeeper;
02089 PString gatekeeperPassword;
02090
02091 H323ConnectionDict connectionsActive;
02092
02093 PMutex connectionsMutex;
02094 PMutex noMediaMutex;
02095 PStringSet connectionsToBeCleaned;
02096 H323ConnectionsCleaner * connectionsCleaner;
02097 PSyncPoint connectionsAreCleaned;
02098
02099 #ifdef H323_TRANSNEXUS_OSP
02100 OpalOSP::Provider * ospProvider;
02101 #endif
02102
02103 };
02104
02105
02106 #endif // __OPAL_H323EP_H
02107
02108