H323Connection Class Reference

#include <h323con.h>

List of all members.

Public Types

enum  ReleaseSequence { ReleaseSequenceUnknown, ReleaseSequence_Local, ReleaseSequence_Remote }

Public Member Functions

virtual BOOL OnSendFeatureSet (unsigned, H225_FeatureSet &) const
virtual void OnReceiveFeatureSet (unsigned, const H225_FeatureSet &) const
ReleaseSequence GetReleaseSequence () const
Logical Channel Management
virtual void OnSelectLogicalChannels ()
virtual void SelectDefaultLogicalChannel (unsigned sessionID)
virtual void SelectFastStartChannels (unsigned sessionID, BOOL transmitter, BOOL receiver)
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 BOOL OpenAudioChannel (BOOL isEncoding, unsigned bufferSize, H323AudioCodec &codec)
virtual BOOL OpenVideoChannel (BOOL isEncoding, H323VideoCodec &codec)
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)
void SendLogicalChannelMiscCommand (H323Channel &channel, unsigned command)
H323ChannelGetLogicalChannel (unsigned number, BOOL fromRemote) const
H323ChannelFindChannel (unsigned sessionId, BOOL fromRemote) const
Bandwidth Management
unsigned GetBandwidthUsed () const
BOOL UseBandwidth (unsigned bandwidth, BOOL removing)
unsigned GetBandwidthAvailable () const
BOOL SetBandwidthAvailable (unsigned newBandwidth, BOOL force=FALSE)
RTP Session Management
virtual RTP_SessionGetSession (unsigned sessionID) const
virtual H323_RTP_SessionGetSessionCallbacks (unsigned sessionID) const
virtual RTP_SessionUseSession (unsigned sessionID, const H245_TransportAddress &pdu, H323Channel::Directions dir, 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 OpalT120ProtocolCreateT120ProtocolHandler ()
virtual OpalT38ProtocolCreateT38ProtocolHandler ()
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 GetQ931Cause () const
void SetQ931Cause (unsigned v)
unsigned GetDistinctiveRing () const
void SetDistinctiveRing (unsigned pattern)
const PString & GetCallToken () const
unsigned GetCallReference () const
const OpalGloballyUniqueIDGetCallIdentifier () const
const OpalGloballyUniqueIDGetConferenceIdentifier () const
const PString & GetLocalPartyName () const
void SetLocalPartyName (const PString &name)
void SetDisplayName (const PString &name)
const PString GetDisplayName () const
const PStringList & GetLocalAliasNames () const
const PString & GetRemotePartyName () const
const PString & GetRemotePartyNumber () const
const PString & GetRemotePartyAddress () const
void SetRemotePartyInfo (const H323SignalPDU &pdu)
const PString & GetRemoteApplication () const
void SetRemoteApplication (const H225_EndpointType &pdu)
const H323CapabilitiesGetLocalCapabilities () const
const H323CapabilitiesGetRemoteCapabilities () const
unsigned GetRemoteMaxAudioDelayJitter () const
const H323TransportGetSignallingChannel () const
unsigned GetSignallingVersion () const
const H323TransportGetControlChannel () const
unsigned GetControlVersion () const
PTime GetSetupUpTime () const
PTime GetAlertingTime () const
PTime GetConnectionStartTime () const
PTime GetConnectionEndTime () const
PTime GetReverseMediaOpenTime () const
unsigned GetMinAudioJitterDelay () const
unsigned GetMaxAudioJitterDelay () const
void SetAudioJitterDelay (unsigned minDelay, unsigned maxDelay)
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 Member Functions

virtual void InternalEstablishedConnectionCheck ()
BOOL DecodeFastStartCaps (const H225_ArrayOf_PASN_OctetString &fastStartCaps)
BOOL InternalEndSessionCheck (PPER_Stream &strm)
void SetRemoteVersions (const H225_ProtocolIdentifier &id)
void MonitorCallStatus ()
 PDECLARE_NOTIFIER (OpalRFC2833Info, H323Connection, OnUserInputInlineRFC2833)
 PDECLARE_NOTIFIER (H323Codec::FilterInfo, H323Connection, OnUserInputInBandDTMF)

Protected Attributes

H323EndPointendpoint
PSyncPoint * endSync
int remoteCallWaiting
BOOL callAnswered
BOOL gatekeeperRouted
unsigned distinctiveRing
PString callToken
unsigned callReference
OpalGloballyUniqueID callIdentifier
OpalGloballyUniqueID conferenceIdentifier
PStringList localAliasNames
PString localPartyName
PString localDisplayName
H323Capabilities localCapabilities
PString remotePartyName
PString remotePartyNumber
PString remotePartyAddress
PString destExtraCallInfo
PString remoteApplication
H323Capabilities remoteCapabilities
unsigned remoteMaxAudioDelayJitter
PTimer roundTripDelayTimer
unsigned minAudioJitterDelay
unsigned maxAudioJitterDelay
unsigned bandwidthAvailable
unsigned uuiesRequested
PString gkAccessTokenOID
PBYTEArray gkAccessTokenData
BOOL addAccessTokenToSetup
SendUserInputModes sendUserInputMode
H323TransportsignallingChannel
H323TransportcontrolChannel
BOOL h245Tunneling
H323SignalPDUh245TunnelRxPDU
H323SignalPDUh245TunnelTxPDU
H323SignalPDUalertingPDU
H323SignalPDUconnectPDU
enum
H323Connection::ConnectionStates 
connectionState
PTime setupTime
PTime alertingTime
PTime connectedTime
PTime callEndTime
PTime reverseMediaOpenTime
CallEndReason callEndReason
unsigned q931Cause
ReleaseSequence releaseSequence
unsigned h225version
unsigned h245version
BOOL h245versionSet
BOOL doH245inSETUP
BOOL lastPDUWasH245inSETUP
BOOL detectInBandDTMF
BOOL mustSendDRQ
BOOL mediaWaitForConnect
BOOL transmitterSidePaused
BOOL earlyStart
BOOL startT120
PString t38ModeChangeCapabilities
PSyncPoint digitsWaitFlag
BOOL endSessionNeeded
BOOL endSessionSent
PSyncPoint endSessionReceived
PTimer enforcedDurationLimit
PChannel * holdMediaChannel
BOOL isConsultationTransfer
BOOL isCallIntrusion
unsigned callIntrusionProtectionLevel
RTP_SessionManager rtpSessions
FastStartStates fastStartState
H323LogicalChannelList fastStartChannels
H245NegMasterSlaveDeterminationmasterSlaveDeterminationProcedure
H245NegTerminalCapabilitySetcapabilityExchangeProcedure
H245NegLogicalChannelslogicalChannels
H245NegRequestModerequestModeProcedure
H245NegRoundTripDelayroundTripDelayProcedure
H450xDispatcherh450dispatcher
H4502Handlerh4502handler
H4504Handlerh4504handler
H4506Handlerh4506handler
H45011Handlerh45011handler
OpalRFC2833rfc2833handler
OpalT120Protocolt120handler
OpalT38Protocolt38handler
BOOL remoteIsNAT

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
}
enum  CallEndReason {
  EndedByLocalUser, EndedByNoAccept, EndedByAnswerDenied, EndedByRemoteUser,
  EndedByRefusal, EndedByNoAnswer, EndedByCallerAbort, EndedByTransportFail,
  EndedByConnectFail, EndedByGatekeeper, EndedByNoUser, EndedByNoBandwidth,
  EndedByCapabilityExchange, EndedByCallForwarded, EndedBySecurityDenial, EndedByLocalBusy,
  EndedByLocalCongestion, EndedByRemoteBusy, EndedByRemoteCongestion, EndedByUnreachable,
  EndedByNoEndPoint, EndedByHostOffline, EndedByTemporaryFailure, EndedByQ931Cause,
  EndedByDurationLimit, EndedByInvalidConferenceID, EndedByOSPRefusal, EndedByInvalidNumberFormat,
  EndedByUnspecifiedProtocolError, NumCallEndReasons
}
 H323Connection (H323EndPoint &endpoint, unsigned callReference, unsigned options=0)
 ~H323Connection ()
BOOL Lock ()
int TryLock ()
void Unlock ()
virtual void OnSendARQ (H225_AdmissionRequest &arq)
virtual void OnEstablished ()
virtual void OnCleared ()
BOOL IsConnected () const
BOOL IsEstablished () const
CallEndReason GetCallEndReason () const
virtual void SetCallEndReason (CallEndReason reason, PSyncPoint *sync=NULL)
virtual BOOL ClearCall (CallEndReason reason=EndedByLocalUser)
virtual BOOL ClearCallSynchronous (PSyncPoint *sync, CallEndReason reason=EndedByLocalUser)
virtual void CleanUpOnCallEnd ()

Signalling Channel

