class H323EndPoint

This class manages the H323 endpoint.

Inheritance:


Public Methods

[more] Construction
[more] Capabilities
[more] Gatekeeper management
[more] Connection management
[more] Logical Channels management
[more] Indications
[more] Service Control
[more] Other services
[more] Member variable access

Protected Fields

[more]PTimeInterval callIntrusionT1
Call Intrusion Timers


Documentation

This class manages the H323 endpoint. An endpoint may have zero or more listeners to create incoming connections or zero or more outgoing conenctions initiated via the MakeCall() function. Once a conection exists it is managed by this class instance.

The main thing this class embodies is the capabilities of the application, that is the codecs and protocols it is capable of.

An application may create a descendent off this class and overide the CreateConnection() function, if they require a descendent of H323Connection to be created. This would be quite likely in most applications.

o Construction

o H323EndPoint()
Create a new endpoint

o ~H323EndPoint()
Destroy endpoint

ovirtual void SetEndpointTypeInfo( H225_EndpointType & info ) const
Set the endpoint information in H225 PDU's

ovirtual void SetVendorIdentifierInfo( H225_VendorIdentifier & info ) const
Set the vendor information in H225 PDU's

ovirtual void SetH221NonStandardInfo( H225_H221NonStandard & info ) const
Set the H221NonStandard information in H225 PDU's

o Capabilities

ovoid AddCapability( H323Capability* capability )
Add a codec to the capabilities table. This will assure that the assignedCapabilityNumber field in the codec is unique for all codecs installed on this endpoint.

If the specific instnace of the capability is already in the table, it is not added again. Ther can be multiple instances of the same capability class however.

Parameters:
capability - New codec specification

oPINDEX SetCapability( PINDEX descriptorNum, PINDEX simultaneous, H323Capability* cap )
Set the capability descriptor lists. This is three tier set of codecs. The top most level is a list of particular capabilities. Each of these consists of a list of alternatives that can operate simultaneously. The lowest level is a list of codecs that cannot operate together. See H323 section 6.2.8.1 and H245 section 7.2 for details.

If descriptorNum is P_MAX_INDEX, the the next available index in the array of descriptors is used. Similarly if simultaneous is P_MAX_INDEX the the next available SimultaneousCapabilitySet is used. The return value is the index used for the new entry. Note if both are P_MAX_INDEX then the return value is the descriptor index as the simultaneous index must be zero.

Note that the capability specified here is automatically added to the capability table using the AddCapability() function. A specific instance of a capability is only ever added once, so multiple SetCapability() calls with the same H323Capability pointer will only add that capability once.

Parameters:
descriptorNum - The member of the capabilityDescriptor to add
simultaneous - The member of the SimultaneousCapabilitySet to add
cap - New capability specification

oPINDEX AddAllCapabilities( PINDEX descriptorNum, PINDEX simultaneous, const PString & name )
Add all matching capabilities in list. All capabilities that match the specified name are added. See the capabilities code for details on the matching algorithm.
Parameters:
descriptorNum - The member of the capabilityDescriptor to add
simultaneous - The member of the SimultaneousCapabilitySet to add
name - New capabilities name, if using "known" one.

ovoid AddAllUserInputCapabilities( PINDEX descriptorNum, PINDEX simultaneous )
Add all user input capabilities to this endpoints capability table.
Parameters:
descriptorNum - The member of the capabilityDescriptor to add
simultaneous - The member of the SimultaneousCapabilitySet to add

ovoid RemoveCapabilities( const PStringArray & codecNames )
Remove capabilites in table

ovoid ReorderCapabilities( const PStringArray & preferenceOrder )
Reorder capabilites in table

oH323Capability* FindCapability( const H245_Capability & cap ) const
Find a capability that has been registered.
Parameters:
cap - H245 capability table entry

oH323Capability* FindCapability( const H245_DataType & dataType ) const
Find a capability that has been registered.
Parameters:
dataType - H245 data type of codec

oH323Capability* FindCapability( H323Capability::MainTypes mainType, unsigned subType ) const
Find a capability that has been registered.
Parameters:
mainType - Main type of codec
subType - Subtype of codec

o Gatekeeper management

oBOOL UseGatekeeper( const PString & address = PString::Empty(), const PString & identifier = PString::Empty(), const PString & localAddress = PString::Empty() )
Use and register with an explicit gatekeeper. This will call other functions according to the following table:

address identifier function empty empty DiscoverGatekeeper() non-empty empty SetGatekeeper() empty non-empty LocateGatekeeper() non-empty non-empty SetGatekeeperZone()

The localAddress field, if non-empty, indicates the interface on which to look for the gatekeeper. An empty string is equivalent to "ip$*:*" which is any interface or port.

If the endpoint is already registered with a gatekeeper that meets the same criteria then the gatekeeper is not changed, otherwise it is deleted (with unregistration) and new one created and registered to.

Parameters:
address - Address of gatekeeper to use.
identifier - Identifier of gatekeeper to use.
localAddress - Local interface to use.

