Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

H323Connection Class Reference

#include <h323con.h>

Inheritance diagram for H323Connection:

OpalConnection List of all members.

Construction

enum  Options {
  FastStartOptionDisable = 0x0001, FastStartOptionEnable = 0x0002, FastStartOptionMask = 0x0003, H245TunnelingOptionDisable = 0x0004,
  H245TunnelingOptionEnable = 0x0008, H245TunnelingOptionMask = 0x000c, H245inSetupOptionDisable = 0x0010, H245inSetupOptionEnable = 0x0020,
  H245inSetupOptionMask = 0x0030, DetectInBandDTMFOptionDisable = 0x0040, DetectInBandDTMFOptionEnable = 0x0080, DetectInBandDTMFOptionMask = 0x00c0
}
 H323Connection (OpalCall &call, H323EndPoint &endpoint, const PString &token, const PString &alias, const H323TransportAddress &address, unsigned options=0)
 ~H323Connection ()

Control Channel

enum  ControlProtocolErrors {
  e_MasterSlaveDetermination, e_CapabilityExchange, e_LogicalChannel, e_ModeRequest,
  e_RoundTripDelay
}
virtual BOOL CreateOutgoingControlChannel (const H225_TransportAddress &h245Address)
virtual BOOL CreateIncomingControlChannel (H225_TransportAddress &h245Address)
BOOL WriteControlPDU (const H323ControlPDU &pdu)
BOOL StartControlNegotiations ()
virtual void HandleControlChannel ()
virtual BOOL HandleControlData (PPER_Stream &strm)
virtual BOOL HandleControlPDU (const H323ControlPDU &pdu)
virtual BOOL OnUnknownControlPDU (const H323ControlPDU &pdu)
virtual BOOL OnH245Request (const H323ControlPDU &pdu)
virtual BOOL OnH245Response (const H323ControlPDU &pdu)
virtual BOOL OnH245Command (const H323ControlPDU &pdu)
virtual BOOL OnH245Indication (const H323ControlPDU &pdu)
virtual BOOL OnH245_SendTerminalCapabilitySet (const H245_SendTerminalCapabilitySet &pdu)
virtual BOOL OnH245_FlowControlCommand (const H245_FlowControlCommand &pdu)
virtual BOOL OnH245_MiscellaneousCommand (const H245_MiscellaneousCommand &pdu)
virtual BOOL OnH245_MiscellaneousIndication (const H245_MiscellaneousIndication &pdu)
virtual BOOL OnH245_JitterIndication (const H245_JitterIndication &pdu)
virtual BOOL OnControlProtocolError (ControlProtocolErrors errorSource, const void *errorData=NULL)
virtual void OnSendCapabilitySet (H245_TerminalCapabilitySet &pdu)
virtual BOOL OnReceivedCapabilitySet (const H323Capabilities &remoteCaps, const H245_MultiplexCapability *muxCap, H245_TerminalCapabilitySetReject &reject)
virtual void SendCapabilitySet (BOOL empty)
virtual void OnSetLocalCapabilities ()
BOOL IsH245Master () const
void StartRoundTripDelay ()
PTimeInterval GetRoundTripDelay () const

Public Types


Public Methods