enum  AnswerCallResponse {
  AnswerCallNow, AnswerCallDenied, AnswerCallPending, AnswerCallDeferred,
  AnswerCallAlertWithMedia, AnswerCallDeferredWithMedia, AnswerCallDeniedByInvalidCID, NumAnswerCallResponses
}
virtual 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 OnIncomingCall (const H323SignalPDU &setupPDU, H323SignalPDU &alertingPDU, CallEndReason &reason)
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)
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)
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)
virtual BOOL StartControlChannel ()
virtual BOOL StartControlChannel (const H225_TransportAddress &h245Address)

Control Channel

enum  ControlProtocolErrors {
  e_MasterSlaveDetermination, e_CapabilityExchange, e_LogicalChannel, e_ModeRequest,
  e_RoundTripDelay
}
BOOL WriteControlPDU (const H323ControlPDU &pdu)
virtual BOOL StartControlNegotiations (BOOL renegotiate=FALSE)
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

Indications

enum  SendUserInputModes {
  SendUserInputAsQ931, SendUserInputAsString, SendUserInputAsTone, SendUserInputAsInlineRFC2833,
  SendUserInputAsSeparateRFC2833, NumSendUserInputModes
}
void SetSendUserInputMode (SendUserInputModes mode)
SendUserInputModes GetSendUserInputMode () const
SendUserInputModes GetRealSendUserInputMode () const
virtual void SendUserInput (const PString &value)
virtual void OnUserInputString (const PString &value)
virtual void SendUserInputTone (char tone, unsigned duration=0, unsigned logicalChannel=0, unsigned rtpTimestamp=0)
virtual void OnUserInputTone (char tone, unsigned duration, unsigned logicalChannel, unsigned rtpTimestamp)
void SendUserInputHookFlash (int duration=500)
virtual void SendUserInputIndicationQ931 (const PString &value)
virtual void SendUserInputIndicationString (const PString &value)
virtual void SendUserInputIndicationTone (char tone, unsigned duration=0, unsigned logicalChannel=0, unsigned rtpTimestamp=0)
virtual void SendUserInputIndication (const H245_UserInputIndication &pdu)
virtual void OnUserInputIndication (const H245_UserInputIndication &pdu)


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

Enumerator:
AnswerCallNow  Answer the call continuing with the connection.
AnswerCallDenied  Refuse the call sending a release complete.
AnswerCallPending  Send an Alerting PDU and wait for AnsweringCall().
AnswerCallDeferred  As for AnswerCallPending but does not send Alerting PDU.
AnswerCallAlertWithMedia  As for AnswerCallPending but starts media channels.
AnswerCallDeferredWithMedia  As for AnswerCallDeferred but starts media channels.
AnswerCallDeniedByInvalidCID  As for AnswerCallDenied but returns e_invalidCID.
NumAnswerCallResponses 

Call clearance reasons. NOTE: if anything is added to this, you also need to add the field to the tables in h323.cxx and h323pdu.cxx.

Enumerator:
EndedByLocalUser  Local endpoint application cleared call.
EndedByNoAccept  Local endpoint did not accept call OnIncomingCall()=FALSE.
EndedByAnswerDenied  Local endpoint declined to answer call.
EndedByRemoteUser  Remote endpoint application cleared call.
EndedByRefusal  Remote endpoint refused call.
EndedByNoAnswer  Remote endpoint did not answer in required time.
EndedByCallerAbort  Remote endpoint stopped calling.
EndedByTransportFail  Transport error cleared call.
EndedByConnectFail  Transport connection failed to establish call.
EndedByGatekeeper  Gatekeeper has cleared call.
EndedByNoUser  Call failed as could not find user (in GK).
EndedByNoBandwidth  Call failed as could not get enough bandwidth.
EndedByCapabilityExchange  Could not find common capabilities.
EndedByCallForwarded  Call was forwarded using FACILITY message.
EndedBySecurityDenial  Call failed a security check and was ended.
EndedByLocalBusy  Local endpoint busy.
EndedByLocalCongestion  Local endpoint congested.
EndedByRemoteBusy  Remote endpoint busy.
EndedByRemoteCongestion  Remote endpoint congested.
EndedByUnreachable  Could not reach the remote party.
EndedByNoEndPoint  The remote party is not running an endpoint.
EndedByHostOffline  The remote party host off line.
EndedByTemporaryFailure  The remote failed temporarily app may retry.
EndedByQ931Cause  The remote ended the call with unmapped Q.931 cause code.
EndedByDurationLimit  Call cleared due to an enforced duration limit.
EndedByInvalidConferenceID  Call cleared due to invalid conference ID.
EndedByOSPRefusal  Call cleared as OSP server unable or unwilling to route.
EndedByInvalidNumberFormat  Call cleared as number was invalid format.
EndedByUnspecifiedProtocolError  Call cleared due to unspecified protocol error.
NumCallEndReasons 

Enumerator:
NoConnectionActive 
AwaitingGatekeeperAdmission 
AwaitingTransportConnect 
AwaitingSignalConnect 
AwaitingLocalAnswer 
HasExecutedSignalConnect 
EstablishedConnection 
ShuttingDownConnection 
NumConnectionStates 

Error discriminator for the OnControlProtocolError() function.

Enumerator:
e_MasterSlaveDetermination 
e_CapabilityExchange 
e_LogicalChannel 
e_ModeRequest 
e_RoundTripDelay 

Enumerator:
FastStartDisabled 
FastStartInitiate 
FastStartResponse 
FastStartAcknowledged 
NumFastStartStates 

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

Enumerator:
ReleaseSequenceUnknown 
ReleaseSequence_Local 
ReleaseSequence_Remote 

Enumerator:
SendUserInputAsQ931 
SendUserInputAsString 
SendUserInputAsTone 
SendUserInputAsInlineRFC2833 
SendUserInputAsSeparateRFC2833 
NumSendUserInputModes 


Constructor & Destructor Documentation

H323Connection::H323Connection ( H323EndPoint endpoint,
unsigned  callReference,
unsigned  options = 0 
)

Create a new connection.

Parameters:
endpoint H323 End Point object
callReference Call reference
options Connection option bits

H323Connection::~H323Connection (  ) 

Destroy the connection


Member Function Documentation

void H323Connection::AnsweringCall ( AnswerCallResponse  response  ) 

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

virtual void H323Connection::AttachSignalChannel ( const PString &  token,
H323Transport channel,
BOOL  answeringCall 
) [virtual]

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 BOOL H323Connection::ClearCall ( CallEndReason  reason = EndedByLocalUser  )  [virtual]

Clear a current connection. This hangs up the connection to a remote endpoint. It actually just calls the endpoint version of the ClearCall() function to avoid possible multithreading race conditions.

Parameters:
reason Reason for call clearing

virtual BOOL H323Connection::ClearCallSynchronous ( PSyncPoint *  sync,
CallEndReason  reason = EndedByLocalUser 
) [virtual]

Clear a current connection, synchronously