oBOOL SetGatekeeper( const PString & address, H323Transport* transport = NULL )
Select and register with an explicit gatekeeper. This will use the specified transport and a string giving a transport dependent address to locate a specific gatekeeper. The endpoint will register with that gatekeeper and, if successful, set it as the current gatekeeper used by this endpoint.

Note the transport being passed in will be deleted by this function or the H323Gatekeeper object it becomes associated with. Also if transport is NULL then a H323TransportUDP is created.

Parameters:
address - Address of gatekeeper to use.
transport - Transport over which to talk to gatekeeper.

oBOOL SetGatekeeperZone( const PString & address, const PString & identifier, H323Transport* transport = NULL )
Select and register with an explicit gatekeeper and zone. This will use the specified transport and a string giving a transport dependent address to locate a specific gatekeeper. The endpoint will register with that gatekeeper and, if successful, set it as the current gatekeeper used by this endpoint.

The gatekeeper identifier is set to the spplied parameter to allow the gatekeeper to either allocate a zone or sub-zone, or refuse to register if the zones do not match.

Note the transport being passed in will be deleted by this function or the H323Gatekeeper object it becomes associated with. Also if transport is NULL then a H323TransportUDP is created.

Parameters:
address - Address of gatekeeper to use.
identifier - Identifier of gatekeeper to use.
transport - Transport over which to talk to gatekeeper.

oBOOL LocateGatekeeper( const PString & identifier, H323Transport* transport = NULL )
Locate and select gatekeeper. This function will use the automatic gatekeeper discovery methods to locate the gatekeeper on the particular transport that has the specified gatekeeper identifier name. This is often the "Zone" for the gatekeeper.

Note the transport being passed in will be deleted becomes owned by the H323Gatekeeper created by this function and will be deleted by it. Also if transport is NULL then a H323TransportUDP is created.

Parameters:
identifier - Identifier of gatekeeper to locate.
transport - Transport over which to talk to gatekeeper.

oBOOL DiscoverGatekeeper( H323Transport* transport = NULL )
Discover and select gatekeeper. This function will use the automatic gatekeeper discovery methods to locate the first gatekeeper on a particular transport.

Note the transport being passed in will be deleted becomes owned by the H323Gatekeeper created by this function and will be deleted by it. Also if transport is NULL then a H323TransportUDP is created.

Parameters:
transport - Transport over which to talk to gatekeeper.

ovirtual H323Gatekeeper* CreateGatekeeper( H323Transport* transport )
Create a gatekeeper. This allows the application writer to have the gatekeeper as a descendent of the H323Gatekeeper in order to add functionality to the base capabilities in the library.

The default creates an instance of the H323Gatekeeper class.

Parameters:
transport - Transport over which gatekeepers communicates.

oH323Gatekeeper* GetGatekeeper() const
Get the gatekeeper we are registered with

oBOOL IsRegisteredWithGatekeeper() const
Return if endpoint is registered with gatekeeper

oBOOL RemoveGatekeeper( int reason = -1 )
Unregister and delete the gatekeeper we are registered with. The return value indicates FALSE if there was an error during the unregistration. However the gatekeeper is still removed and its instance deleted regardless of this error.
Parameters:
reason - Reason for gatekeeper removal

ovirtual void SetGatekeeperPassword( const PString & password )
Set the H235 password for the gatekeeper

ovirtual const PString& GetGatekeeperPassword() const
Get the H235 password for the gatekeeper

ovirtual H235Authenticators CreateAuthenticators()
Create a list of authenticators for gatekeeper

o Connection management

oBOOL StartListener( H323Listener* listener )
Add a listener to the endpoint. This allows for the automatic creating of incoming call connections. An application should use OnConnectionEstablished() to monitor when calls have arrived and been successfully negotiated.

Note if this returns TRUE, then the endpoint is responsible for deleting the H323Listener listener object. If FALSE is returned then the object is not deleted and it is up to the caller to release the memory allocated for the object.

If a listener already exists on the same transport address then it is ignored, but TRUE is still returned. The caller does not need to delete the object.

Parameters:
listener - Transport dependent listener.

oBOOL StartListener( const H323TransportAddress & iface )
Add a listener to the endpoint. This allows for the automatic creating of incoming call connections. An application should use OnConnectionEstablished() to monitor when calls have arrived and been successfully negotiated.

If a listener already exists on the same address then it is ignored, but TRUE is still returned.

If the iface string is empty then "*" is assumed which will listen on the standard TCP port on INADDR_ANY.

Parameters:
iface - Address of interface to listen on.

oBOOL StartListeners( const H323TransportAddressArray & ifaces )
Add listeners to the endpoint. Set the collection of listeners which will allow the automatic creating of incoming call connections. An application should use OnConnectionEstablished() to monitor when calls have arrived and been successfully negotiated.

If a listener already exists on the interface specified in the list then it is ignored. If a listener does not yet exist a new one is created and if a listener is running that is not in the list then it is stopped and removed.

