H323GatekeeperCall Class Reference

#include <gkserver.h>

List of all members.

Construction

enum  Direction { AnsweringCall, OriginatingCall, UnknownDirection }
 H323GatekeeperCall (H323GatekeeperServer &server, const OpalGloballyUniqueID &callIdentifier, Direction direction)
 ~H323GatekeeperCall ()

Public Member Functions

Overrides from PObject
Comparison Compare (const PObject &obj) const
void PrintOn (ostream &strm) const
Operations
virtual H323GatekeeperRequest::Response OnAdmission (H323GatekeeperARQ &request)
virtual BOOL Disengage (int reason=-1)
virtual H323GatekeeperRequest::Response OnDisengage (H323GatekeeperDRQ &request)
virtual H323GatekeeperRequest::Response OnBandwidth (H323GatekeeperBRQ &request)
virtual H323GatekeeperRequest::Response OnInfoResponse (H323GatekeeperIRR &request, H225_InfoRequestResponse_perCallInfo_subtype &call)
virtual void OnAlerting ()
virtual void OnConnected ()
virtual BOOL OnHeartbeat ()
virtual PString GetCallCreditAmount () const
virtual BOOL GetCallCreditMode () const
virtual unsigned GetDurationLimit () const
virtual BOOL SendCallCreditServiceControl ()
BOOL AddCallCreditServiceControl (H225_ArrayOf_ServiceControlSession &serviceControl) const
virtual BOOL SendServiceControlSession (const H323ServiceControlSession &session)
virtual BOOL TranslateAliasAddress (const H225_AliasAddress &alias, H225_ArrayOf_AliasAddress &aliases, H323TransportAddress &address, BOOL &isGkRouted)
Access functions
H323GatekeeperServerGetGatekeeper () const
H323RegisteredEndPointGetEndPoint () const
BOOL IsAnsweringCall () const
unsigned GetCallReference () const
const OpalGloballyUniqueIDGetCallIdentifier () const
const OpalGloballyUniqueIDGetConferenceIdentifier () const
const PString & GetSourceNumber () const
const PStringArray & GetSourceAliases () const
const H323TransportAddressGetSourceHost () const
PString GetSourceAddress () const
const PString & GetDestinationNumber () const
const PStringArray & GetDestinationAliases () const
const H323TransportAddressGetDestinationHost () const
PString GetDestinationAddress () const
unsigned GetBandwidthUsed () const
BOOL SetBandwidthUsed (unsigned bandwidth)
const PTime & GetLastInfoResponseTime () const
const PTime & GetCallStartTime () const
const PTime & GetAlertingTime () const
const PTime & GetConnectedTime () const
const PTime & GetCallEndTime () const
H323Connection::CallEndReason GetCallEndReason () const

Protected Member Functions

void SetUsageInfo (const H225_RasUsageInformation &usage)

Protected Attributes

H323GatekeeperServergatekeeper
H323RegisteredEndPointendpoint
H323GatekeeperListenerrasChannel
Direction direction
unsigned callReference
OpalGloballyUniqueID callIdentifier
OpalGloballyUniqueID conferenceIdentifier
PString srcNumber
PStringArray srcAliases
H323TransportAddress srcHost
PString dstNumber
PStringArray dstAliases
H323TransportAddress dstHost
unsigned bandwidthUsed
unsigned infoResponseRate
PTime lastInfoResponse
BOOL drqReceived
PTime callStartTime
PTime alertingTime
PTime connectedTime
PTime callEndTime
H323Connection::CallEndReason callEndReason


Detailed Description

This class describes an active call on a gatekeeper.

Definition at line 667 of file gkserver.h.


Member Enumeration Documentation

enum H323GatekeeperCall::Direction

Enumerator:
AnsweringCall 
OriginatingCall 
UnknownDirection 

Definition at line 673 of file gkserver.h.


Constructor & Destructor Documentation

H323GatekeeperCall::H323GatekeeperCall ( H323GatekeeperServer server,
const OpalGloballyUniqueID callIdentifier,
Direction  direction 
)

Create a new gatekeeper call tracking record.

Parameters:
server  Owner gatekeeper server
callIdentifier  Unique call identifier
direction  Direction of call

Definition at line 1368 of file gkserver.cxx.

References bandwidthUsed, callEndReason, callReference, direction, drqReceived, endpoint, gatekeeper, H323GatekeeperServer::GetInfoResponseRate(), infoResponseRate, H323Connection::NumCallEndReasons, and rasChannel.

H323GatekeeperCall::~H323GatekeeperCall (  ) 

Destroy the call, removing itself from the endpoint.

Definition at line 1391 of file gkserver.cxx.

References SetBandwidthUsed().


Member Function Documentation

PObject::Comparison H323GatekeeperCall::Compare ( const PObject &  obj  )  const

Compare two objects.

Parameters:
obj  Other object

Definition at line 1397 of file gkserver.cxx.

References callIdentifier, direction, and UnknownDirection.