Parameters:
reason Reason for call clearing

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 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 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, RTP_QOS * rtpqos) { 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

virtual OpalT120Protocol* H323Connection::CreateT120ProtocolHandler (  )  [virtual]

Create an instance of the T.120 protocol handler. This is called when the OpenLogicalChannel subsystem requires that a T.120 channel be established.

Note that if the application overrides this and returns a pointer to a heap variable (using new) then it is the responsibility of the creator to subsequently delete the object. The user of this function (the H323_T120Channel class) will not do so.

The default behavour returns H323Endpoint::CreateT120ProtocolHandler() while keeping track of that variable for autmatic deletion.

virtual OpalT38Protocol* H323Connection::CreateT38ProtocolHandler (  )  [virtual]

Create an instance of the T.38 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 and returns a pointer to a heap variable (using new) then it is the responsibility of the creator to subsequently delete the object. The user of this function (the H323_T38Channel class) will not do so.

The default behavour returns H323Endpoint::CreateT38ProtocolHandler() while keeping track of that variable for autmatic deletion.

BOOL H323Connection::DecodeFastStartCaps ( const H225_ArrayOf_PASN_OctetString fastStartCaps  )  [protected]

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.

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

PTime H323Connection::GetAlertingTime (  )  const [inline]

Get the time at which the ALERTING was received

References alertingTime.

unsigned H323Connection::GetBandwidthAvailable (  )  const [inline]

Get the available bandwidth in 100's of bits/sec.

References bandwidthAvailable.

unsigned H323Connection::GetBandwidthUsed (  )  const

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

CallEndReason H323Connection::GetCallEndReason (  )  const [inline]

Get the call clearand reason for this connection shutting down. Note that this function is only generally useful in the H323EndPoint::OnConnectionCleared() function. This is due to the connection not being cleared before that, and the object not even exiting after that.

If the call is still active then this will return NumCallEndReasons.

References callEndReason.

const OpalGloballyUniqueID& H323Connection::GetCallIdentifier (  )  const [inline]

Get the call identifier for this connection.

References callIdentifier.

unsigned H323Connection::GetCallReference (  )  const [inline]

Get the call reference for this connection.

References callReference.

const PString& H323Connection::GetCallToken (  )  const [inline]

Get the internal OpenH323 call token for this connection.

References callToken.

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.

References conferenceIdentifier.

PTime H323Connection::GetConnectionEndTime (  )  const [inline]

Get the time at which the connection was cleared

References callEndTime.

PTime H323Connection::GetConnectionStartTime (  )  const [inline]

Get the time at which the connection was connected. That is the point at which charging is likely to have begun.

References connectedTime.

const H323Transport& H323Connection::GetControlChannel (  )  const

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

unsigned H323Connection::GetControlVersion (  )  const [inline]

Get the control channel protocol version number.

References h245version.

const PString H323Connection::GetDisplayName (  )  const [inline]

Get the local Q.931 display name

References localDisplayName.

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.

References distinctiveRing.

H323EndPoint& H323Connection::GetEndPoint (  )  const [inline]

Get the owner endpoint for this connection.

References endpoint.

const PBYTEArray& H323Connection::GetGkAccessTokenData (  )  const [inline]

Get the iNow Gatekeeper Access Token data.

References gkAccessTokenData.

const PString H323Connection::GetGkAccessTokenOID (  )  const [inline]

Get the iNow Gatekeeper Access Token OID.

References gkAccessTokenOID.

const PStringList& H323Connection::GetLocalAliasNames (  )  const [inline]

References localAliasNames.

unsigned H323Connection::GetLocalCallIntrusionProtectionLevel (  )  [inline]

Get Call Intrusion Protection Level of the local endpoint.

References callIntrusionProtectionLevel.

const H323Capabilities& H323Connection::GetLocalCapabilities (  )  const [inline]

Get the remotes capability table for this connection.

References localCapabilities.

const PString& H323Connection::GetLocalPartyName (  )  const [inline]

Get the local name/alias.

References localPartyName.

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

unsigned H323Connection::GetMaxAudioJitterDelay (  )  const [inline]

Get the default maximum audio delay jitter parameter. Defaults to 250ms.

References maxAudioJitterDelay.

unsigned H323Connection::GetMinAudioJitterDelay (  )  const [inline]

Get the default maximum audio jitter delay parameter. Defaults to 50ms

References minAudioJitterDelay.

unsigned H323Connection::GetQ931Cause (  )  const [inline]

Get the Q.931 cause code (Q.850) that terminated this call. See Q931::CauseValues for common values.

References q931Cause.

SendUserInputModes H323Connection::GetRealSendUserInputMode (  )  const

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.

ReleaseSequence H323Connection::GetReleaseSequence (  )  const [inline]

References releaseSequence.

const PString& H323Connection::GetRemoteApplication (  )  const [inline]

Get the remote application name and version. This information is obtained from the sourceInfo field of the H.225 Setup PDU or the destinationInfo of the call proceeding or alerting PDU's. The general format of the string will be information extracted from the VendorIdentifier field of the EndpointType. In particular:

productId <tab> versionId <tab> t35CountryCode/manufacturerCode

for example "Equivalence OpenPhone\t1.4.2\t9/61"

References remoteApplication.

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

References remoteCallWaiting.

const H323Capabilities& H323Connection::GetRemoteCapabilities (  )  const [inline]

Get the remotes capability table for this connection.

References remoteCapabilities.

unsigned H323Connection::GetRemoteMaxAudioDelayJitter (  )  const [inline]

Get the maximum audio jitter delay.

References remoteMaxAudioDelayJitter.

const PString& H323Connection::GetRemotePartyAddress (  )  const [inline]

Get the remote party address. This will return the "best guess" at an address to use in a H323EndPoint::MakeCall() function to call the remote party back again. Note that due to the presence of gatekeepers/proxies etc this may not always be accurate.

References remotePartyAddress.

const PString& H323Connection::GetRemotePartyName (  )  const [inline]

Get the remote party name. This returns a string indicating the remote parties names and aliases. This can be a complicated string containing all the aliases and the remote host name. For example: "Fred Nurk (fred, 5551234) [fred.nurk.com]"

References remotePartyName.

const PString& H323Connection::GetRemotePartyNumber (  )  const [inline]

Get the remote party number, if there was one one. If the remote party has indicated an e164 number as one of its aliases or as a field in the Q.931 PDU, then this function will return it.

References remotePartyNumber.

PTime H323Connection::GetReverseMediaOpenTime (  )  const [inline]

Get the time at which the remote opened a media channel

References reverseMediaOpenTime.

PTimeInterval H323Connection::GetRoundTripDelay (  )  const

Get the round trip delay over the control channel.

SendUserInputModes H323Connection::GetSendUserInputMode (  )  const [inline]

Get the user input indication transmission mode.

References sendUserInputMode.

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.

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.

PTime H323Connection::GetSetupUpTime (  )  const [inline]

Get the time at which the connection was begun

References setupTime.

const H323Transport* H323Connection::GetSignallingChannel (  )  const [inline]

Get the signalling channel being used.

References signallingChannel.

unsigned H323Connection::GetSignallingVersion (  )  const [inline]

Get the signalling channel protocol version number.

References h225version.

unsigned H323Connection::GetUUIEsRequested (  )  const [inline]

Get the UUIE PDU monitor bit mask.

References uuiesRequested.

BOOL H323Connection::HadAnsweredCall (  )  const [inline]

Get the call direction for this connection.

References callAnswered.

virtual void H323Connection::HandleCallTransferFailure ( const int  returnError  )  [virtual]

Handle the failure of a call transfer operation at the Transferred Endpoint. This method is used to handle the following transfer failure cases that can occur at the Transferred Endpoint. The cases are: Reception of an Admission Reject Reception of a callTransferSetup return error APDU. Expiry of Call Transfer timer CT-T4.

Parameters:
returnError Failure reason code

virtual void H323Connection::HandleConsultationTransfer ( const PString &  callIdentity,
H323Connection incoming 
) [virtual]

Handle the reception of a callTransferSetupInvoke APDU whilst a secondary call exists. This method checks whether the secondary call is still waiting for a callTransferSetupInvoke APDU and proceeds to clear the call if the call identies match. This is an internal function and it is not expected the user will call it directly.

Parameters:
incoming Call Identity of secondary call received in SETUP Message. Connection upon which SETUP PDU was received.

virtual void H323Connection::HandleControlChannel (  )  [virtual]

Handle reading data on the control channel.

virtual BOOL H323Connection::HandleControlData ( PPER_Stream &  strm  )  [virtual]

Handle incoming data on the control channel. This decodes the data stream into a PDU and calls HandleControlPDU().

If FALSE is returned the connection is aborted. The default behaviour returns TRUE.

virtual BOOL H323Connection::HandleControlPDU ( const H323ControlPDU pdu  )  [virtual]

Handle incoming PDU's on the control channel. Dispatches them to the various virtuals off this class.

If FALSE is returned the connection is aborted. The default behaviour returns TRUE.

virtual BOOL H323Connection::HandleFastStartAcknowledge ( const H225_ArrayOf_PASN_OctetString array  )  [virtual]

Handle the acknowldege of a fast start. This function is called from one of a number of functions after it receives a PDU from the remote endpoint that has a fastStart field. It is in response to a request for a fast strart from the local endpoint.

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

The default behaviour parses the provided array and starts the channels acknowledged in it.

Parameters:
array Array of H245_OpenLogicalChannel

virtual void H323Connection::HandleIntrudeCall ( const PString &  token,
const PString &  identity 
) [virtual]

Handle an incoming call instrusion request. Calls h45011handler->AwaitSetupResponse where we set Handler state to CI-Wait-Ack

virtual void H323Connection::HandleSignallingChannel (  )  [virtual]

Handle reading PDU's from the signalling channel. This is an internal function and is unlikely to be used by applications.

virtual BOOL H323Connection::HandleSignalPDU ( H323SignalPDU pdu  )  [virtual]

Handle PDU from the signalling channel. This is an internal function and is unlikely to be used by applications.

Parameters:
pdu PDU to handle.

virtual void H323Connection::HandleTransferCall ( const PString &  token,
const PString &  identity 
) [virtual]

Handle the transfer of an existing connection to a new remote. This is an internal function and it is not expected the user will call it directly.

virtual void H323Connection::HandleTunnelPDU ( H323SignalPDU txPDU  )  [virtual]

Handle Control PDU tunnelled in the signalling channel. This is an internal function and is unlikely to be used by applications.

Parameters:
txPDU PDU tunnel response into.

void H323Connection::HoldCall ( BOOL  localHold  ) 

Place the call on hold, suspending all media channels (H.450.4). Note it is the responsibility of the application layer to delete the MOH Channel if music on hold is provided to the remote endpoint. So far only Local Hold has been implemented.

Parameters:
localHold true for Local Hold, false for Remote Hold

BOOL H323Connection::InternalEndSessionCheck ( PPER_Stream &  strm  )  [protected]

virtual void H323Connection::InternalEstablishedConnectionCheck (  )  [protected, virtual]

Internal function to check if call established. This checks all the criteria for establishing a call an initiating the starting of media channels, if they have not already been started via the fast start algorithm.

virtual void H323Connection::IntrudeCall ( unsigned  capabilityLevel  )  [virtual]

Begin a call intrusion request. Calls h45011handler->IntrudeCall where SS pdu is added to Call Setup message.

BOOL H323Connection::IsBehindNAT (  )  const [inline]

Return TRUE if the remote appears to be behind a NAT firewall

References remoteIsNAT.

BOOL H323Connection::IsCallIntrusion (  )  [inline]

References isCallIntrusion.

BOOL H323Connection::IsCallOnHold (  )  const

Determine if the current call is held or in the process of being held.

BOOL H323Connection::IsConnected (  )  const [inline]

Determine if the call has been connected. This indicates that Q.931 CONNECT has occurred. This usually means in PSTN gateway environments that a charge will be made for the call. This is not quite the same as IsEstablished() as that indicates the call is connected AND there is media open.

References connectionState, EstablishedConnection, and HasExecutedSignalConnect.

BOOL H323Connection::IsEstablished (  )  const [inline]

Determine if the call has been established. This can be used in combination with the GetCallEndReason() function to determine the three main phases of a call, call setup, call established and call cleared.

References connectionState, and EstablishedConnection.

BOOL H323Connection::IsGatekeeperRouted (  )  const [inline]

Determined if connection is gatekeeper routed.

References gatekeeperRouted.

BOOL H323Connection::IsH245Master (  )  const

Return if this H245 connection is a master or slave

BOOL H323Connection::IsLocalHold (  )  const

Determine if held.

BOOL H323Connection::IsMediaOnHold (  )  const

Determine if Meadia On Hold is enabled.

BOOL H323Connection::IsRemoteHold (  )  const

Determine if held.

BOOL H323Connection::IsTransferredCall (  )  const

Determine whether this connection is the result of a transferred call.

BOOL H323Connection::IsTransferringCall (  )  const

Determine whether this connection is being transferred.

BOOL H323Connection::Lock (  ) 

Lock connection. When any thread wants exclusive use of the connection, it must use this function to gain the mutex. Note this is not a simple mutex to allow for the rather complicated mechanism for preventing deadlocks in associated threads to the connection (eg Q.931 reader thread).

Returns FALSE if the lock was not obtainable due to the connection being shut down.

void H323Connection::MonitorCallStatus (  )  [protected]

virtual void H323Connection::OnAcceptModeChange ( const H245_RequestModeAck pdu  )  [virtual]

Received acceptance of last mode change request. This callback indicates that the RequestModeChange() was accepted by the remote endpoint.

Parameters:
pdu Received PDU

virtual BOOL H323Connection::OnAlerting ( const H323SignalPDU alertingPDU,
const PString &  user 
) [virtual]

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 calls the endpoint function of the same name.

Parameters:
alertingPDU Received Alerting PDU
user Username of remote endpoint

virtual AnswerCallResponse H323Connection::OnAnswerCall ( const PString &  callerName,
const H323SignalPDU setupPDU,
H323SignalPDU connectPDU 
) [virtual]

Call back for answering an incoming call. This function is used for an application to control the answering of incoming calls. It is usually used to indicate the immediate action to be taken in answering the call.

It is called from the OnReceivedSignalSetup() function before it sends the Alerting or Connect PDUs. It also gives an opportunity for an application to alter the Connect PDU reply before transmission to the remote endpoint.

If AnswerCallNow is returned then the H.323 protocol proceeds with the connection. If AnswerCallDenied is returned the connection is aborted and a Release Complete PDU is sent. If AnswerCallPending is returned then the Alerting PDU is sent and the protocol negotiations are paused until the AnsweringCall() function is called. Finally, if AnswerCallDeferred is returned then no Alerting PDU is sent, but the system still waits as in the AnswerCallPending response.

Note this function should not block for any length of time. If the decision to answer the call may take some time eg waiting for a user to pick up the phone, then AnswerCallPending or AnswerCallDeferred should be returned.

The default behaviour calls the endpoint function of the same name which in turn will return AnswerCallNow.

Parameters:
callerName Name of caller
setupPDU Received setup PDU
connectPDU Connect PDU to send.

virtual void H323Connection::OnCleared (  )  [virtual]

Called when a connection is cleared, just after CleanUpOnCallEnd() Default behaviour is to call H323EndPoint::OnConnectionCleared

virtual void H323Connection::OnClosedLogicalChannel ( const H323Channel channel  )  [virtual]

This function is called when the remote endpoint has closed down a logical channel.

The default behaviour does nothing.

Parameters:
channel Channel that was closed

virtual BOOL H323Connection::OnClosingLogicalChannel ( H323Channel channel  )  [virtual]

This function is called when the remote endpoint request the close of a logical channel.

The application may get an opportunity to refuse to close the channel by returning FALSE from this function.

The default behaviour returns TRUE.

Parameters:
channel Channel that is to be closed

virtual BOOL H323Connection::OnConflictingLogicalChannel ( H323Channel channel  )  [virtual]

Callback for when a logical channel conflict has occurred. This is called when the remote endpoint, which is a master, rejects our transmitter channel due to a resource conflict. Typically an inability to do asymmetric codecs. The local (slave) endpoint must then try and open a new transmitter channel using the same codec as the receiver that is being opened.

Parameters:
channel Channel that conflicted

virtual void H323Connection::OnConsultationTransferSuccess ( H323Connection secondaryCall  )  [virtual]

Callback to indicate a successful transfer through consultation. The paramter passed is a reference to the existing connection between the Transferring endpoint and Transferred-to endpoint.

Parameters:
secondaryCall Secondary call for consultation

virtual BOOL H323Connection::OnControlProtocolError ( ControlProtocolErrors  errorSource,
const void *  errorData = NULL 
) [virtual]

This function is called from the HandleControlPDU() function or any of its sub-functions for protocol errors, eg unhandled PDU types.

The errorData field may be a string or PDU or some other data depending on the value of the errorSource parameter. These are: e_UnhandledPDU &H323ControlPDU e_MasterSlaveDetermination const char *

If FALSE is returned the connection is aborted. The default behaviour returns TRUE.

Parameters:
errorSource Source of the proptoerror
errorData Data associated with error

virtual BOOL H323Connection::OnCreateLogicalChannel ( const H323Capability capability,
H323Channel::Directions  dir,
unsigned &  errorCode 
) [virtual]

This function is called when the remote endpoint want's to create a new channel.

If the return value is FALSE then the open is rejected using the errorCode as the cause, this would be a value from the enum H245_OpenLogicalChannelReject_cause::Choices.

The default behaviour checks the capability set for if this capability is allowed to be opened with other channels that may already be open.

Parameters:
capability Capability for the channel open
dir Direction of channel
errorCode Error to return if refused

virtual void H323Connection::OnEstablished (  )  [virtual]

Called when a connection is established. Default behaviour is to call H323EndPoint::OnConnectionEstablished

virtual BOOL H323Connection::OnH245_FlowControlCommand ( const H245_FlowControlCommand pdu  )  [virtual]

Handle H245 command to control flow control. This function calls OnLogicalChannelFlowControl() with the channel and bit rate restriction.

Parameters:
pdu Received PDU

virtual BOOL H323Connection::OnH245_JitterIndication ( const H245_JitterIndication pdu  )  [virtual]

Handle H245 indication of received jitter. This function calls OnLogicalChannelJitter() with the channel and estimated jitter.

Parameters:
pdu Received PDU

virtual BOOL H323Connection::OnH245_MiscellaneousCommand ( const H245_MiscellaneousCommand pdu  )  [virtual]

Handle H245 miscellaneous command. This function passes the miscellaneous command on to the channel defined by the pdu.

Parameters:
pdu Received PDU

virtual BOOL H323Connection::OnH245_MiscellaneousIndication ( const H245_MiscellaneousIndication pdu  )  [virtual]

Handle H245 miscellaneous indication. This function passes the miscellaneous indication on to the channel defined by the pdu.

Parameters:
pdu Received PDU

virtual BOOL H323Connection::OnH245_SendTerminalCapabilitySet ( const H245_SendTerminalCapabilitySet pdu  )  [virtual]

Handle H245 command to send terminal capability set.

Parameters:
pdu Received PDU

virtual BOOL H323Connection::OnH245Command ( const H323ControlPDU pdu  )  [virtual]

Handle incoming command PDU's on the control channel. Dispatches them to the various virtuals off this class.

Parameters:
pdu Received PDU

virtual BOOL H323Connection::OnH245Indication ( const H323ControlPDU pdu  )  [virtual]

Handle incoming indication PDU's on the control channel. Dispatches them to the various virtuals off this class.

Parameters:
pdu Received PDU

virtual BOOL H323Connection::OnH245Request ( const H323ControlPDU pdu  )  [virtual]

Handle incoming request PDU's on the control channel. Dispatches them to the various virtuals off this class.

Parameters:
pdu Received PDU

virtual BOOL H323Connection::OnH245Response ( const H323ControlPDU pdu  )  [virtual]

Handle incoming response PDU's on the control channel. Dispatches them to the various virtuals off this class.

Parameters:
pdu Received PDU

virtual BOOL H323Connection::OnIncomingCall ( const H323SignalPDU setupPDU,
H323SignalPDU alertingPDU,
CallEndReason reason 
) [virtual]

Parameters:
setupPDU Received setup PDU
alertingPDU Alerting PDU to send
reason reason for call refusal, if returned false

virtual BOOL H323Connection::OnIncomingCall ( const H323SignalPDU setupPDU,
H323SignalPDU alertingPDU 
) [virtual]

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 calls the endpoint function of the same name.

Parameters:
setupPDU Received setup PDU
alertingPDU Alerting PDU to send

virtual BOOL H323Connection::OnInsufficientDigits (  )  [virtual]

This function is called when insufficient digits have been entered. This supports overlapped dialling so that a call can begin when it is not known how many more digits are to be entered in a phone number.

It is expected that the application will override this function. It should be noted that the application should not block in the function but only indicate to whatever other thread is gathering digits that more are required and that thread should call SendMoreDigits().

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

The default behaviour simply returns FALSE.

virtual void H323Connection::OnLogicalChannelFlowControl ( H323Channel channel,
long  bitRateRestriction 
) [virtual]

This function is called when the remote endpoint wishes to limit the bit rate being sent on a channel.

If channel is NULL, then the bit rate limit applies to all channels.

The default behaviour does nothing if channel is NULL, otherwise calls H323Channel::OnFlowControl() on the specific channel.

Parameters:
channel Channel that is to be limited
bitRateRestriction Limit for channel

virtual void H323Connection::OnLogicalChannelJitter ( H323Channel channel,
DWORD  jitter,
int  skippedFrameCount,
int  additionalBuffer 
) [virtual]

This function is called when the remote endpoint indicates the level of jitter estimated by the receiver.

If channel is NULL, then the jitter applies to all channels.

The default behaviour does nothing if channel is NULL, otherwise calls H323Channel::OnJitter() on the specific channel.

Parameters:
channel Channel that is to be limited
jitter Estimated received jitter in microseconds
skippedFrameCount Frames skipped by decodec
additionalBuffer Additional size of video decoder buffer

virtual void H323Connection::OnModeChanged ( const H245_ModeDescription newMode  )  [virtual]

Completed request for mode change from remote. This is a call back that accurs after the ack has been sent to the remote as indicated by the OnRequestModeChange() return result. This function is intended to actually implement the mode change after it had been accepted.

virtual BOOL H323Connection::OnOpenLogicalChannel ( const H245_OpenLogicalChannel openPDU,
H245_OpenLogicalChannelAck ackPDU,
unsigned &  errorCode 
) [virtual]

This function is called when the remote endpoint want's to open a new channel.

If the return value is FALSE then the open is rejected using the errorCode as the cause, this would be a value from the enum H245_OpenLogicalChannelReject_cause::Choices.

The default behaviour simply returns TRUE.

Parameters:
openPDU Received PDU for the channel open
ackPDU PDU to send for acknowledgement
errorCode Error to return if refused

virtual BOOL H323Connection::OnOutgoingCall ( const H323SignalPDU connectPDU  )  [virtual]

This function is called from the SendSignalSetup() function after it receives the Connect PDU from the remote endpoint, but before it attempts to open the control channel.

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

The default behaviour calls H323EndPoint::OnOutgoingCall

Parameters:
connectPDU Received Connect PDU

virtual BOOL H323Connection::OnReceivedAlerting ( const H323SignalPDU pdu  )  [virtual]

Handle an incoming Q931 alerting PDU. If FALSE is returned the connection is aborted and a Release Complete PDU is sent.

The default behaviour obtains the display name and calls OnAlerting().

Parameters:
pdu Received Alerting PDU

virtual BOOL H323Connection::OnReceivedCallProceeding ( const H323SignalPDU pdu  )  [virtual]

Handle an incoming Q931 call proceeding PDU. If FALSE is returned the connection is aborted and a Release Complete PDU is sent.

The default behaviour checks for hH245Address field and if present starts the separate H245 channel, if successful or not present it returns TRUE.

Parameters:
pdu Received call proceeding PDU

virtual BOOL H323Connection::OnReceivedCapabilitySet ( const H323Capabilities remoteCaps,
const H245_MultiplexCapability muxCap,
H245_TerminalCapabilitySetReject reject 
) [virtual]

This function is called when the remote endpoint sends its capability set. This gives the application an opportunity to determine what codecs are available and if it supports any of the combinations of codecs.

Note any codec types that are the remote system supports that are not in the codecs list member variable for the endpoint are ignored and not included in the remoteCodecs list.

The default behaviour assigns the table and set to member variables and returns TRUE if the remoteCodecs list is not empty.

Parameters:
remoteCaps Capability combinations remote supports
muxCap Transport capability, if present
reject Rejection PDU (if return FALSE)

virtual BOOL H323Connection::OnReceivedFacility ( const H323SignalPDU pdu  )  [virtual]

Handle an incoming Q931 facility PDU. If FALSE is returned the connection is aborted and a Release Complete PDU is sent.

The default behaviour checks for hH245Address field and if present starts the separate H245 channel, if successful or not present it returns TRUE.

Parameters:
pdu Received Facility PDU

virtual BOOL H323Connection::OnReceivedProgress ( const H323SignalPDU pdu  )  [virtual]

Handle an incoming Q931 progress PDU. If FALSE is returned the connection is aborted and a Release Complete PDU is sent.

The default behaviour checks for hH245Address field and if present starts the separate H245 channel, if successful or not present it returns TRUE.

Parameters:
pdu Received call proceeding PDU

virtual void H323Connection::OnReceivedReleaseComplete ( const H323SignalPDU pdu  )  [virtual]

Handle an incoming Q931 Release Complete PDU. The default behaviour calls Clear() using reason code based on the Release Complete Cause field and the current connection state.

Parameters:
pdu Received Release Complete PDU

virtual BOOL H323Connection::OnReceivedSignalConnect ( const H323SignalPDU pdu  )  [virtual]

Handle an incoming Q931 connect PDU. If FALSE is returned the connection is aborted and a Release Complete PDU is sent.

The default behaviour checks for hH245Address field and if present starts the separate H245 channel, if successful it returns TRUE. If not present and there is no H245Tunneling then it returns FALSE.

Parameters:
pdu Received connect PDU

virtual BOOL H323Connection::OnReceivedSignalInformation ( const H323SignalPDU pdu  )  [virtual]

Handle an incoming Q931 information PDU. If FALSE is returned the connection is aborted and a Release Complete PDU is sent.

The default behaviour does nothing.

Parameters:
pdu Received setup PDU

virtual BOOL H323Connection::OnReceivedSignalNotify ( const H323SignalPDU pdu  )  [virtual]

Handle an incoming Q931 Notify PDU. If FALSE is returned the connection is aborted and a Release Complete PDU is sent.

The default behaviour simply returns TRUE.

Parameters:
pdu Received Notify PDU

virtual BOOL H323Connection::OnReceivedSignalSetup ( const H323SignalPDU pdu  )  [virtual]

Handle an incoming Q931 setup PDU. The default behaviour is to do the handshaking operation calling a few virtuals at certain moments in the sequence.

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

Parameters:
pdu Received setup PDU

virtual BOOL H323Connection::OnReceivedSignalSetupAck ( const H323SignalPDU pdu  )  [virtual]

Handle an incoming Q931 setup acknowledge PDU. If FALSE is returned the connection is aborted and a Release Complete PDU is sent.

The default behaviour does nothing.

Parameters:
pdu Received setup PDU

virtual BOOL H323Connection::OnReceivedSignalStatus ( const H323SignalPDU pdu  )  [virtual]

Handle an incoming Q931 Status PDU. If FALSE is returned the connection is aborted and a Release Complete PDU is sent.

The default behaviour simply returns TRUE.

Parameters:
pdu Received Status PDU

virtual BOOL H323Connection::OnReceivedStatusEnquiry ( const H323SignalPDU pdu  )  [virtual]

Handle an incoming Q931 Status Enquiry PDU. If FALSE is returned the connection is aborted and a Release Complete PDU is sent.

The default behaviour sends a Q931 Status PDU back.

Parameters:
pdu Received Status Enquiry PDU

virtual void H323Connection::OnReceiveFeatureSet ( unsigned  ,
const H225_FeatureSet  
) const [virtual]

virtual void H323Connection::OnRefusedModeChange ( const H245_RequestModeReject pdu  )  [virtual]

Received reject of last mode change request. This callback indicates that the RequestModeChange() was accepted by the remote endpoint.

Parameters:
pdu Received PDU, if NULL is a timeout

virtual BOOL H323Connection::OnRequestModeChange ( const H245_RequestMode pdu,
H245_RequestModeAck ack,
H245_RequestModeReject reject,
PINDEX &  selectedMode 
) [virtual]

Received request for mode change from remote.

Parameters:
pdu Received PDU
ack Ack PDU to send
reject Reject PDU to send
selectedMode Which mode was selected

virtual void H323Connection::OnRTPStatistics ( const RTP_Session session  )  const [virtual]

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 calls H323EndPoint::OnRTPStatistics().

Parameters:
session Session with statistics

virtual void H323Connection::OnSelectLogicalChannels (  )  [virtual]

Call back to select logical channels to start.

This function must be defined by the descendent class. It is used to select the logical channels to be opened between the two endpoints. There are three ways in which this may be called: when a "fast start" has been initiated by the local endpoint (via SendSignalSetup() function), when a "fast start" has been requested from the remote endpoint (via the OnReceivedSignalSetup() function) or when the H245 capability set (and master/slave) negotiations have completed (via the OnControlChannelOpen() function.

The function would typically examine several member variable to decide which mode it is being called in and what to do. If fastStartState is FastStartDisabled then non-fast start semantics should be used. The H245 capabilities in the remoteCapabilities members should be examined, and appropriate transmit channels started using OpenLogicalChannel().

If fastStartState is FastStartInitiate, then the local endpoint has initiated a call and is asking the application if fast start semantics are to be used. If so it is expected that the function call OpenLogicalChannel() for all the channels that it wishes to be able to be use. A subset (possibly none!) of these would actually be started when the remote endpoint replies.

If fastStartState is FastStartResponse, then this indicates the remote endpoint is attempting a fast start. The fastStartChannels member contains a list of possible channels from the remote that the local endpoint is to select which to accept. For each accepted channel it simply necessary to call the Start() function on that channel eg fastStartChannels[0].Start();

The default behaviour selects the first codec of each session number that is available. This is according to the order of the capabilities in the remoteCapabilities, the local capability table or of the fastStartChannels list respectively for each of the above scenarios.

virtual void H323Connection::OnSendARQ ( H225_AdmissionRequest arq  )  [virtual]

called when an ARQ needs to be sent to a gatekeeper. This allows the connection to change or check fields in the ARQ before it is sent.

By default, this calls the matching function on the endpoint

virtual BOOL H323Connection::OnSendCallProceeding ( H323SignalPDU callProceedingPDU  )  [virtual]

Adjust call proceeding PDU being sent. This function is called from the OnReceivedSignalSetup() function before it sends the Call Proceeding PDU. It gives an opportunity for an application to alter the request before transmission to the other endpoint. If this function returns FALSE then the Call Proceeding PDU is not sent at all.

The default behaviour simply returns TRUE.

Parameters:
callProceedingPDU Call Proceeding PDU to send

virtual void H323Connection::OnSendCapabilitySet ( H245_TerminalCapabilitySet pdu  )  [virtual]

This function is called from the HandleControlPDU() function when it is about to send the Capabilities Set to the remote endpoint. This gives the application an oppurtunity to alter the PDU to be sent.

The default behaviour will make "adjustments" for compatibility with some broken remote endpoints.

Parameters:
pdu PDU to send

virtual BOOL H323Connection::OnSendFeatureSet ( unsigned  ,
H225_FeatureSet  
) const [virtual]

virtual BOOL H323Connection::OnSendReleaseComplete ( H323SignalPDU releaseCompletePDU  )  [virtual]

Call back for Release Complete being sent. This allows an application to add things to the release complete before it is sent to the remote endpoint.

Returning FALSE will prevent the release complete from being sent. Note that this would be very unusual as this is called when the connection is being cleaned up. There will be no second chance to send the PDU and it must be sent.

The default behaviour simply returns TRUE.

Parameters:
releaseCompletePDU Release Complete PDU to send

virtual BOOL H323Connection::OnSendSignalSetup ( H323SignalPDU setupPDU  )  [virtual]

Adjust setup PDU being sent on initialisation of signal channel. This function is called from the SendSignalSetup() function before it sends the Setup PDU. It gives an opportunity for an application to alter the request before transmission to the other endpoint.

The default behaviour simply returns TRUE. Note that this is usually overridden by the transport dependent descendent class, eg the H323ConnectionTCP descendent fills in the destCallSignalAddress field with the TCP/IP data. Therefore if you override this in your application make sure you call the ancestor function.

Parameters:
setupPDU Setup PDU to send

virtual void H323Connection::OnSetLocalCapabilities (  )  [virtual]

Call back to set the local capabilities. This is called just before the capabilties are required when a call is begun. It is called when a SETUP PDU is received or when one is about to be sent, so that the capabilities may be adjusted for correct fast start operation.

The default behaviour does nothing.

virtual BOOL H323Connection::OnStartLogicalChannel ( H323Channel channel  )  [virtual]

Call back function when a logical channel thread begins.

The default behaviour does nothing and returns TRUE.

Parameters:
channel Channel that has been started.

virtual BOOL H323Connection::OnUnknownControlPDU ( const H323ControlPDU pdu  )  [virtual]

This function is called from the HandleControlPDU() function for unhandled PDU types.

If FALSE is returned the connection is aborted and a Release Complete PDU is sent. The default behaviour returns TRUE.

The default behaviour send a FunctioNotUnderstood indication back to the sender, and returns TRUE to continue operation.

Parameters:
pdu Received PDU

virtual BOOL H323Connection::OnUnknownSignalPDU ( const H323SignalPDU pdu  )  [virtual]

This function is called from the HandleSignallingChannel() function for unhandled PDU types.

If FALSE is returned the connection is aborted and a Release Complete PDU is sent. The default behaviour returns TRUE.

Parameters:
pdu Received PDU

virtual void H323Connection::OnUserInputIndication ( const H245_UserInputIndication pdu  )  [virtual]

Call back for remote enpoint has sent user input. The default behaviour calls OnUserInputString() if the PDU is of the alphanumeric type, or OnUserInputTone() if of a tone type.

Parameters:
pdu Full user indication PDU

virtual void H323Connection::OnUserInputString ( const PString &  value  )  [virtual]

Call back for remote endpoint has sent user input. This will be called irrespective of the source (H.245 string, H.245 signal or RFC2833).

The default behaviour calls the endpoint function of the same name.

Parameters:
value String value of indication

virtual void H323Connection::OnUserInputTone ( char  tone,
unsigned  duration,
unsigned  logicalChannel,
unsigned  rtpTimestamp 
) [virtual]

Call back for remote enpoint has sent user input.

The default behaviour calls the endpoint function of the same name.

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

virtual BOOL H323Connection::OpenAudioChannel ( BOOL  isEncoding,
unsigned  bufferSize,
H323AudioCodec codec 
) [virtual]

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 behaviour calls the equivalent function on the endpoint.

Parameters:
isEncoding Direction of data flow
bufferSize Size of each sound buffer
codec codec that is doing the opening

virtual BOOL H323Connection::OpenLogicalChannel ( const H323Capability capability,
unsigned  sessionID,
H323Channel::Directions  dir 
) [virtual]

Open a new logical channel. This function will open a channel between the endpoints for the specified capability.

If this function is called while there is not yet a conenction established, eg from the OnFastStartLogicalChannels() function, then a "trial" receiver/transmitter channel is created. This channel is not started until the remote enpoint has confirmed that they are to start. Any channels not confirmed are deleted.

If this function is called later in the call sequence, eg from OnSelectLogicalChannels(), then it may only establish a transmit channel, ie fromRemote must be FALSE.

Parameters:
capability Capability to open channel with
sessionID Session for the channel
dir Direction of channel

virtual BOOL H323Connection::OpenVideoChannel ( BOOL  isEncoding,
H323VideoCodec codec 
) [virtual]

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.

The default behaviour calls the equivalent function on the endpoint.

Parameters:
isEncoding Direction of data flow
codec codec doing the opening

H323Connection::PDECLARE_NOTIFIER ( H323Codec::FilterInfo  ,
H323Connection  ,
OnUserInputInBandDTMF   
) [protected]

H323Connection::PDECLARE_NOTIFIER ( OpalRFC2833Info  ,
H323Connection  ,
OnUserInputInlineRFC2833   
) [protected]

virtual void H323Connection::ReleaseSession ( unsigned  sessionID  )  [virtual]

Release the session. If the session ID is not being used any more any clients via the UseSession() function, then the session is deleted.

virtual BOOL H323Connection::RequestModeChange ( const H245_ArrayOf_ModeDescription newModes  )  [virtual]

Make a request to mode change to remote. This asks the remote system to stop it transmitters and start sending one of the combinations specifed.

Returns FALSE if a mode change is currently in progress, only one mode change may be done at a time.

Parameters:
newModes New modes to select

virtual BOOL H323Connection::RequestModeChange ( const PString &  newModes  )  [virtual]

Make a request to mode change to remote. This asks the remote system to stop it transmitters and start sending one of the combinations specifed.

The modes are separated in the string by
characters, and all of the channels (capabilities) are strings separated by characters. Thus a very simple mode change would be "T.38" which requests that the remote start sending T.38 data and nothing else. A more complicated example would be "G.723\tH.261\nG.729\tH.261\nG.728" which indicates that the remote should either start sending G.723 and H.261, G.729 and H.261 or just G.728 on its own.

Returns FALSE if a mode change is currently in progress, only one mode change may be done at a time.

Parameters:
newModes New modes to select

virtual BOOL H323Connection::RequestModeChangeT38 ( const char *  capabilityNames = "T.38\nT38FaxUDP"  )  [virtual]

Request a mode change to T.38 data.

void H323Connection::RetrieveCall (  ) 

Retrieve the call from hold, activating all media channels (H.450.4). This method examines the call hold state and performs the necessary actions required to retrieve a Near-end or Remote-end call on hold. NOTE: Only Local Hold is implemented so far.

virtual void H323Connection::SelectDefaultLogicalChannel ( unsigned  sessionID  )  [virtual]

Select default logical channel for normal start.

Parameters:
sessionID Session ID to find default logical channel.

virtual void H323Connection::SelectFastStartChannels ( unsigned  sessionID,
BOOL  transmitter,
BOOL  receiver 
) [virtual]

Select default logical channel for fast start. Internal function, not for normal use.

Parameters:
sessionID Session ID to find default logical channel.
transmitter Whether to open transmitters
receiver Whether to open receivers

void H323Connection::SendCallWaitingIndication ( const unsigned  nbOfAddWaitingCalls = 0  ) 

Send a Call Waiting indication message to the remote endpoint using H.450.6. The second paramter is used to indicate to the calling user how many additional users are "camped on" the called user. A value of zero indicates to the calling user that he/she is the only user attempting to reach the busy called user.

Parameters:
nbOfAddWaitingCalls number of additional waiting calls at the served user

virtual void H323Connection::SendCapabilitySet ( BOOL  empty  )  [virtual]

Send a new capability set.

Parameters:
empty Send an empty set.

virtual BOOL H323Connection::SendFastStartAcknowledge ( H225_ArrayOf_PASN_OctetString array  )  [virtual]

Send an the acknowldege of a fast start. This function is called when the fast start channels provided to this connection by the original SETUP PDU have been selected and opened and need to be sent back to the remote endpoint.

If FALSE is returned then no fast start has been acknowledged, possibly due to no common codec in fast start request.

The default behaviour uses OnSelectLogicalChannels() to find a pair of channels and adds then to the provided PDU.

Parameters:
array Array of H245_OpenLogicalChannel

void H323Connection::SendLogicalChannelMiscCommand ( H323Channel channel,
unsigned  command 
)

Send a miscellaneous command on the associated H245 channel.

Parameters:
channel Channel to send command for
command Command code to send

virtual void H323Connection::SendMoreDigits ( const PString &  digits  )  [virtual]

This function is called when sufficient digits have been entered. This supports overlapped dialling so that a call can begin when it is not known how many more digits are to be entered in a phone number.

The digits parameter is appended to the existing remoteNumber member variable and the call is retried.

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

The default behaviour simply returns TRUE.

Parameters:
digits Extra digits

virtual CallEndReason H323Connection::SendSignalSetup ( const PString &  alias,
const H323TransportAddress address 
) [virtual]

Send first PDU in signalling channel. This function does the signalling handshaking for establishing a connection to a remote endpoint. The transport (TCP/IP) for the signalling channel is assumed to be already created. This function will then do the SetRemoteAddress() and Connect() calls o establish the transport.

Returns the error code for the call failure reason or NumCallEndReasons if the call was successful to that point in the protocol.

Parameters:
alias Name of remote party
address Address of destination

virtual void H323Connection::SendUserInput ( const PString &  value  )  [virtual]

Send a user input indication to the remote endpoint. This is for sending arbitrary strings as user indications.

The user indication is sent according to the sendUserInputMode member variable. If SendUserInputAsString then this uses an H.245 "string" UserInputIndication pdu sending the entire string in one go. If SendUserInputAsTone then a separate H.245 "signal" UserInputIndication pdu is sent for each character. If SendUserInputAsInlineRFC2833 then the indication is inserted into the outgoing audio stream as an RFC2833 RTP data pdu.

SendUserInputAsSeparateRFC2833 is not yet supported.

Parameters:
value String value of indication

void H323Connection::SendUserInputHookFlash ( int  duration = 500  )  [inline]

Send a user input indication to the remote endpoint. This sends a Hook Flash emulation user input.

Parameters:
duration Duration of tone in milliseconds

References SendUserInputTone().

virtual void H323Connection::SendUserInputIndication ( const H245_UserInputIndication pdu  )  [virtual]

Send a user input indication to the remote endpoint. The two forms are for basic user input of a simple string using the SendUserInput() function or a full DTMF emulation user input using the SendUserInputTone() function.

An application could do more sophisticated usage by filling in the H245_UserInputIndication structure directly ans using this function.

Parameters:
pdu Full user indication PDU

virtual void H323Connection::SendUserInputIndicationQ931 ( const PString &  value  )  [virtual]

Send a user input indication to the remote endpoint. This is for sending arbitrary strings as user indications.

This always uses a Q.931 Keypad Information Element in a Information pdu sending the entire string in one go.

Parameters:
value String value of indication

virtual void H323Connection::SendUserInputIndicationString ( const PString &  value  )  [virtual]

Send a user input indication to the remote endpoint. This is for sending arbitrary strings as user indications.

This always uses an H.245 "string" UserInputIndication pdu sending the entire string in one go.

Parameters:
value String value of indication

virtual void H323Connection::SendUserInputIndicationTone ( char  tone,
unsigned  duration = 0,
unsigned  logicalChannel = 0,
unsigned  rtpTimestamp = 0 
) [virtual]

Send a user input indication to the remote endpoint. This sends DTMF emulation user input.This uses an H.245 "signal" UserInputIndication pdu.

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

virtual void H323Connection::SendUserInputTone ( char  tone,
unsigned  duration = 0,
unsigned  logicalChannel = 0,
unsigned  rtpTimestamp = 0 
) [virtual]

Send a user input indication to the remote endpoint. This sends DTMF emulation user input. If something more sophisticated than the simple tones that can be sent using the SendUserInput() function.

A duration of zero indicates that no duration is to be indicated. A non-zero logical channel indicates that the tone is to be syncronised with the logical channel at the rtpTimestamp value specified.

The tone parameter must be one of "0123456789#*ABCD!" where '!' indicates a hook flash. If tone is a ' ' character then a signalUpdate PDU is sent that updates the last tone indication sent. See the H.245 specifcation for more details on this.

The user indication is sent according to the sendUserInputMode member variable. If SendUserInputAsString then this uses an H.245 "string" UserInputIndication pdu sending the entire string in one go. If SendUserInputAsTone then a separate H.245 "signal" UserInputIndication pdu is sent for each character. If SendUserInputAsInlineRFC2833 then the indication is inserted into the outgoing audio stream as an RFC2833 RTP data pdu.

SendUserInputAsSeparateRFC2833 is not yet supported.

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

Referenced by SendUserInputHookFlash().

void H323Connection::SetAssociatedCallToken ( const PString &  token  ) 

Store the passed token on the current connection's H4502Handler. This is an internal function and it is not expected the user will call it directly.

Parameters:
token Associated token

void H323Connection::SetAudioJitterDelay ( unsigned  minDelay,
unsigned  maxDelay 
)

Set the maximum audio delay jitter parameter.

Parameters:
minDelay New minimum jitter buffer delay in milliseconds
maxDelay New maximum jitter buffer delay in milliseconds

BOOL H323Connection::SetBandwidthAvailable ( unsigned  newBandwidth,
BOOL  force = FALSE 
)

Set the available bandwidth in 100's of bits/sec. Note if the force parameter is TRUE this function will close down active logical channels to meet the new bandwidth requirement.

Parameters:
newBandwidth New bandwidth limit
force Force bandwidth limit

virtual void H323Connection::SetCallEndReason ( CallEndReason  reason,
PSyncPoint *  sync = NULL 
) [virtual]

Set the call clearance reason. An application should have no cause to use this function. It is present for the H323EndPoint::ClearCall() function to set the clearance reason.

Parameters:
reason Reason for clearance of connection.
sync syncpoint to use for synchronous destruction

void H323Connection::SetCallIntrusion (  )  [inline]

Set flag indicating call intrusion. Used to set a flag when intrusion occurs and to determine if connection is created for Call Intrusion. This flag is used when we should decide whether to Answer the call or to Close it.

References isCallIntrusion.

void H323Connection::SetDestExtraCallInfo ( const PString &  info  )  [inline]

Set the Destionation Extra Call Info memeber.

References destExtraCallInfo.

void H323Connection::SetDisplayName ( const PString &  name  )  [inline]

Set the local Q.931 display name

References localDisplayName.

void H323Connection::SetDistinctiveRing ( unsigned  pattern  )  [inline]

Set the distinctive ring code for outgoing call. This sets the integer from 0 to 7 that will be used in the outgoing Setup PDU. Note this must be called either immediately after construction or during the OnSendSignalSetup() callback function so the member variable is set befor ethe PDU is sent.

References distinctiveRing.

void H323Connection::SetEnforcedDurationLimit ( unsigned  seconds  ) 

Set the enforced duration limit for the call. This starts a timer that will automatically shut down the call when it expires.

Parameters:
seconds max duration of call in seconds

virtual void H323Connection::SetForcedReleaseAccepted (  )  [virtual]

void H323Connection::SetGkAccessTokenOID ( const PString &  oid  )  [inline]

Set the iNow Gatekeeper Access Token OID.

References gkAccessTokenOID.

void H323Connection::SetHoldMedia ( PChannel *  audioChannel  ) 

Set the alternative media channel. This channel can be used to provide Media On Hold (MOH) for a near end call hold operation or to provide Recorded Voice Anouncements (RVAs). If this method is not called before a call hold operation is attempted, no media on hold will be provided for the held endpoint.

virtual void H323Connection::SetIntrusionImpending (  )  [virtual]

virtual void H323Connection::SetIntrusionNotAuthorized (  )  [virtual]

void H323Connection::SetLocalPartyName ( const PString &  name  ) 

Set the local name/alias from information in the PDU.

void H323Connection::SetQ931Cause ( unsigned  v  )  [inline]

Set the outgoing Q.931 cause code (Q.850) that is sent for this call See Q931::CauseValues for common values.

References q931Cause.

void H323Connection::SetRemotCallWaiting ( const unsigned  value  )  [inline]

Set the remote call waiting flag

References remoteCallWaiting.

void H323Connection::SetRemoteApplication ( const H225_EndpointType pdu  ) 

Set the name/alias of remote end from information in the PDU.

Parameters:
pdu PDU from which to extract application info.

void H323Connection::SetRemotePartyInfo ( const H323SignalPDU pdu  ) 

Set the name/alias of remote end from information in the PDU.

Parameters:
pdu PDU from which to extract party info.

void H323Connection::SetRemoteVersions ( const H225_ProtocolIdentifier id  )  [protected]

void H323Connection::SetSendUserInputMode ( SendUserInputModes  mode  ) 

Set the user input indication transmission mode.

void H323Connection::SetUUIEsRequested ( unsigned  mask  )  [inline]

Set the UUIE PDU monitor bit mask.

References uuiesRequested.

virtual BOOL H323Connection::StartControlChannel ( 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 BOOL H323Connection::StartControlChannel (  )  [virtual]

Start a separate H245 channel. This function is called from one of a number of functions when it needs to create the h245 channel for the remote endpoint to connect back to.

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

virtual BOOL H323Connection::StartControlNegotiations ( BOOL  renegotiate = FALSE  )  [virtual]

Start control channel negotiations.

Parameters:
renegotiate Force renogotiation of TCS/MSD

void H323Connection::StartRoundTripDelay (  ) 

Start the round trip delay calculation over the control channel.

void H323Connection::TransferCall ( const PString &  remoteParty,
const PString &  callIdentity = PString::Empty() 
)

Initiate the transfer of an existing call (connection) to a new remote party using H.450.2. This sends a Call Transfer Initiate Invoke message from the A-Party (transferring endpoint) to the B-Party (transferred endpoint).

Parameters:
remoteParty Remote party to transfer the existing call to
callIdentity Call Identity of secondary call if present

int H323Connection::TryLock (  ) 

Try to lock connection. When the H323EndPoint::FindConnectionWithLock() function is used to gain access to a connection object, this is called to prevent it from being closed and deleted by the background threads.

Note this is an internal function and it is not expected an application would use it.

Returns 0 if the lock was not obtainable due to the connection being shut down, -1 if it was not available, and +1 if lock is obtained.

void H323Connection::Unlock (  ) 

Unlock connection. If the H323EndPoint::FindConnectionWithLock() function is used to gain access to a connection object, this MUST be called to allow it to subsequently be closed and disposed of.

BOOL H323Connection::UseBandwidth ( unsigned  bandwidth,
BOOL  removing 
)

Request use the available bandwidth in 100's of bits/sec. If there is insufficient bandwidth available, FALSE is returned. If sufficient bandwidth is available, then TRUE is returned and the amount of available bandwidth is reduced by the specified amount.

Parameters:
bandwidth Bandwidth required
removing Flag for adding/removing bandwidth usage

virtual RTP_Session* H323Connection::UseSession ( unsigned  sessionID,
const H245_TransportAddress pdu,
H323Channel::Directions  dir,
RTP_QOS *  rtpqos = NULL 
) [virtual]

Use an RTP session for the specified ID and for the given direction. If there is no session of the specified ID, a new one is created using the information provided in the H245_TransportAddress PDU. If the system does not support the specified transport, NULL is returned.

If this function is used, then the ReleaseSession() function MUST be called or the session is never deleted for the lifetime of the H323 connection.

BOOL H323Connection::WriteControlPDU ( const H323ControlPDU pdu  ) 

Write a PDU to the control channel. If there is no control channel open then this will tunnel the PDU into the signalling channel.

BOOL H323Connection::WriteSignalPDU ( H323SignalPDU pdu  ) 

Write a PDU to the signalling channel.

Parameters:
pdu PDU to write.


Member Data Documentation

PTime H323Connection::alertingTime [protected]

Referenced by GetAlertingTime().

unsigned H323Connection::bandwidthAvailable [protected]

Referenced by GetBandwidthAvailable().

BOOL H323Connection::callAnswered [protected]

Referenced by HadAnsweredCall().

Referenced by GetCallEndReason().

PTime H323Connection::callEndTime [protected]

Referenced by GetConnectionEndTime().

Referenced by GetCallIdentifier().

unsigned H323Connection::callReference [protected]

Referenced by GetCallReference().

PString H323Connection::callToken [protected]

Referenced by GetCallToken().

Referenced by GetConferenceIdentifier().

PTime H323Connection::connectedTime [protected]

Referenced by GetConnectionStartTime().

Referenced by IsConnected(), and IsEstablished().

PString H323Connection::destExtraCallInfo [protected]

Referenced by SetDestExtraCallInfo().

PSyncPoint H323Connection::digitsWaitFlag [protected]

unsigned H323Connection::distinctiveRing [protected]

BOOL H323Connection::earlyStart [protected]

Referenced by GetEndPoint().

PSyncPoint H323Connection::endSessionReceived [protected]

PSyncPoint* H323Connection::endSync [protected]

H323LogicalChannelList H323Connection::fastStartChannels [protected]

Referenced by IsGatekeeperRouted().

PBYTEArray H323Connection::gkAccessTokenData [protected]

Referenced by GetGkAccessTokenData().

PString H323Connection::gkAccessTokenOID [protected]

unsigned H323Connection::h225version [protected]

Referenced by GetSignallingVersion().

unsigned H323Connection::h245version [protected]

Referenced by GetControlVersion().

PChannel* H323Connection::holdMediaChannel [protected]

Call Intrusion flag and parameters

Referenced by IsCallIntrusion(), and SetCallIntrusion().

PStringList H323Connection::localAliasNames [protected]

Referenced by GetLocalAliasNames().

Referenced by GetLocalCapabilities().

PString H323Connection::localDisplayName [protected]

Referenced by GetDisplayName(), and SetDisplayName().

PString H323Connection::localPartyName [protected]

Referenced by GetLocalPartyName().

Referenced by GetMaxAudioJitterDelay().

Referenced by GetMinAudioJitterDelay().

BOOL H323Connection::mustSendDRQ [protected]

unsigned H323Connection::q931Cause [protected]

Referenced by GetQ931Cause(), and SetQ931Cause().

Referenced by GetReleaseSequence().

PString H323Connection::remoteApplication [protected]

Referenced by GetRemoteApplication().

Referenced by GetRemoteCapabilities().

BOOL H323Connection::remoteIsNAT [protected]

Referenced by IsBehindNAT().

Referenced by GetRemotePartyAddress().

PString H323Connection::remotePartyName [protected]

Referenced by GetRemotePartyName().

PString H323Connection::remotePartyNumber [protected]

Referenced by GetRemotePartyNumber().

Referenced by GetReverseMediaOpenTime().

Referenced by GetSendUserInputMode().

PTime H323Connection::setupTime [protected]

Referenced by GetSetupUpTime().

Referenced by GetSignallingChannel().

BOOL H323Connection::startT120 [protected]

unsigned H323Connection::uuiesRequested [protected]


The documentation for this class was generated from the following file:

Generated on Mon Apr 27 11:46:34 2009 for OpenH323 by  doxygen 1.5.8