If the array is empty then the string "*" is assumed which will listen on the standard TCP port on INADDR_ANY.

Returns TRUE if at least one interface was successfully started.

Parameters:
ifaces - Interfaces to listen on.

oBOOL RemoveListener( H323Listener* listener )
Remove a listener from the endpoint. If the listener parameter is NULL then all listeners are removed.
Parameters:
listener - Transport dependent listener.

oH323TransportAddressArray GetInterfaceAddresses( BOOL excludeLocalHost = TRUE, H323Transport* associatedTransport = NULL )
Return a list of the transport addresses for all listeners on this endpoint
Parameters:
excludeLocalHost - Flag to exclude 127.0.0.1
associatedTransport - Associated transport for precedence and translation

oH323Connection* MakeCall( const PString & remoteParty, PString & token, void* userData = NULL )
Make a call to a remote party. An appropriate transport is determined from the remoteParty parameter. The general form for this parameter is [alias@][transport$]host[:port] where the default alias is the same as the host, the default transport is "ip" and the default port is 1720.

This function returns almost immediately with the call occurring in a new background thread. Note that the call could be created and cleared ie OnConnectionCleared is called BEFORE this function returns. It is guaranteed that the token variable is set before OnConnectionCleared called.

Note, the returned pointer to the connection is not locked and may be deleted at any time. This is extremely unlikely immediately after the function is called, but you should not keep this pointer beyond that brief time. The the FindConnectionWithLock() function for future references to the connection object. It is recommended that MakeCallLocked() be usedin instead.

Parameters:
remoteParty - Remote party to call
token - String to receive token for connection
userData - user data to pass to CreateConnection

oH323Connection* MakeCall( const PString & remoteParty, H323Transport* transport, PString & token, void* userData = NULL )
Make a call to a remote party using the specified transport. The remoteParty may be a hostname, alias or other user name that is to be passed to the transport, if present.

If the transport parameter is NULL the transport is determined from the remoteParty description.

This function returns almost immediately with the call occurring in a new background thread. Note that the call could be created and cleared ie OnConnectionCleared is called BEFORE this function returns. It is guaranteed that the token variable is set before OnConnectionCleared called.

Note, the returned pointer to the connection is not locked and may be deleted at any time. This is extremely unlikely immediately after the function is called, but you should not keep this pointer beyond that brief time. The the FindConnectionWithLock() function for future references to the connection object. It is recommended that MakeCallLocked() be usedin instead.

Parameters:
remoteParty - Remote party to call
transport - Transport to use for call.
token - String to receive token for connection
userData - user data to pass to CreateConnection

oH323Connection* MakeCallLocked( const PString & remoteParty, PString & token, void* userData = NULL, H323Transport* transport = NULL )
Make a call to a remote party using the specified transport. The remoteParty may be a hostname, alias or other user name that is to be passed to the transport, if present.

If the transport parameter is NULL the transport is determined from the remoteParty description.

This function returns almost immediately with the call occurring in a new background thread. However the call will not progress very far

Parameters:
remoteParty - Remote party to call
token - String to receive token for connection
userData - user data to pass to CreateConnection
transport - Transport to use for call.

ovirtual H323Connection* SetupTransfer( const PString & token, const PString & callIdentity, const PString & remoteParty, PString & newToken, void* userData = NULL )
Setup the transfer of an existing call (connection) to a new remote party using H4502. This sends a Call Transfer Setup Invoke message from the B-Party (transferred endpoint) to the C-Party (transferred-to endpoint).

If the transport parameter is NULL the transport is determined from the remoteParty description. The general form for this parameter is [alias@][transport$]host[:port] where the default alias is the same as the host, the default transport is "ip" and the default port is 1720.

This function returns almost immediately with the transfer occurring in a new background thread.

Note, the returned pointer to the connection is not locked and may be deleted at any time. This is extremely unlikely immediately after the function is called, but you should not keep this pointer beyond that brief time. The the FindConnectionWithLock() function for future references to the connection object.

This function is declared virtual to allow an application to override the function and get the new call token of the forwarded call.

Parameters:
token - Existing connection to be transferred
callIdentity - Call identity of the secondary call (if it exists)
remoteParty - Remote party to transfer the existing call to
newToken - String to receive token for the new connection
userData - user data to pass to CreateConnection

ovoid TransferCall( const PString & token, const PString & remoteParty, const PString & callIdentity = PString::Empty() )
Initiate the transfer of an existing call (connection) to a new remote party using H4502. This sends a Call Transfer Initiate Invoke message from the A-Party (transferring endpoint) to the B-Party (transferred endpoint).
Parameters:
token - Existing connection to be transferred
remoteParty - Remote party to transfer the existing call to
callIdentity - Call Identity of secondary call if present

ovoid ConsultationTransfer( const PString & primaryCallToken, const PString & secondaryCallToken )
Transfer the call through consultation so the remote party in the primary call is connected to the called party in the second call using H4502. This sends a Call Transfer Identify Invoke message from the A-Party (transferring endpoint) to the C-Party (transferred-to endpoint).
Parameters:
primaryCallToken - Token of primary call
secondaryCallToken - Token of secondary call