void H323GatekeeperCall::PrintOn ( ostream &  strm  )  const

Print the name of the gatekeeper.

Parameters:
strm  Stream to print to.

Definition at line 1419 of file gkserver.cxx.

References AnsweringCall, callIdentifier, direction, and OriginatingCall.

H323GatekeeperRequest::Response H323GatekeeperCall::OnAdmission ( H323GatekeeperARQ request  )  [virtual]

Handle an admission ARQ PDU. The default behaviour sets some internal variables from the ARQ data and then calls OnResolveAdmission, if necessary, and OnReplyAdmission every time.

Definition at line 1439 of file gkserver.cxx.

References H323GatekeeperARQ::acf, H323GatekeeperServer::AllocateBandwidth(), AnsweringCall, H323GatekeeperARQ::arq, bandwidthUsed, callReference, H323GatekeeperServer::CheckAliasAddressPolicy(), H323GatekeeperServer::CheckSignalAddressPolicy(), conferenceIdentifier, H323Transaction::Confirm, direction, dstAliases, dstHost, dstNumber, H225_AdmissionRejectReason::e_aliasesInconsistent, H225_AdmissionRejectReason::e_calledPartyNotRegistered, H225_AdmissionRequest::e_destCallSignalAddress, H225_AdmissionConfirm::e_destinationInfo, H225_AdmissionRequest::e_destinationInfo, H225_CallModel::e_gatekeeperRouted, H225_AdmissionRejectReason::e_incompleteAddress, H225_AdmissionConfirm::e_irrFrequency, H225_AdmissionRejectReason::e_requestDenied, H225_AdmissionRejectReason::e_resourceUnavailable, H225_AdmissionRejectReason::e_securityDenial, H225_AdmissionRequest::e_srcCallSignalAddress, H323GatekeeperRequest::endpoint, endpoint, H323GatekeeperServer::FindEndPointByAliasAddress(), H323GatekeeperServer::FindEndPointBySignalAddress(), gatekeeper, H323GatekeeperServer::GetDefaultBandwidth(), H323RegisteredEndPoint::GetProtocolVersion(), H323GatekeeperRequest::GetRasChannel(), H323Transaction::GetReplyAddress(), infoResponseRate, H323RegisteredEndPoint::IsBehindNAT(), H323GatekeeperServer::IsGatekeeperRouted(), H225_UUIEsRequested::m_alerting, H225_AdmissionConfirm::m_bandWidth, H225_AdmissionRequest::m_bandWidth, H225_AdmissionConfirm::m_callModel, H225_AdmissionRequest::m_callReferenceValue, H225_AdmissionRequest::m_conferenceID, H225_UUIEsRequested::m_connect, H225_AdmissionConfirm::m_destCallSignalAddress, H225_AdmissionRequest::m_destCallSignalAddress, H225_AdmissionConfirm::m_destinationInfo, H225_AdmissionRequest::m_destinationInfo, H225_AdmissionConfirm::m_irrFrequency, H225_AdmissionRequest::m_srcCallSignalAddress, H225_AdmissionRequest::m_srcInfo, H225_AdmissionConfirm::m_uuiesRequested, H225_AdmissionConfirm::m_willRespondToIRR, H225_AdmissionRequest::m_willSupplyUUIEs, rasChannel, H323Transaction::Reject, H323TransportAddress::SetPDU(), H323GatekeeperARQ::SetRejectReason(), srcAliases, srcHost, srcNumber, and TranslateAliasAddress().

Referenced by H323GatekeeperServer::OnAdmission().

BOOL H323GatekeeperCall::Disengage ( int  reason = -1  )  [virtual]

Shut down a call. This sendsa DRQ to the endpoint(s) to close the call down.

Parameters:
reason  Reason for disengage

Definition at line 1674 of file gkserver.cxx.

References H323GatekeeperListener::DisengageRequest(), drqReceived, H225_DisengageReason::e_forcedDrop, gatekeeper, rasChannel, and H323GatekeeperServer::RemoveCall().

H323GatekeeperRequest::Response H323GatekeeperCall::OnDisengage ( H323GatekeeperDRQ request  )  [virtual]

Handle a disengage DRQ PDU. The default behaviour simply returns TRUE.

Definition at line 1712 of file gkserver.cxx.

References callEndReason, H323Transaction::Confirm, H323GatekeeperDRQ::drq, drqReceived, H225_CallTerminationCause::e_releaseCompleteReason, H225_DisengageRejectReason::e_requestToDropOther, H225_DisengageRequest::e_terminationCause, H225_DisengageRequest::e_usageInformation, Q931::ErrorInCauseIE, H225_DisengageRequest::m_terminationCause, H225_DisengageRequest::m_usageInformation, H323Transaction::Reject, H323GatekeeperDRQ::SetRejectReason(), and SetUsageInfo().

H323GatekeeperRequest::Response H323GatekeeperCall::OnBandwidth ( H323GatekeeperBRQ request  )  [virtual]