virtual BOOL OnSendFeatureSet (unsigned, H225_FeatureSet &) const
virtual void OnReceiveFeatureSet (unsigned, const H225_FeatureSet &) const
H4507HandlergetH4507handler ()
Overrides from OpalConnection
virtual BOOL SetUpConnection ()
virtual BOOL SetAlerting (const PString &calleeName, BOOL withMedia)
virtual BOOL SetConnected ()
virtual void OnSendARQ (H225_AdmissionRequest &arq)
virtual BOOL SetProgressed ()
virtual void OnEstablished ()
virtual void OnReleased ()
virtual PString GetDestinationAddress ()
virtual OpalMediaFormatList GetMediaFormats () const
virtual BOOL OpenSourceMediaStream (const OpalMediaFormatList &mediaFormats, unsigned sessionID)
virtual OpalMediaStreamCreateMediaStream (const OpalMediaFormat &mediaFormat, unsigned sessionID, BOOL isSource)
virtual BOOL IsMediaBypassPossible (unsigned sessionID) const
virtual BOOL GetMediaInformation (unsigned sessionID, MediaInformation &info) const
Backward compatibility functions
virtual void OnCleared ()
BOOL IsEstablished () const
virtual void CleanUpOnCallEnd ()
Signalling Channel
void AttachSignalChannel (const PString &token, H323Transport *channel, BOOL answeringCall)
BOOL WriteSignalPDU (H323SignalPDU &pdu)
virtual void HandleSignallingChannel ()
virtual BOOL HandleSignalPDU (H323SignalPDU &pdu)
virtual void HandleTunnelPDU (H323SignalPDU *txPDU)
virtual BOOL OnReceivedSignalSetup (const H323SignalPDU &pdu)
virtual BOOL OnReceivedSignalSetupAck (const H323SignalPDU &pdu)
virtual BOOL OnReceivedSignalInformation (const H323SignalPDU &pdu)
virtual BOOL OnReceivedCallProceeding (const H323SignalPDU &pdu)
virtual BOOL OnReceivedProgress (const H323SignalPDU &pdu)
virtual BOOL OnReceivedAlerting (const H323SignalPDU &pdu)
virtual BOOL OnReceivedSignalConnect (const H323SignalPDU &pdu)
virtual BOOL OnReceivedFacility (const H323SignalPDU &pdu)
virtual BOOL OnReceivedSignalNotify (const H323SignalPDU &pdu)
virtual BOOL OnReceivedSignalStatus (const H323SignalPDU &pdu)
virtual BOOL OnReceivedStatusEnquiry (const H323SignalPDU &pdu)
virtual void OnReceivedReleaseComplete (const H323SignalPDU &pdu)
virtual BOOL OnUnknownSignalPDU (const H323SignalPDU &pdu)
virtual BOOL OnIncomingCall (const H323SignalPDU &setupPDU, H323SignalPDU &alertingPDU)
virtual BOOL ForwardCall (const PString &forwardParty)
void TransferCall (const PString &remoteParty, const PString &callIdentity=PString::Empty())
void ConsultationTransfer (const PString &primaryCallToken)
virtual void HandleConsultationTransfer (const PString &callIdentity, H323Connection &incoming)
BOOL IsTransferringCall () const
BOOL IsTransferredCall () const
virtual void HandleTransferCall (const PString &token, const PString &identity)
int GetCallTransferInvokeId ()
virtual void HandleCallTransferFailure (const int returnError)
void SetAssociatedCallToken (const PString &token)
virtual void OnConsultationTransferSuccess (H323Connection &secondaryCall)
virtual void TransferConnection (const PString &remoteParty, const PString &callIdentity=PString::Empty())
virtual void HoldConnection ()
virtual void RetrieveConnection ()
virtual BOOL IsConnectionOnHold ()
void HoldCall (BOOL localHold)
void RetrieveCall ()
void SetHoldMedia (PChannel *audioChannel)
BOOL IsMediaOnHold () const
BOOL IsLocalHold () const
BOOL IsRemoteHold () const
BOOL IsCallOnHold () const
virtual void IntrudeCall (unsigned capabilityLevel)
virtual void HandleIntrudeCall (const PString &token, const PString &identity)
void SetCallIntrusion ()
BOOL IsCallIntrusion ()
unsigned GetLocalCallIntrusionProtectionLevel ()
virtual BOOL GetRemoteCallIntrusionProtectionLevel (const PString &callToken, unsigned callIntrusionProtectionLevel)
virtual void SetIntrusionImpending ()
virtual void SetForcedReleaseAccepted ()
virtual void SetIntrusionNotAuthorized ()
void SendCallWaitingIndication (const unsigned nbOfAddWaitingCalls=0)
virtual AnswerCallResponse OnAnswerCall (const PString &callerName, const H323SignalPDU &setupPDU, H323SignalPDU &connectPDU, H323SignalPDU &progressPDU)
virtual AnswerCallResponse OnAnswerCall (const PString &callerName)
void AnsweringCall (AnswerCallResponse response)
virtual CallEndReason SendSignalSetup (const PString &alias, const H323TransportAddress &address)
virtual BOOL OnSendSignalSetup (H323SignalPDU &setupPDU)
virtual BOOL OnSendCallProceeding (H323SignalPDU &callProceedingPDU)
virtual BOOL OnSendReleaseComplete (H323SignalPDU &releaseCompletePDU)
virtual BOOL OnAlerting (const H323SignalPDU &alertingPDU, const PString &user)
virtual BOOL OnInsufficientDigits ()
virtual void SendMoreDigits (const PString &digits)
virtual BOOL OnOutgoingCall (const H323SignalPDU &connectPDU)
virtual BOOL SendFastStartAcknowledge (H225_ArrayOf_PASN_OctetString &array)
virtual BOOL HandleFastStartAcknowledge (const H225_ArrayOf_PASN_OctetString &array)
Logical Channel Management
virtual void OnSelectLogicalChannels ()
virtual void SelectDefaultLogicalChannel (unsigned sessionID)
virtual void SelectFastStartChannels (unsigned sessionID, BOOL transmitter, BOOL receiver)
virtual void StartFastStartChannel (unsigned sessionID, H323Channel::Directions direction)
virtual BOOL OpenLogicalChannel (const H323Capability &capability, unsigned sessionID, H323Channel::Directions dir)
virtual BOOL OnOpenLogicalChannel (const H245_OpenLogicalChannel &openPDU, H245_OpenLogicalChannelAck &ackPDU, unsigned &errorCode)
virtual BOOL OnConflictingLogicalChannel (H323Channel &channel)
virtual H323ChannelCreateLogicalChannel (const H245_OpenLogicalChannel &open, BOOL startingFast, unsigned &errorCode)
virtual H323ChannelCreateRealTimeLogicalChannel (const H323Capability &capability, H323Channel::Directions dir, unsigned sessionID, const H245_H2250LogicalChannelParameters *param, RTP_QOS *rtpqos=NULL)
virtual BOOL OnCreateLogicalChannel (const H323Capability &capability, H323Channel::Directions dir, unsigned &errorCode)
virtual BOOL OnStartLogicalChannel (H323Channel &channel)
virtual void CloseLogicalChannel (unsigned number, BOOL fromRemote)
virtual void CloseLogicalChannelNumber (const H323ChannelNumber &number)
virtual void CloseAllLogicalChannels (BOOL fromRemote)
virtual void OnClosedLogicalChannel (const H323Channel &channel)
virtual BOOL OnClosingLogicalChannel (H323Channel &channel)
virtual void OnLogicalChannelFlowControl (H323Channel *channel, long bitRateRestriction)
virtual void OnLogicalChannelJitter (H323Channel *channel, DWORD jitter, int skippedFrameCount, int additionalBuffer)
H323ChannelGetLogicalChannel (unsigned number, BOOL fromRemote) const
H323ChannelFindChannel (unsigned sessionId, BOOL fromRemote) const
Bandwidth Management
virtual BOOL SetBandwidthAvailable (unsigned newBandwidth, BOOL force=FALSE)
virtual unsigned GetBandwidthUsed () const
Indications
virtual SendUserInputModes GetRealSendUserInputMode () const
virtual BOOL SendUserInputString (const PString &value)
virtual BOOL SendUserInputTone (char tone, unsigned duration=0)
virtual BOOL SendUserInputIndicationQ931 (const PString &value)
virtual BOOL SendUserInputIndicationString (const PString &value)
virtual BOOL SendUserInputIndicationTone (char tone, unsigned duration=0, unsigned logicalChannel=0, unsigned rtpTimestamp=0)
virtual BOOL SendUserInputIndication (const H245_UserInputIndication &pdu)
virtual void OnUserInputIndication (const H245_UserInputIndication &pdu)
RTP Session Management
virtual RTP_SessionGetSession (unsigned sessionID) const
virtual H323_RTP_SessionGetSessionCallbacks (unsigned sessionID) const
virtual RTP_SessionUseSession (const OpalTransport &transport, unsigned sessionID, RTP_QOS *rtpqos=NULL)
virtual void ReleaseSession (unsigned sessionID)
virtual void OnRTPStatistics (const RTP_Session &session) const
virtual PString GetSessionCodecNames (unsigned sessionID) const
BOOL IsBehindNAT () const
Request Mode Changes
virtual BOOL RequestModeChange (const PString &newModes)
virtual BOOL RequestModeChange (const H245_ArrayOf_ModeDescription &newModes)
virtual BOOL OnRequestModeChange (const H245_RequestMode &pdu, H245_RequestModeAck &ack, H245_RequestModeReject &reject, PINDEX &selectedMode)
virtual void OnModeChanged (const H245_ModeDescription &newMode)
virtual void OnAcceptModeChange (const H245_RequestModeAck &pdu)
virtual void OnRefusedModeChange (const H245_RequestModeReject *pdu)
Other services
virtual BOOL RequestModeChangeT38 (const char *capabilityNames="T.38\nT38FaxUDP")
virtual BOOL GetAdmissionRequestAuthentication (const H225_AdmissionRequest &arq, H235Authenticators &authenticators)
Member variable access
H323EndPointGetEndPoint () const
BOOL HadAnsweredCall () const
BOOL IsGatekeeperRouted () const
unsigned GetDistinctiveRing () const
void SetDistinctiveRing (unsigned pattern)
const PString & GetCallToken () const
unsigned GetCallReference () const
const OpalGloballyUniqueIDGetCallIdentifier () const
const OpalGloballyUniqueIDGetConferenceIdentifier () const
void SetLocalPartyName (const PString &name)
const PStringList & GetLocalAliasNames () const
void SetRemotePartyInfo (const H323SignalPDU &pdu)
void SetRemoteApplication (const H225_EndpointType &pdu)
const PString GetRemotePartyCallbackURL () const
const H323CapabilitiesGetLocalCapabilities () const
const H323CapabilitiesGetRemoteCapabilities () const
unsigned GetRemoteMaxAudioDelayJitter () const
const H323TransportGetSignallingChannel () const
unsigned GetSignallingVersion () const
const H323TransportGetControlChannel () const
OpalTransportGetTransport () const
unsigned GetControlVersion () const
unsigned GetUUIEsRequested () const
void SetUUIEsRequested (unsigned mask)
const PString GetGkAccessTokenOID () const
void SetGkAccessTokenOID (const PString &oid)
const PBYTEArray & GetGkAccessTokenData () const
void SetDestExtraCallInfo (const PString &info)
void SetRemotCallWaiting (const unsigned value)
const int GetRemoteCallWaiting () const
void SetEnforcedDurationLimit (unsigned seconds)