ovoid HoldCall( const PString & token, BOOL localHold )
Place the call on hold, suspending all media channels (H4504) NOTE: Only Local Hold is implemented so far.
Parameters:
token - Existing connection to be transferred
localHold - true for Local Hold, false for Remote Hold

oH323Connection* IntrudeCall( const PString & remoteParty, PString & token, unsigned capabilityLevel, void* userData = NULL )
Initiate Call intrusion Designed similar to MakeCall function
Parameters:
remoteParty - Remote party to intrude call
token - String to receive token for connection
capabilityLevel - Capability level
userData - user data to pass to CreateConnection

oBOOL ParsePartyName( const PString & party, PString & alias, H323TransportAddress & address )
Parse a party address into alias and transport components. An appropriate transport is determined from the remoteParty parameter. The general form for this parameter is [alias@][transport$]host[:port] where the default alias is the same as the host, the default transport is "ip" and the default port is 1720.
Parameters:
party - Party name string.
alias - Parsed alias name
address - Parsed transport address

ovirtual BOOL ClearCall( const PString & token, H323Connection::CallEndReason reason = H323Connection::EndedByLocalUser )
Clear a current connection. This hangs up the connection to a remote endpoint. Note that this function is asynchronous
Parameters:
token - Token for identifying connection
reason - Reason for call clearing

ovirtual BOOL ClearCallSynchronous( const PString & token, H323Connection::CallEndReason reason = H323Connection::EndedByLocalUser )
Clear a current connection. This hangs up the connection to a remote endpoint. Note that these functions are synchronous
Parameters:
token - Token for identifying connection
reason - Reason for call clearing

ovirtual void ClearAllCalls( H323Connection::CallEndReason reason = H323Connection::EndedByLocalUser, BOOL wait = TRUE )
Clear all current connections. This hangs up all the connections to remote endpoints. The wait parameter is used to wait for all the calls to be cleared and their memory usage cleaned up before returning. This is typically used in the destructor for your descendant of H323EndPoint.
Parameters:
reason - Reason for call clearing
wait - Flag for wait for calls to e cleared.

ovirtual BOOL HasConnection( const PString & token )
Determine if a connection is active.
Parameters:
token - Token for identifying connection

oH323Connection* FindConnectionWithLock( const PString & token )
Find a connection that uses the specified token. This searches the endpoint for the connection that contains the token as provided by functions such as MakeCall() (as built by the BuildConnectionToken() function). if not found it will then search for the string representation of the CallIdentifier for the connection, and finally try for the string representation of the ConferenceIdentifier.

Note the caller of this function MUSt call the H323Connection::Unlock() function if this function returns a non-NULL pointer. If it does not then a deadlock can occur.

Parameters:
token - Token to identify connection

oPStringList GetAllConnections()
Get all calls current on the endpoint

ovirtual BOOL OnIncomingCall( H323Connection & connection, const H323SignalPDU & setupPDU, H323SignalPDU & alertingPDU )
Call back for incoming call. This function is called from the OnReceivedSignalSetup() function before it sends the Alerting PDU. It gives an opportunity for an application to alter the reply before transmission to the other endpoint.

If FALSE is returned the connection is aborted and a Release Complete PDU is sent.

The default behaviour simply returns TRUE.

Parameters:
connection - Connection that was established
setupPDU - Received setup PDU
alertingPDU - Alerting PDU to send

ovirtual BOOL OnCallTransferInitiate( H323Connection & connection, const PString & remoteParty )
Handle a connection transfer. This gives the application an opportunity to abort the transfer. The default behaviour just returns TRUE.
Parameters:
connection - Connection to transfer
remoteParty - Party transferring to.

ovirtual BOOL OnCallTransferIdentify( H323Connection & connection )
Handle a transfer via consultation. This gives the transferred-to user an opportunity to abort the transfer. The default behaviour just returns TRUE.
Parameters:
connection - Connection to transfer

ovirtual H323Connection::AnswerCallResponse OnAnswerCall( H323Connection & connection, const PString & callerName, const H323SignalPDU & setupPDU, H323SignalPDU & connectPDU )
Call back for answering an incoming call. This function is called from the OnReceivedSignalSetup() function before it sends the Connect PDU. It gives an opportunity for an application to alter the reply before transmission to the other endpoint.

It also gives an application time to wait for some event before signalling to the endpoint that the connection is to proceed. For example the user pressing an "Answer call" button.

If AnswerCallDenied is returned the connection is aborted and a Release Complete PDU is sent. If AnswerCallNow is returned then the H.323 protocol proceeds. Finally if AnswerCallPending is returned then the protocol negotiations are paused until the AnsweringCall() function is called.

The default behaviour simply returns AnswerNow.

Parameters:
connection - Connection that was established
callerName - Name of caller
setupPDU - Received setup PDU
connectPDU - Connect PDU to send.