Handle a bandwidth BRQ PDU. The default behaviour adjusts the bandwidth used by the gatekeeper and adjusts the remote endpoint according to those limits.

Definition at line 1751 of file gkserver.cxx.

References H323GatekeeperServer::AllocateBandwidth(), bandwidthUsed, H323GatekeeperBRQ::bcf, H323GatekeeperBRQ::brj, H323GatekeeperBRQ::brq, H323Transaction::Confirm, H225_BandRejectReason::e_insufficientResources, H225_BandRejectReason::e_invalidPermission, H225_BandwidthRequest::e_usageInformation, H323GatekeeperRequest::endpoint, endpoint, gatekeeper, H225_BandwidthReject::m_allowedBandWidth, H225_BandwidthConfirm::m_bandWidth, H225_BandwidthRequest::m_bandWidth, H225_BandwidthRequest::m_usageInformation, H323Transaction::Reject, H323GatekeeperBRQ::SetRejectReason(), and SetUsageInfo().

H323GatekeeperRequest::Response H323GatekeeperCall::OnInfoResponse ( H323GatekeeperIRR request,
H225_InfoRequestResponse_perCallInfo_subtype call 
) [virtual]

Handle an info request response IRR PDU. The default behaviour resets the heartbeat time monitoring the call.

Definition at line 1778 of file gkserver.cxx.

References callStartTime, H323Transaction::Confirm, connectedTime, H225_NonStandardIdentifier::e_h221NonStandard, H225_InfoRequestResponse_perCallInfo_subtype::e_nonStandardData, lastInfoResponse, H225_NonStandardParameter::m_data, H225_InfoRequestResponse_perCallInfo_subtype::m_nonStandardData, H225_NonStandardParameter::m_nonStandardIdentifier, H225_InfoRequestResponse_perCallInfo_subtype::m_usageInformation, OnConnected(), H323Transaction::Reject, and SetUsageInfo().

void H323GatekeeperCall::OnAlerting (  )  [virtual]

Call back when an info response detects an Alerting.

Definition at line 1823 of file gkserver.cxx.

Referenced by SetUsageInfo().

void H323GatekeeperCall::OnConnected (  )  [virtual]

Call back when an info response detects an Connected.

Definition at line 1828 of file gkserver.cxx.

Referenced by OnInfoResponse(), and SetUsageInfo().

BOOL H323GatekeeperCall::OnHeartbeat (  )  [virtual]

Function called to do heartbeat check of the call. Monitor the state of the call and make sure everything is OK.

A return value of FALSE indicates the call is to be closed for some reason.

Default behaviour checks the time since the last received IRR and if it has been too long does an IRQ to see if the call (and endpoint!) is still there and running. If the IRQ fails, FALSE is returned.

Definition at line 1844 of file gkserver.cxx.

References endpoint, H323GatekeeperListener::InfoRequest(), infoResponseRate, lastInfoResponse, and rasChannel.

virtual PString H323GatekeeperCall::GetCallCreditAmount (  )  const [virtual]

Get the current credit for this call. This function is only called if the client indicates that it can use the information provided.

The default behaviour calls the same function on the endpoint.

virtual BOOL H323GatekeeperCall::GetCallCreditMode (  )  const [virtual]

Get the call credit billing mode for this endpoint. This function is only called if the client indicates that it can use the information provided.

The default behaviour calls the same function on the endpoint.

virtual unsigned H323GatekeeperCall::GetDurationLimit (  )  const [virtual]

Get the duration limit for this call. This function is only called if the client indicates that it can use the information provided.

The default behaviour returns zero which indicates there is no duration limit applicable.

virtual BOOL H323GatekeeperCall::SendCallCreditServiceControl (  )  [virtual]

Send the call credit service control PDU. This will send an SCI pdu to the endpoint with the control service session information for the current call credit, if enabled.

BOOL H323GatekeeperCall::AddCallCreditServiceControl ( H225_ArrayOf_ServiceControlSession serviceControl  )  const

Add call credit and duration information to PDU.

Referenced by H323GatekeeperListener::DisengageRequest().

virtual BOOL H323GatekeeperCall::SendServiceControlSession ( const H323ServiceControlSession session  )  [virtual]

Send the service control session for the PDU. This will send an SCI pdu to the endpoint with the control service session information provided.

BOOL H323GatekeeperCall::TranslateAliasAddress ( const H225_AliasAddress alias,
H225_ArrayOf_AliasAddress aliases,
H323TransportAddress address,
BOOL &  isGkRouted 
) [virtual]

Translate a given alias to an alias set and signal address. This is called by the OnAdmission() handler to fill in the ACF

The default behaviour calls H323GatekeeperServer::TranslateAliasAddress.

Definition at line 2056 of file gkserver.cxx.

References gatekeeper, and H323GatekeeperServer::TranslateAliasAddress().

Referenced by OnAdmission().


The documentation for this class was generated from the following files:
Generated on Thu Oct 25 13:45:26 2007 for h323plus by  doxygen 1.5.2