Protected Types

enum  ConnectionStates {
  NoConnectionActive, AwaitingGatekeeperAdmission, AwaitingTransportConnect, AwaitingSignalConnect,
  AwaitingLocalAnswer, HasExecutedSignalConnect, EstablishedConnection, ShuttingDownConnection,
  NumConnectionStates
}
enum  FastStartStates {
  FastStartDisabled, FastStartInitiate, FastStartResponse, FastStartAcknowledged,
  NumFastStartStates
}

Protected Methods

virtual void InternalEstablishedConnectionCheck ()
BOOL InternalEndSessionCheck (PPER_Stream &strm)
void SetRemoteVersions (const H225_ProtocolIdentifier &id)
void MonitorCallStatus ()
 PDECLARE_NOTIFIER (PThread, H323Connection, StartOutgoing)
 PDECLARE_NOTIFIER (PThread, H323Connection, NewOutgoingControlChannel)
 PDECLARE_NOTIFIER (PThread, H323Connection, NewIncomingControlChannel)

Protected Attributes

H323EndPointendpoint
int remoteCallWaiting
BOOL gatekeeperRouted
unsigned distinctiveRing
unsigned callReference
OpalGloballyUniqueID conferenceIdentifier
PString localDestinationAddress
PStringList localAliasNames
H323Capabilities localCapabilities
PString destExtraCallInfo
H323Capabilities remoteCapabilities
unsigned remoteMaxAudioDelayJitter
PTimer roundTripDelayTimer
WORD maxAudioDelayJitter
unsigned uuiesRequested
PString gkAccessTokenOID
PBYTEArray gkAccessTokenData
BOOL addAccessTokenToSetup
BOOL alertDone
H323TransportsignallingChannel
H323TransportcontrolChannel
OpalListenercontrolListener
BOOL h245Tunneling
H323SignalPDUh245TunnelRxPDU
H323SignalPDUh245TunnelTxPDU
H323SignalPDUalertingPDU
H323SignalPDUconnectPDU
H323SignalPDUprogressPDU
enum H323Connection::ConnectionStates connectionState
unsigned h225version
unsigned h245version
BOOL h245versionSet
BOOL doH245inSETUP
BOOL lastPDUWasH245inSETUP
BOOL mustSendDRQ
BOOL mediaWaitForConnect
BOOL transmitterSidePaused
BOOL earlyStart
BOOL startT120
BOOL startH224
PString t38ModeChangeCapabilities
PSyncPoint digitsWaitFlag
BOOL endSessionNeeded
PSyncPoint endSessionReceived
PTimer enforcedDurationLimit
PChannel * holdMediaChannel
BOOL isConsultationTransfer
BOOL isCallIntrusion
unsigned callIntrusionProtectionLevel
FastStartStates fastStartState
H323LogicalChannelList fastStartChannels
OpalMediaStreamtransmitterMediaStream
H245NegMasterSlaveDeterminationmasterSlaveDeterminationProcedure
H245NegTerminalCapabilitySetcapabilityExchangeProcedure
H245NegLogicalChannelslogicalChannels
H245NegRequestModerequestModeProcedure
H245NegRoundTripDelayroundTripDelayProcedure
H450xDispatcherh450dispatcher
H4502Handlerh4502handler
H4504Handlerh4504handler
H4506Handlerh4506handler
H4507Handlerh4507handler
H45011Handlerh45011handler
BOOL remoteIsNAT