ovirtual BOOL OnAlerting( H323Connection & connection, const H323SignalPDU & alertingPDU, const PString & user )
Call back for remote party being alerted. This function is called from the SendSignalSetup() function after it receives the optional Alerting PDU from the remote endpoint. That is when the remote "phone" is "ringing".

If FALSE is returned the connection is aborted and a Release Complete PDU is sent.

The default behaviour simply returns TRUE.

Parameters:
connection - Connection that was established
alertingPDU - Received Alerting PDU
user - Username of remote endpoint

ovirtual BOOL OnConnectionForwarded( H323Connection & connection, const PString & forwardParty, const H323SignalPDU & pdu )
A call back function when a connection indicates it is to be forwarded. An H323 application may handle this call back so it can make complicated decisions on if the call forward ius to take place. If it decides to do so it must call MakeCall() and return TRUE.

The default behaviour simply returns FALSE and that the automatic call forwarding should take place. See ForwardConnection()

Parameters:
connection - Connection to be forwarded
forwardParty - Remote party to forward to
pdu - Full PDU initiating forwarding

ovirtual BOOL ForwardConnection( H323Connection & connection, const PString & forwardParty, const H323SignalPDU & pdu )
Forward the call using the same token as the specified connection. Return TRUE if the call is being redirected.

The default behaviour will replace the current call in the endpoints call list using the same token as the call being redirected. Not that even though the same token is being used the actual object is completely mad anew.

Parameters:
connection - Connection to be forwarded
forwardParty - Remote party to forward to
pdu - Full PDU initiating forwarding

ovirtual void OnConnectionEstablished( H323Connection & connection, const PString & token )
A call back function whenever a connection is established. This indicates that a connection to a remote endpoint was established with a control channel and zero or more logical channels.

The default behaviour does nothing.

Parameters:
connection - Connection that was established
token - Token for identifying connection

ovirtual BOOL IsConnectionEstablished( const PString & token )
Determine if a connection is established.
Parameters:
token - Token for identifying connection

ovirtual void OnConnectionCleared( H323Connection & connection, const PString & token )
A call back function whenever a connection is broken. This indicates that a connection to a remote endpoint is no longer available.

The default behaviour does nothing.

Parameters:
connection - Connection that was established
token - Token for identifying connection

ostatic PString BuildConnectionToken( const H323Transport & transport, unsigned callReference, BOOL fromRemote )
Build a unique token for the connection. This identifies the call using the Q931 transport host name and the Q931 call reference number.
Parameters:
transport - Transport for connection
callReference - Call reference of Q.931 link
fromRemote - Call reference is from remote endpoint

oH323Connection* OnIncomingConnection( H323Transport* transport, H323SignalPDU & setupPDU )
Handle a new incoming connection. This will examine the setup PDU and either attach the signalling transport to an existing connection that has the same Q.931 call reference, or creates a new connection using CreateConnection().
Parameters:
transport - Transport for connection
setupPDU - Setup PDU

ovirtual H323Connection* CreateConnection( unsigned callReference, void* userData, H323Transport* transport, H323SignalPDU* setupPDU )
Create a connection that uses the specified call reference.
Parameters:
callReference - Call reference to use
userData - user data to pass to CreateConnection
transport - Transport for connection
setupPDU - Setup PDU, NULL if outgoing call

ovoid CleanUpConnections()
Clean up connections. This function is called from a background thread and checks for closed connections to clean up.

This would not normally be called by an application.

o Logical Channels management

ovirtual BOOL OnStartLogicalChannel( H323Connection & connection, H323Channel & channel )
Call back for opening a logical channel.

The default behaviour simply returns TRUE.

Parameters:
connection - Connection for the channel
channel - Channel being started

ovirtual void OnClosedLogicalChannel( H323Connection & connection, const H323Channel & channel )
Call back for closed a logical channel.

The default behaviour does nothing.

Parameters:
connection - Connection for the channel
channel - Channel being started

ovirtual BOOL OpenAudioChannel( H323Connection & connection, BOOL isEncoding, unsigned bufferSize, H323AudioCodec & codec )
Open a channel for use by an audio codec. The H323AudioCodec class will use this function to open the channel to read/write PCM data.

The default function creates a PSoundChannel using the member variables soundChannelPlayDevice or soundChannelRecordDevice.

Parameters:
connection - Connection for the channel
isEncoding - Direction of data flow
bufferSize - Size of each sound buffer
codec - codec that is doing the opening

ovirtual BOOL OpenVideoChannel( H323Connection & connection, BOOL isEncoding, H323VideoCodec & codec )
Open a channel for use by an video codec. The H323VideoCodec class will use this function to open the channel to read/write image data (which is one frame in a video stream - YUV411 format).

The default function creates a PVideoChannel using the member variables.

Parameters:
connection - Connection for the channel
isEncoding - Direction of data flow
codec - codec doing the opening

