OPAL
Version 3.12.9
|
#include <gkserver.h>
Data Structures | |
class | StringMap |
Public Member Functions | |
WORD | GetDefaultUdpPort () |
PSafePtr< H323RegisteredEndPoint > | FindDestinationEndPoint (const OpalGloballyUniqueID &id, H323GatekeeperCall::Direction direction) |
void | RemoveAlias (H323RegisteredEndPoint &ep, const PString &alias) |
virtual PBoolean | OnSendDescriptorForEndpoint (H323RegisteredEndPoint &, H225_ArrayOf_AliasAddress &, H225_EndpointType &, H225_ArrayOf_AliasAddress &) |
virtual PBoolean | AllowDuplicateAlias (const H225_ArrayOf_AliasAddress &) |
virtual PBoolean | OnSendFeatureSet (unsigned, H225_FeatureSet &features) const |
virtual void | OnReceiveFeatureSet (unsigned, const H225_FeatureSet &features) const |
Construction | |
H323GatekeeperServer (H323EndPoint &endpoint) | |
~H323GatekeeperServer () | |
Protocol Handler Operations | |
virtual H323Transactor * | CreateListener (H323Transport *transport) |
EndPoint Operations | |
virtual H323GatekeeperRequest::Response | OnDiscovery (H323GatekeeperGRQ &request) |
virtual H323GatekeeperRequest::Response | OnRegistration (H323GatekeeperRRQ &request) |
virtual H323GatekeeperRequest::Response | OnUnregistration (H323GatekeeperURQ &request) |
virtual H323GatekeeperRequest::Response | OnInfoResponse (H323GatekeeperIRR &request) |
virtual void | AddEndPoint (H323RegisteredEndPoint *ep) |
virtual PBoolean | RemoveEndPoint (H323RegisteredEndPoint *ep) |
virtual H323RegisteredEndPoint * | CreateRegisteredEndPoint (H323GatekeeperRRQ &request) |
virtual PString | CreateEndPointIdentifier () |
virtual PSafePtr < H323RegisteredEndPoint > | FindEndPointByIdentifier (const PString &identifier, PSafetyMode mode=PSafeReference) |
virtual PSafePtr < H323RegisteredEndPoint > | FindEndPointBySignalAddresses (const H225_ArrayOf_TransportAddress &addresses, PSafetyMode mode=PSafeReference) |
virtual PSafePtr < H323RegisteredEndPoint > | FindEndPointBySignalAddress (const H323TransportAddress &address, PSafetyMode mode=PSafeReference) |
virtual PSafePtr < H323RegisteredEndPoint > | FindEndPointByAliasAddress (const H225_AliasAddress &alias, PSafetyMode mode=PSafeReadWrite) |
virtual PSafePtr < H323RegisteredEndPoint > | FindEndPointByAliasString (const PString &alias, PSafetyMode mode=PSafeReference) |
virtual PSafePtr < H323RegisteredEndPoint > | FindEndPointByPartialAlias (const PString &alias, PSafetyMode mode=PSafeReference) |
virtual PSafePtr < H323RegisteredEndPoint > | FindEndPointByPrefixString (const PString &prefix, PSafetyMode mode=PSafeReference) |
PSafePtr< H323RegisteredEndPoint > | GetFirstEndPoint (PSafetyMode mode=PSafeReference) |
Call Operations | |
virtual H323GatekeeperRequest::Response | OnAdmission (H323GatekeeperARQ &request) |
virtual H323GatekeeperRequest::Response | OnDisengage (H323GatekeeperDRQ &request) |
virtual H323GatekeeperRequest::Response | OnBandwidth (H323GatekeeperBRQ &request) |
virtual H323GatekeeperCall * | CreateCall (const OpalGloballyUniqueID &callIdentifier, H323GatekeeperCall::Direction direction) |
virtual void | AddCall (H323GatekeeperCall *) |
virtual void | RemoveCall (H323GatekeeperCall *call) |
virtual PSafePtr < H323GatekeeperCall > | FindCall (const PString &description, PSafetyMode mode=PSafeReference) |
virtual PSafePtr < H323GatekeeperCall > | FindCall (const OpalGloballyUniqueID &callIdentifier, PBoolean answeringCall, PSafetyMode mode=PSafeReference) |
virtual PSafePtr < H323GatekeeperCall > | FindCall (const OpalGloballyUniqueID &callIdentifier, H323GatekeeperCall::Direction direction, PSafetyMode mode=PSafeReference) |
PSafePtr< H323GatekeeperCall > | GetFirstCall (PSafetyMode mode=PSafeReference) |
Routing operations | |
virtual H323GatekeeperRequest::Response | OnLocation (H323GatekeeperLRQ &request) |
virtual PBoolean | TranslateAliasAddress (const H225_AliasAddress &alias, H225_ArrayOf_AliasAddress &aliases, H323TransportAddress &address, PBoolean &isGkRouted, H323GatekeeperCall *call) |
virtual PBoolean | TranslateAliasAddressToSignalAddress (const H225_AliasAddress &alias, H323TransportAddress &address) |
Policy operations | |
virtual PBoolean | CheckSignalAddressPolicy (const H323RegisteredEndPoint &ep, const H225_AdmissionRequest &arq, const H323TransportAddress &address) |
virtual PBoolean | CheckAliasAddressPolicy (const H323RegisteredEndPoint &ep, const H225_AdmissionRequest &arq, const H225_AliasAddress &alias) |
virtual PBoolean | CheckAliasStringPolicy (const H323RegisteredEndPoint &ep, const H225_AdmissionRequest &arq, const PString &alias) |
virtual unsigned | AllocateBandwidth (unsigned newBandwidth, unsigned oldBandwidth=0) |
Security and authentication functions | |
virtual PBoolean | GetAdmissionRequestAuthentication (H323GatekeeperARQ &info, H235Authenticators &authenticators) |
virtual PBoolean | GetUsersPassword (const PString &alias, PString &password, H323RegisteredEndPoint ®isteredEndpoint) const |
virtual PBoolean | GetUsersPassword (const PString &alias, PString &password) const |
H.323 Annex G Peer Element support | |
H323PeerElement * | GetPeerElement () const |
void | SetPeerElement (H323PeerElement *newPeerElement) |
void | CreatePeerElement (const H323TransportAddress &h501Interface) |
PBoolean | OpenPeerElement (const H323TransportAddress &remotePeer, PBoolean append=false, PBoolean keepTrying=true) |
Access functions | |
const PString & | GetGatekeeperIdentifier () const |
void | SetGatekeeperIdentifier (const PString &id, PBoolean adjustListeners=true) |
unsigned | GetAvailableBandwidth () const |
void | SetAvailableBandwidth (unsigned bps100) |
unsigned | GetUsedBandwidth () const |
unsigned | GetDefaultBandwidth () const |
unsigned | GetTimeToLive () const |
void | SetTimeToLive (unsigned seconds) |
unsigned | GetInfoResponseRate () const |
void | SetInfoResponseRate (unsigned seconds) |
PBoolean | IsGatekeeperRouted () const |
PBoolean | IsRequiredH235 () const |
unsigned | GetActiveRegistrations () const |
unsigned | GetPeakRegistrations () const |
unsigned | GetTotalRegistrations () const |
unsigned | GetRejectedRegistrations () const |
unsigned | GetActiveCalls () const |
unsigned | GetPeakCalls () const |
unsigned | GetTotalCalls () const |
unsigned | GetRejectedCalls () const |
![]() | |
H323TransactionServer (H323EndPoint &endpoint) | |
~H323TransactionServer () | |
H323EndPoint & | GetOwnerEndPoint () const |
PBoolean | AddListeners (const H323TransportAddressArray &ifaces) |
PBoolean | AddListener (const H323TransportAddress &interfaceName) |
PBoolean | AddListener (H323Transport *transport) |
PBoolean | AddListener (H323Transactor *listener) |
PBoolean | RemoveListener (H323Transactor *listener) |
PBoolean | SetUpCallSignalAddresses (H225_ArrayOf_TransportAddress &addresses) |
Protected Member Functions | |
PDECLARE_NOTIFIER (PThread, H323GatekeeperServer, MonitorMain) | |
PLIST (ListenerList, H323GatekeeperListener) | |
![]() | |
PLIST (ListenerList, H323Transactor) | |
Friends | |
class | H323GatekeeperRRQ |
class | H323GatekeeperARQ |
This class implements a basic gatekeeper server functionality. An instance of this class contains all of the state information and operations for a gatekeeper. Multiple gatekeeper listeners may be using this class to link individual UDP (or other protocol) packets from various sources (interfaces etc) into a single instance.
There is typically only one instance of this class, though it is not limited to that. An application would also quite likely descend from this class and override call back functions to implement more complex policy.
H323GatekeeperServer::H323GatekeeperServer | ( | H323EndPoint & | endpoint | ) |
Create a new gatekeeper.
H323GatekeeperServer::~H323GatekeeperServer | ( | ) |
Destroy gatekeeper.
|
inlinevirtual |
Called whenever a new call is started
|
virtual |
Add a new registered endpoint to the server database. Once the endpoint has been added it is then owned by the server and will be deleted when it is removed.
The user woiuld not usually use this function as it is used internally by the server when new registration requests (RRQ) are received.
Note that a registered endpoint has no relationship in this software to a H323EndPoint class.
|
virtual |
Allocate or change the bandwidth being used. This function modifies the total bandwidth used by the all endpoints registered with this gatekeeper. It is called when ARQ or BRQ PDU's are received.
|
inlinevirtual |
References canHaveDuplicateAlias.
|
virtual |
Check the alias address against the security policy. This validates that the specified endpoint is allowed to make a connection to or from the specified alias address.
It is expected that a user would override this function to implement application specified security policy algorithms.
The default behaviour checks the canOnlyAnswerRegisteredEP or canOnlyCallRegisteredEP meber variables depending on if it is an incoming call and if that is true only allows the call to proceed if the alias is also registered with the gatekeeper.
|
virtual |
Check the alias address against the security policy. This validates that the specified endpoint is allowed to make a connection to or from the specified simple alias string.
It is expected that a user would override this function to implement application specified security policy algorithms.
The default behaviour checks the canOnlyAnswerRegisteredEP or canOnlyCallRegisteredEP meber variables depending on if it is an incoming call and if that is true only allows the call to proceed if the alias is also registered with the gatekeeper.
|
virtual |
Check the signal address against the security policy. This validates that the specified endpoint is allowed to make a connection to or from the specified signal address.
It is expected that a user would override this function to implement application specified security policy algorithms.
The default behaviour simply returns true.
|
virtual |
Create a new call object. The user woiuld not usually use this function as it is used internally by the server when new calls (ARQ) are made.
However, a user may override this function to create objects that are user defined descendants of H323GatekeeperCall so the user can maintain extra information on a call by call basis.
|
virtual |
Create a new unique identifier for the registered endpoint. The returned identifier must be unique over the lifetime of this gatekeeper server.
The default behaviour simply returns the string representation of the member variable nextIdentifier. There could be a problem in this implementation after 4,294,967,296 have been registered.
|
virtual |
Create a new H323GatkeeperListener. The user woiuld not usually use this function as it is used internally by the server when new listeners are added by H323TransportAddress.
However, a user may override this function to create objects that are user defined descendants of H323GatekeeperListener so the user can maintain extra information on a interface by interface basis.
transport | Transport for listener |
Implements H323TransactionServer.
void H323GatekeeperServer::CreatePeerElement | ( | const H323TransportAddress & | h501Interface | ) |
Create an associated peer element for the gatekeeper. The existing peer element is checked to be listening on the same interface as specified and if it is not it is changed to the specified address.
|
virtual |
Create a new registered endpoint object. The user woiuld not usually use this function as it is used internally by the server when new registration requests (RRQ) are received.
However, a user may override this function to create objects that are user defined descendants of H323RegisteredEndPoint so the user can maintain extra information on a endpoint by endpoint basis.
|
virtual |
Find the call given the identifier.
|
virtual |
Find the call given the identifier.
|
virtual |
Find the call given the identifier.
PSafePtr<H323RegisteredEndPoint> H323GatekeeperServer::FindDestinationEndPoint | ( | const OpalGloballyUniqueID & | id, |
H323GatekeeperCall::Direction | direction | ||
) |
|
virtual |
Find a registered endpoint given its raw alias address.
|
virtual |
Find a registered endpoint given its simple alias string.
|
virtual |
Find a registered endpoint given its endpoint identifier.
|
virtual |
Find the first registered endpoint given a partial alias string.
|
virtual |
Find the first registered endpoint given a number prefix string.
|
virtual |
Find a registered endpoint given its signal address.
|
virtual |
Find a registered endpoint given a list of signal addresses.
|
inline |
Get the currently active call count.
References activeCalls.
|
inline |
Get the currently active registration count.
References byIdentifier.
|
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.
info | ARQ being constructed |
authenticators | New authenticators for ARQ |
|
inline |
Get the total bandwidth available in 100's of bits per second.
References totalBandwidth.
|
inline |
Get the default bandwidth for calls.
References defaultBandwidth.
|
inlinevirtual |
Implements H323TransactionServer.
References H225_RAS::DefaultRasUdpPort.
|
inline |
Get first endpoint for enumeration.
References activeCalls.
|
inline |
Get first endpoint for enumeration.
References byIdentifier.
|
inline |
Get the identifier name for this gatekeeper.
References gatekeeperIdentifier.
|
inline |
Get the default time for monitoring calls via IRR.
References defaultInfoResponseRate.
|
inline |
Get the peak calls count.
References peakCalls.
|
inline |
Get the peak registration count.
References peakRegistrations.
|
inline |
Get the associated peer element for the gatekeeper.
References peerElement.
|
inline |
Get the total calls rejected since start up.
References rejectedCalls.
|
inline |
Get the total registrations rejected since start up.
References rejectedRegistrations.
|
inline |
Get the default time to live for new registered endpoints.
References defaultTimeToLive.
|
inline |
Get the total calls since start up.
References totalCalls.
|
inline |
Get the total registrations since start up.
References totalRegistrations.
|
inline |
Get the total bandwidth used in 100's of bits per second.
References usedBandwidth.
|
virtual |
Get password for user if H.235 security active. Returns true if user is found and password returned. Note the password may be empty in which case the user was found but explicitly ddoes not require security, possibly overriding the requireH235 flag.
|
virtual |
|
inline |
Get flag for is gatekeeper routed.
References isGatekeeperRouted.
|
inline |
Get flag for if H.235 authentication is required.
References requireH235.
|
virtual |
Handle an admission ARQ PDU. The default behaviour verifies that the call is allowed by the policies the gatekeeper server requires, then attempts to look up the required signal address for the call. It also manages bandwidth allocations.
|
virtual |
Handle a bandwidth BRQ PDU. The default behaviour finds the call and does some checks then calls the H323GatekeeperCall function of the same name.
|
virtual |
Handle a discovery GRQ PDU. The default behaviour deals with the authentication scheme nogotiation.
|
virtual |
Handle a disengage DRQ PDU. The default behaviour finds the call by its id provided in the DRQ and removes it from the gatekeeper server database.
|
virtual |
Handle an info request response IRR PDU. The default behaviour calls the function of the same name in the endpoint instance.
|
virtual |
Handle a location LRQ PDU. The default behaviour just uses TranslateAliasAddressToSignalAddress to determine the endpoints location.
It is expected that a user would override this function to implement application specified look up algorithms.
|
virtual |
|
virtual |
Call back on receiving a RAS registration for this endpoint. The default behaviour checks if the registered endpoint already exists and if not creates a new endpoint. It then calls the OnRegistration() on that new endpoint instance.
If returns true then a RCF is sent otherwise an RRJ is sent.
|
inlinevirtual |
|
virtual |
|
virtual |
Handle an unregistration URQ PDU. The default behaviour removes the aliases defined in the URQ and if all aliases for the registered endpoint are removed then the endpoint itself is removed.
PBoolean H323GatekeeperServer::OpenPeerElement | ( | const H323TransportAddress & | remotePeer, |
PBoolean | append = false , |
||
PBoolean | keepTrying = true |
||
) |
Create a new Peer Element and establish a service relationship. If append is false, the existing peer element is automatically deleted and recreated. If append is true then a new service relationship is added to the existing peer element.
|
protected |
|
protected |
void H323GatekeeperServer::RemoveAlias | ( | H323RegisteredEndPoint & | ep, |
const PString & | alias | ||
) |
|
virtual |
Called whenever call is ended. By default, removes the call from the call list
|
virtual |
Remove a registered endpoint from the server database.
|
inline |
Set the total bandwidth available in 100's of bits per second.
References totalBandwidth.
void H323GatekeeperServer::SetGatekeeperIdentifier | ( | const PString & | id, |
PBoolean | adjustListeners = true |
||
) |
Set the identifier name for this gatekeeper. If adjustListeners is true then all gatekeeper listeners that are attached to this gatekeeper server have their identifier names changed as well.
|
inline |
Set the default time for monitoring calls via IRR.
References defaultInfoResponseRate.
void H323GatekeeperServer::SetPeerElement | ( | H323PeerElement * | newPeerElement | ) |
Set the associated peer element for the gatekeeper. The existing peer element is automatically deleted.
|
inline |
Set the default time to live for new registered endpoints.
References defaultTimeToLive.
|
virtual |
Translate a given alias to an alias set and signal address. This is called by the OnAdmission() handler to fill in the ACF or OnLocation() to fill the LCF informing the calling endpoint where to actually connect to.
It is expected that a user would override this function to implement application specified look up algorithms.
The default behaviour calls TranslateAliasAddressToSignalAddress() which is provided only for backwards compatibility.
|
virtual |
Translate a given alias to a signal address. This is called by the OnAdmission() handler to fill in the ACF or OnLocation() to fill the LCF informing the calling endpoint where to actually connect to.
It is expected that a user would override this function to implement application specified look up algorithms.
The default behaviour checks the isGatekeeperRouted and if true simply returns the gatekeepers associated endpoints (not registered endpoint, but real H323EndPoint) listening address.
If isGatekeeperRouted is false then it looks up the registered endpoints by alias and uses the saved signal address in the database.
If the alias is not registered then the address parameter is not changed and the function returns true if it is a valid address, false if it was empty.
|
friend |
|
friend |
|
protected |
Referenced by GetActiveCalls(), and GetFirstCall().
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
Referenced by GetActiveRegistrations(), and GetFirstEndPoint().
|
protected |
|
protected |
Referenced by AllowDuplicateAlias().
|
protected |
|
protected |
|
protected |
|
protected |
Referenced by GetDefaultBandwidth().
|
protected |
Referenced by GetInfoResponseRate(), and SetInfoResponseRate().
|
protected |
Referenced by GetTimeToLive(), and SetTimeToLive().
|
protected |
|
protected |
Referenced by GetGatekeeperIdentifier().
|
protected |
|
protected |
Referenced by IsGatekeeperRouted().
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
Referenced by GetPeakCalls().
|
protected |
Referenced by GetPeakRegistrations().
|
protected |
Referenced by GetPeerElement().
|
protected |
Referenced by GetRejectedCalls().
|
protected |
Referenced by GetRejectedRegistrations().
|
protected |
Referenced by IsRequiredH235().
|
protected |
Referenced by GetAvailableBandwidth(), and SetAvailableBandwidth().
|
protected |
Referenced by GetTotalCalls().
|
protected |
Referenced by GetTotalRegistrations().
|
protected |
Referenced by GetUsedBandwidth().