Detailed Description

This class represents a particular H323 connection between two endpoints. There are at least two threads in use, this one to look after the signalling channel, an another to look after the control channel. There would then be additional threads created for each data channel created by the control channel protocol thread.


Member Enumeration Documentation

enum H323Connection::ConnectionStates [protected]
 

Enumeration values:
NoConnectionActive 
AwaitingGatekeeperAdmission 
AwaitingTransportConnect 
AwaitingSignalConnect 
AwaitingLocalAnswer 
HasExecutedSignalConnect 
EstablishedConnection 
ShuttingDownConnection 
NumConnectionStates 

enum H323Connection::ControlProtocolErrors
 

Error discriminator for the OnControlProtocolError() function.

Enumeration values:
e_MasterSlaveDetermination 
e_CapabilityExchange 
e_LogicalChannel 
e_ModeRequest 
e_RoundTripDelay 

enum H323Connection::FastStartStates [protected]
 

Enumeration values:
FastStartDisabled 
FastStartInitiate 
FastStartResponse 
FastStartAcknowledged 
NumFastStartStates 

enum H323Connection::Options
 

Enumeration values:
FastStartOptionDisable 
FastStartOptionEnable 
FastStartOptionMask 
H245TunnelingOptionDisable 
H245TunnelingOptionEnable 
H245TunnelingOptionMask 
H245inSetupOptionDisable 
H245inSetupOptionEnable 
H245inSetupOptionMask 
DetectInBandDTMFOptionDisable 
DetectInBandDTMFOptionEnable 
DetectInBandDTMFOptionMask 