ovirtual void OnRTPStatistics( const H323Connection & connection, const RTP_Session & session ) const
Callback from the RTP session for statistics monitoring. This is called every so many packets on the transmitter and receiver threads of the RTP session indicating that the statistics have been updated.

The default behaviour does nothing.

Parameters:
connection - Connection for the channel
session - Session with statistics

o Indications

ovirtual void OnUserInputString( H323Connection & connection, const PString & value )
Call back for remote enpoint has sent user input as a string.

The default behaviour does nothing.

Parameters:
connection - Connection for the input
value - String value of indication

ovirtual void OnUserInputTone( H323Connection & connection, char tone, unsigned duration, unsigned logicalChannel, unsigned rtpTimestamp )
Call back for remote enpoint has sent user input.

The default behaviour calls H323Connection::OnUserInputTone().

Parameters:
connection - Connection for the input
tone - DTMF tone code
duration - Duration of tone in milliseconds
logicalChannel - Logical channel number for RTP sync.
rtpTimestamp - RTP timestamp in logical channel sync.

o Service Control

ovirtual void OnHTTPServiceControl( unsigned operation, unsigned sessionId, const PString & url )
Call back for HTTP based Service Control. An application may override this to use an HTTP based channel using a resource designated by the session ID. For example the session ID can correspond to a browser window and the

The default behaviour does nothing.

Parameters:
operation - Control operation
sessionId - Session ID for HTTP page
url - URL to use.

ovirtual void OnCallCreditServiceControl( const PString & amount, BOOL mode )
Call back for call credit information. An application may override this to display call credit information on registration, or when a call is started.

The canDisplayAmountString member variable must also be set to TRUE for this to operate.

The default behaviour does nothing.

Parameters:
amount - UTF-8 string for amount, including currency.
mode - Flag indicating that calls will debit the account.

ovirtual void OnServiceControlSession( unsigned type, unsigned sessionid, const H323ServiceControlSession & session, H323Connection* connection )
Handle incoming service control session information. Default behaviour calls session.OnChange()

ovirtual H323ServiceControlSession* CreateServiceControlSession( const H225_ServiceControlDescriptor & contents )
Create the service control session object

o Other services

ovirtual OpalT120Protocol* CreateT120ProtocolHandler( const H323Connection & connection ) const
Create an instance of the T120 protocol handler. This is called when the OpenLogicalChannel subsystem requires that a T.120 channel be established.

Note that if the application overrides this it should return a pointer to a heap variable (using new) as it will be automatically deleted when the H323Connection is deleted.

The default behavour returns NULL.

Parameters:
connection - Connection for which T.120 handler created

ovirtual OpalT38Protocol* CreateT38ProtocolHandler( const H323Connection & connection ) const
Create an instance of the T38 protocol handler. This is called when the OpenLogicalChannel subsystem requires that a T.38 fax channel be established.

Note that if the application overrides this it should return a pointer to a heap variable (using new) as it will be automatically deleted when the H323Connection is deleted.

The default behavour returns NULL.

Parameters:
connection - Connection for which T.38 handler created

o Member variable access

ovirtual void SetLocalUserName( const PString & name )
Set the user name to be used for the local end of any connections. This defaults to the logged in user as obtained from the PProcess::GetUserName() function.

Note that this name is technically the first alias for the endpoint. Additional aliases may be added by the use of the AddAliasName() function, however that list will be cleared when this function is used.

Parameters:
name - Local name of endpoint (prime alias)

ovirtual const PString& GetLocalUserName() const
Get the user name to be used for the local end of any connections. This defaults to the logged in user as obtained from the PProcess::GetUserName() function.

oBOOL AddAliasName( const PString & name )
Add an alias name to be used for the local end of any connections. If the alias name already exists in the list then is is not added again.

The list defaults to the value set in the SetLocalUserName() function. Note that calling SetLocalUserName() will clear the alias list.

Parameters:
name - New alias name to add

oBOOL RemoveAliasName( const PString & name )
Remove an alias name used for the local end of any connections. defaults to an empty list.
Parameters:
name - New alias namer to add

oconst PStringList& GetAliasNames() const
Get the user name to be used for the local end of any connections. This defaults to the logged in user as obtained from the PProcess::GetUserName() function.

oconst PString& GetDefaultILSServer() const
Get the default ILS server to use for user lookup

ovoid SetDefaultILSServer( const PString & server )
Set the default ILS server to use for user lookup

oBOOL IsFastStartDisabled() const
Get the default fast start mode

ovoid DisableFastStart( BOOL mode )
Set the default fast start mode.
Parameters:
mode - New default mode

oBOOL IsH245TunnelingDisabled() const
Get the default H245 tunneling mode

ovoid DisableH245Tunneling( BOOL mode )
Set the default H245 tunneling mode.
Parameters:
mode - New default mode

oBOOL IsH245inSetupDisabled() const
Get the default H245 tunneling mode

ovoid DisableH245inSetup( BOOL mode )
Set the default H245 tunneling mode.
Parameters:
mode - New default mode

oBOOL DetectInBandDTMFDisabled() const
Get the detect in-band DTMF flag