Constructor & Destructor Documentation

H323Connection::H323Connection OpalCall   call,
H323EndPoint   endpoint,
const PString &    token,
const PString &    alias,
const H323TransportAddress   address,
unsigned    options = 0
 

Create a new connection.

Parameters:
call  Call object connection belongs to
endpoint  H323 End Point object
token  Token for new connection
alias  Alias for outgoing call
address  Address for outgoing call
options  Connection option bits

H323Connection::~H323Connection  
 

Destroy the connection


Member Function Documentation

void H323Connection::AnsweringCall AnswerCallResponse    response [virtual]
 

Indicate the result of answering an incoming call. This should only be called if the OnAnswerCall() callback function has returned a AnswerCallPending or AnswerCallDeferred response.

Note sending further AnswerCallPending responses via this function will have the result of an Alerting PDU being sent to the remote endpoint. In this way multiple Alerting PDUs may be sent.

Sending a AnswerCallDeferred response would have no effect.

Parameters:
response  Answer response to incoming call

Reimplemented from OpalConnection.

void H323Connection::AttachSignalChannel const PString &    token,
H323Transport   channel,
BOOL    answeringCall
 

Attach a transport to this connection as the signalling channel.

Parameters:
token  New token to use to identify connection
channel  Transport for the PDU's
answeringCall  Flag for if incoming/outgoing call.