ovoid DisableDetectInBandDTMF( BOOL mode )
Set the detect in-band DTMF flag.
Parameters:
mode - New default mode

oBOOL CanDisplayAmountString() const
Get the flag indicating the endpoint can display an amount string

ovoid SetCanDisplayAmountString( BOOL mode )
Set the flag indicating the endpoint can display an amount string.
Parameters:
mode - New default mode

oBOOL CanEnforceDurationLimit() const
Get the flag indicating the call will automatically clear after a time

ovoid SetCanEnforceDurationLimit( BOOL mode )
Set the flag indicating the call will automatically clear after a time.
Parameters:
mode - New default mode

ounsigned GetCallIntrusionProtectionLevel() const
Get Call Intrusion Protection Level of the end point

ovoid SetCallIntrusionProtectionLevel( unsigned level )
Set Call Intrusion Protection Level of the end point

ovirtual BOOL SetSoundChannelPlayDevice(const PString & name)
Set the name for the sound channel to be used for output. If the name is not suitable for use with the PSoundChannel class then the function will return FALSE and not change the device.

This defaults to the value of the PSoundChannel::GetDefaultDevice() function.

oconst PString& GetSoundChannelPlayDevice() const
Get the name for the sound channel to be used for output. This defaults to the value of the PSoundChannel::GetDefaultDevice() function.

ovirtual BOOL SetSoundChannelRecordDevice(const PString & name)
Set the name for the sound channel to be used for input. If the name is not suitable for use with the PSoundChannel class then the function will return FALSE and not change the device.

This defaults to the value of the PSoundChannel::GetDefaultDevice() function.

oconst PString& GetSoundChannelRecordDevice() const
Get the name for the sound channel to be used for input. This defaults to the value of the PSoundChannel::GetDefaultDevice() function.

ounsigned GetSoundChannelBufferDepth() const
Get default the sound channel buffer depth

ovoid SetSoundChannelBufferDepth( unsigned depth )
Set the default sound channel buffer depth

oH323AudioCodec::SilenceDetectionMode GetSilenceDetectionMode() const
Get the default silence detection mode

ovoid SetSilenceDetectionMode( H323AudioCodec::SilenceDetectionMode mode )
Set the default silence detection mode.
Parameters:
mode - New default mode

oH323Connection::SendUserInputModes GetSendUserInputMode() const
Get the default mode for sending User Input Indications

ovoid SetSendUserInputMode(H323Connection::SendUserInputModes mode)
Set the default mode for sending User Input Indications

oBOOL CanAutoStartReceiveVideo() const
See if should auto-start receive video channels on connection

oBOOL CanAutoStartTransmitVideo() const
See if should auto-start transmit video channels on connection

oBOOL CanAutoStartReceiveFax() const
See if should auto-start receive fax channels on connection

oBOOL CanAutoStartTransmitFax() const
See if should auto-start transmit fax channels on connection

oBOOL CanAutoCallForward() const
See if should automatically do call forward of connection

oconst H323ListenerList& GetListeners() const
Get the set of listeners (incoming call transports) for this endpoint

oconst H323Capabilities& GetCapabilities() const
Get the current capability table for this endpoint

oenum TerminalTypes
Endpoint types

oTerminalTypes GetTerminalType() const
Get the endpoint terminal type

oBOOL IsTerminal() const
Determine if endpoint is terminal type

oBOOL IsGateway() const
Determine if endpoint is gateway type

oBOOL IsGatekeeper() const
Determine if endpoint is gatekeeper type

oBOOL IsMCU() const
Determine if endpoint is gatekeeper type

ounsigned GetMinAudioJitterDelay() const
Get the default maximum audio jitter delay parameter. Defaults to 50ms

ounsigned GetMaxAudioJitterDelay() const
Get the default maximum audio delay jitter parameter. Defaults to 250ms.

ovoid SetAudioJitterDelay( unsigned minDelay, unsigned maxDelay )
Set the maximum audio delay jitter parameter

ounsigned GetInitialBandwidth() const
Get the initial bandwidth parameter

ovoid SetInitialBandwidth(unsigned bandwidth)
Get the initial bandwidth parameter

oPSTUNClient* GetSTUN( const PIPSocket::Address & address = 0 ) const
Return the STUN server to use. Returns NULL if address is a local address as per IsLocalAddress(). Always returns the STUN server if address is zero. Note, the pointer is NOT to be deleted by the user.

ovoid SetSTUNServer( const PString & server )
Set the STUN server address, is of the form host[:port]

ovirtual BOOL IsLocalAddress( const PIPSocket::Address & remoteAddress ) const
Determine if the address is "local", ie does not need STUN

ovirtual void TranslateTCPAddress( PIPSocket::Address & , const PIPSocket::Address & )
Provide TCP address translation hook

oWORD GetTCPPortBase() const
Get the TCP port number base for H245 channels

oWORD GetTCPPortMax() const
Get the TCP port number base for H245 channels