virtual void H323Connection::CleanUpOnCallEnd   [virtual]
 

Clean up the call clearance of the connection. This function will do any internal cleaning up and waiting on background threads that may be using the connection object. After this returns it is then safe to delete the object.

An application will not typically use this function as it is used by the H323EndPoint during a clear call.

virtual void H323Connection::CloseAllLogicalChannels BOOL    fromRemote [virtual]
 

Close a logical channel.

Parameters:
fromRemote  Indicates close request of remote channel

virtual void H323Connection::CloseLogicalChannel unsigned    number,
BOOL    fromRemote
[virtual]
 

Close a logical channel.

Parameters:
number  Channel number to close.
fromRemote  Indicates close request of remote channel

virtual void H323Connection::CloseLogicalChannelNumber const H323ChannelNumber   number [virtual]
 

Close a logical channel by number.

Parameters:
number  Channel number to close.

void H323Connection::ConsultationTransfer const PString &    primaryCallToken
 

Transfer the call through consultation so the remote party in the primary call is connected to the called party in the second call using H.450.2. This sends a Call Transfer Identify Invoke message from the A-Party (transferring endpoint) to the C-Party (transferred-to endpoint).

Parameters:
primaryCallToken  Primary call

virtual BOOL H323Connection::CreateIncomingControlChannel H225_TransportAddress   h245Address [virtual]
 

Start a separate control channel. This function is called from one of a number of functions when it needs to listen for an incoming H.245 connection.

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

The default behaviour checks to see if it is a known transport and creates a corresponding OpalTransport decendent for the control channel.

Parameters:
h245Address  PDU transport address to set

virtual H323Channel* H323Connection::CreateLogicalChannel const H245_OpenLogicalChannel   open,
BOOL    startingFast,
unsigned &    errorCode
[virtual]
 

Create a new logical channel object. This is in response to a request from the remote endpoint to open a logical channel.

Parameters:
open  Parameters for opening channel
startingFast  Flag for fast/slow starting.
errorCode  Reason for create failure

virtual OpalMediaStream* H323Connection::CreateMediaStream const OpalMediaFormat   mediaFormat,
unsigned    sessionID,
BOOL    isSource
[virtual]
 

Open a new media stream. This will create a media stream of an appropriate subclass as required by the underlying connection protocol. For instance H.323 would create an OpalRTPStream.

The sessionID parameter may not be needed by a particular media stream and may be ignored. In the case of an OpalRTPStream it us used.

Note that media streams may be created internally to the underlying protocol. This function is not the only way a stream can come into existance.

The default behaviour is pure.

Parameters:
mediaFormat  Media format for stream
sessionID  Session number for stream
isSource  Is a source stream

Reimplemented from OpalConnection.

virtual BOOL H323Connection::CreateOutgoingControlChannel const H225_TransportAddress   h245Address [virtual]
 

Start a separate H245 channel. This function is called from one of a number of functions after it receives a PDU from the remote endpoint that has a h245Address field.

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

The default behaviour checks to see if it is a known transport and creates a corresponding H323Transport decendent for the control channel.

Parameters:
h245Address  H245 address

virtual H323Channel* H323Connection::CreateRealTimeLogicalChannel const H323Capability   capability,
H323Channel::Directions    dir,
unsigned    sessionID,
const H245_H2250LogicalChannelParameters   param,
RTP_QOS   rtpqos = NULL
[virtual]
 

Create a new real time logical channel object. This creates a logical channel for handling RTP data. It is primarily used to allow an application to redirect the RTP media streams to other hosts to the local one. In that case it would create an instance of the H323_ExternalRTPChannel class with the appropriate address. eg:

H323Channel * MyConnection::CreateRealTimeLogicalChannel( const H323Capability & capability, H323Channel::Directions dir, unsigned sessionID, const H245_H2250LogicalChannelParameters * param) { return new H323_ExternalRTPChannel(*this, capability, dir, sessionID, externalIpAddress, externalPort); }

An application would typically also override the OnStartLogicalChannel() function to obtain from the H323_ExternalRTPChannel instance the address of the remote endpoints media server RTP addresses to complete the setting up of the external RTP stack. eg:

BOOL OnStartLogicalChannel(H323Channel & channel) { H323_ExternalRTPChannel & external = (H323_ExternalRTPChannel &)channel; external.GetRemoteAddress(remoteIpAddress, remotePort); }

Note that the port in the above example is always the data port, the control port is assumed to be data+1.

The default behaviour assures there is an RTP session for the session ID, and if not creates one, then creates a H323_RTPChannel which will do RTP media to the local host.

Parameters:
capability  Capability creating channel
dir  Direction of channel
sessionID  Session ID for RTP channel
param  Parameters for channel
rtpqos  QoS for RTP

H323Channel* H323Connection::FindChannel unsigned    sessionId,
BOOL    fromRemote
const
 

Find a logical channel. Locates a channel give a RTP session ID. Each session would usually have two logical channels associated with it, so the fromRemote flag bay be used to distinguish which channel to return.

Parameters:
sessionId  Session ID to search for.
fromRemote  Indicates the direction of RTP data.

virtual BOOL H323Connection::ForwardCall const PString &    forwardParty [virtual]
 

Forward incoming call to specified address. This would typically be called from within the OnIncomingCall() function when an application wishes to redirct an unwanted incoming call.

The return value is TRUE if the call is to be forwarded, FALSE otherwise. Note that if the call is forwarded the current connection is cleared with the ended call code of EndedByCallForwarded.

Parameters:
forwardParty  Party to forward call to.

Reimplemented from OpalConnection.

virtual BOOL H323Connection::GetAdmissionRequestAuthentication const H225_AdmissionRequest   arq,
H235Authenticators &    authenticators
[virtual]
 

Get separate H.235 authentication for the connection. This allows an individual ARQ to override the authentical credentials used in H.235 based RAS for this particular connection.

A return value of FALSE indicates to use the default credentials of the endpoint, while TRUE indicates that new credentials are to be used.

The default behavour does nothing and returns FALSE.

Parameters:
arq  ARQ being constructed
authenticators  New authenticators for ARQ

virtual unsigned H323Connection::GetBandwidthUsed   [virtual]
 

Get the bandwidth currently used. This totals the open channels and returns the total bandwidth used in 100's of bits/sec

Reimplemented from OpalConnection.

const OpalGloballyUniqueID& H323Connection::GetCallIdentifier   const [inline]
 

Get the call identifier for this connection. preserved for backwards compatibility with OpenH323 only

unsigned H323Connection::GetCallReference   const [inline]
 

Get the call reference for this connection.

const PString& H323Connection::GetCallToken   const [inline]
 

Get the internal OpenH323 call token for this connection. Deprecated, only used for backward compatibility.

int H323Connection::GetCallTransferInvokeId  
 

Get transfer invoke ID dureing trasfer. This is an internal function and it is not expected the user will call it directly.

const OpalGloballyUniqueID& H323Connection::GetConferenceIdentifier   const [inline]
 

Get the conference identifier for this connection.

const H323Transport& H323Connection::GetControlChannel  
 

Get the control channel being used (may return signalling channel).

unsigned H323Connection::GetControlVersion   const [inline]
 

Get the control channel protocol version number.

virtual PString H323Connection::GetDestinationAddress   [virtual]
 

Get the destination address of an incoming connection. This will, for example, collect a phone number from a POTS line, or get the fields from the H.225 SETUP pdu in a H.323 connection.

Reimplemented from OpalConnection.

unsigned H323Connection::GetDistinctiveRing   const [inline]
 

Get the distinctive ring code for incoming call. This returns an integer from 0 to 7 that may indicate to an application that different ring cadences are to be used.