ovoid SetTCPPorts(unsigned tcpBase, unsigned tcpMax)
Set the TCP port number base and max for H245 channels

oWORD GetNextTCPPort()
Get the next TCP port number for H245 channels

oWORD GetUDPPortBase() const
Get the UDP port number base for RAS channels

oWORD GetUDPPortMax() const
Get the UDP port number base for RAS channels

ovoid SetUDPPorts(unsigned udpBase, unsigned udpMax)
Set the TCP port number base and max for H245 channels

oWORD GetNextUDPPort()
Get the next UDP port number for RAS channels

oWORD GetRtpIpPortBase() const
Get the UDP port number base for RTP channels

oWORD GetRtpIpPortMax() const
Get the max UDP port number for RTP channels

ovoid SetRtpIpPorts(unsigned udpBase, unsigned udpMax)
Set the UDP port number base and max for RTP channels

oWORD GetRtpIpPortPair()
Get the UDP port number pair for RTP channels

oBYTE GetRtpIpTypeofService() const
Get the IP Type Of Service byte for RTP channels

ovoid SetRtpIpTypeofService(unsigned tos)
Set the IP Type Of Service byte for RTP channels

oconst PTimeInterval& GetSignallingChannelCallTimeout() const
Get the default timeout for calling another endpoint

oconst PTimeInterval& GetControlChannelStartTimeout() const
Get the default timeout for incoming H245 connection

oconst PTimeInterval& GetEndSessionTimeout() const
Get the default timeout for waiting on an end session

oconst PTimeInterval& GetMasterSlaveDeterminationTimeout() const
Get the default timeout for master slave negotiations

ounsigned GetMasterSlaveDeterminationRetries() const
Get the default retries for H245 master slave negotiations

oconst PTimeInterval& GetCapabilityExchangeTimeout() const
Get the default timeout for H245 capability exchange negotiations

oconst PTimeInterval& GetLogicalChannelTimeout() const
Get the default timeout for H245 logical channel negotiations

oconst PTimeInterval& GetRequestModeTimeout() const
Get the default timeout for H245 request mode negotiations

oconst PTimeInterval& GetRoundTripDelayTimeout() const
Get the default timeout for H245 round trip delay negotiations

oconst PTimeInterval& GetRoundTripDelayRate() const
Get the default rate H245 round trip delay is calculated by connection

oBOOL ShouldClearCallOnRoundTripFail() const
Get the flag for clearing a call if the round trip delay calculation fails

oconst PTimeInterval& GetNoMediaTimeout() const
Get the amount of time with no media that should cause call to clear

oBOOL SetNoMediaTimeout(PTimeInterval newInterval)
Set the amount of time with no media that should cause call to clear

oconst PTimeInterval& GetGatekeeperRequestTimeout() const
Get the default timeout for GatekeeperRequest and Gatekeeper discovery

ounsigned GetGatekeeperRequestRetries() const
Get the default retries for GatekeeperRequest and Gatekeeper discovery

oconst PTimeInterval& GetRasRequestTimeout() const
Get the default timeout for RAS protocol transactions

ounsigned GetRasRequestRetries() const
Get the default retries for RAS protocol transations

oconst PTimeInterval& GetGatekeeperTimeToLive() const
Get the default time for gatekeeper to reregister. A value of zero disables the keep alive facility.

oconst PString& GetGkAccessTokenOID() const
Get the iNow Gatekeeper Access Token OID

ovoid SetGkAccessTokenOID(const PString & token)
Set the iNow Gatekeeper Access Token OID

oconst PTimeInterval& GetCallTransferT1() const
Get the default timeout for Call Transfer Timer CT-T1

oconst PTimeInterval& GetCallTransferT2() const
Get the default timeout for Call Transfer Timer CT-T2

oconst PTimeInterval& GetCallTransferT3() const
Get the default timeout for Call Transfer Timer CT-T3

oconst PTimeInterval& GetCallTransferT4() const
Get the default timeout for Call Transfer Timer CT-T4

oconst PTimeInterval& GetCallIntrusionT1() const
Get Call Intrusion timers timeout

oPINDEX GetCleanerThreadStackSize() const
Get the default stack size of cleaner threads

oPINDEX GetListenerThreadStackSize() const
Get the default stack size of listener threads

oPINDEX GetSignallingThreadStackSize() const
Get the default stack size of signalling channel threads

oPINDEX GetControlThreadStackSize() const
Get the default stack size of control channel threads

oPINDEX GetChannelThreadStackSize() const
Get the default stack size of logical channel threads

oPINDEX GetRasThreadStackSize() const
Get the default stack size of RAS channel threads

oPINDEX GetJitterThreadStackSize() const
Get the default stack size of jitter buffer threads

oH323CallIdentityDict& GetCallIdentityDictionary()
Get the dictionary of <callIdentities, connections>

oPTimeInterval callIntrusionT1
Call Intrusion Timers


This class has no child classes.

Alphabetic index HTML hierarchy of classes or Java



This page was generated with the help of DOC++.