H323EndPoint& H323Connection::GetEndPoint   const [inline]
 

Get the owner endpoint for this connection.

Reimplemented from OpalConnection.

const PBYTEArray& H323Connection::GetGkAccessTokenData   const [inline]
 

Get the iNow Gatekeeper Access Token data.

const PString H323Connection::GetGkAccessTokenOID   const [inline]
 

Get the iNow Gatekeeper Access Token OID.

H4507Handler& H323Connection::getH4507handler   [inline]
 

get the H4507 handler

Returns:
a reference to the H4507 handler

const PStringList& H323Connection::GetLocalAliasNames   const [inline]
 

Get the list of all alias names this connection is using.

unsigned H323Connection::GetLocalCallIntrusionProtectionLevel   [inline]
 

Get Call Intrusion Protection Level of the local endpoint.

const H323Capabilities& H323Connection::GetLocalCapabilities   const [inline]
 

Get the remotes capability table for this connection.

H323Channel* H323Connection::GetLogicalChannel unsigned    number,
BOOL    fromRemote
const
 

Get a logical channel. Locates the specified channel number and returns a pointer to it.

Parameters:
number  Channel number to get.
fromRemote  Indicates get a remote channel

virtual OpalMediaFormatList H323Connection::GetMediaFormats   [virtual]
 

Get the data formats this connection is capable of operating. This provides a list of media data format names that an OpalMediaStream may be created in within this connection.

The default behaviour returns media data format names contained in the remote capability table.

Implements OpalConnection.

virtual BOOL H323Connection::GetMediaInformation unsigned    sessionID,
MediaInformation &    info
const [virtual]
 

Get information on the media channel for the connection. The default behaviour returns TRUE and fills the info structure if there is a media channel active for the sessionID.

Parameters:
sessionID  Session ID for media channel
info  Information on media channel

Reimplemented from OpalConnection.

virtual SendUserInputModes H323Connection::GetRealSendUserInputMode   [virtual]
 

Get the real user input indication transmission mode. This will return the user input mode that will actually be used for transmissions. It will be the value of GetSendUserInputMode() provided the remote endpoint is capable of that mode.

Reimplemented from OpalConnection.

virtual BOOL H323Connection::GetRemoteCallIntrusionProtectionLevel const PString &    callToken,
unsigned    callIntrusionProtectionLevel
[virtual]
 

Get Call Intrusion Protection Level of other endpoints that we are in connection with.

const int H323Connection::GetRemoteCallWaiting   const [inline]
 

How many caller's are waiting on the remote endpoint? -1 - None 0 - Just this connection n - n plus this connection

const H323Capabilities& H323Connection::GetRemoteCapabilities   const [inline]
 

Get the remotes capability table for this connection.

unsigned H323Connection::GetRemoteMaxAudioDelayJitter   const [inline]
 

Get the maximum audio jitter delay.

const PString H323Connection::GetRemotePartyCallbackURL   [virtual]
 

Get the remote party address. This will return the "best guess" at an address to use in a to call the user again later.

Reimplemented from OpalConnection.

PTimeInterval H323Connection::GetRoundTripDelay  
 

Get the round trip delay over the control channel.

virtual RTP_Session* H323Connection::GetSession unsigned    sessionID const [virtual]
 

Get an RTP session for the specified ID. If there is no session of the specified ID, NULL is returned.

Reimplemented from OpalConnection.

virtual H323_RTP_Session* H323Connection::GetSessionCallbacks unsigned    sessionID const [virtual]
 

Get an H323 RTP session for the specified ID. If there is no session of the specified ID, NULL is returned.

virtual PString H323Connection::GetSessionCodecNames unsigned    sessionID const [virtual]
 

Get the names of the codecs in use for the RTP session. If there is no session of the specified ID, an empty string is returned.

const H323Transport* H323Connection::GetSignallingChannel   const [inline]
 

Get the signalling channel being used.

unsigned H323Connection::GetSignallingVersion   const [inline]
 

Get the signalling channel protocol version number.

OpalTransport& H323Connection::GetTransport   [virtual]
 

Get the control channel being used (may return signalling channel).

Reimplemented from OpalConnection.