#include <gkserver.h>
Public Member Functions | |
Construction | |
| H323RegisteredEndPoint (H323GatekeeperServer &server, const PString &id) | |
Overrides from PObject | |
| Comparison | Compare (const PObject &obj) const |
| void | PrintOn (ostream &strm) const |
Call Operations | |
| virtual void | AddCall (H323GatekeeperCall *call) |
| virtual BOOL | RemoveCall (H323GatekeeperCall *call) |
| PINDEX | GetCallCount () const |
| H323GatekeeperCall & | GetCall (PINDEX idx) |
Protocol Operations | |
| virtual H323GatekeeperRequest::Response | OnRegistration (H323GatekeeperRRQ &request) |
| virtual H323GatekeeperRequest::Response | OnFullRegistration (H323GatekeeperRRQ &request) |
| virtual H323GatekeeperRequest::Response | OnSecureRegistration (H323GatekeeperRRQ &request) |
| virtual H323GatekeeperRequest::Response | OnUnregistration (H323GatekeeperURQ &request) |
| virtual BOOL | Unregister (int reason=-1) |
| virtual H323GatekeeperRequest::Response | OnInfoResponse (H323GatekeeperIRR &request) |
| virtual BOOL | OnTimeToLive () |
| virtual PString | GetCallCreditAmount () const |
| virtual BOOL | GetCallCreditMode () const |
| virtual BOOL | SendServiceControlSession (const H323ServiceControlSession &session) |
| virtual BOOL | AddServiceControlSession (const H323ServiceControlSession &session, H225_ArrayOf_ServiceControlSession &serviceControl) |
Access functions | |
| virtual BOOL | SetPassword (const PString &password, const PString &username=PString::Empty()) |
| const PString & | GetIdentifier () const |
| const OpalGloballyUniqueID & | GetDescriptorID () const |
| H323GatekeeperServer & | GetGatekeeper () const |
| const H323TransportAddressArray & | GetRASAddresses () const |
| PINDEX | GetRASAddressCount () const |
| H323TransportAddress | GetRASAddress (PINDEX idx) const |
| const H323TransportAddressArray & | GetSignalAddresses () const |
| PINDEX | GetSignalAddressCount () const |
| H323TransportAddress | GetSignalAddress (PINDEX idx) const |
| const PStringArray & | GetAliases () const |
| BOOL | ContainsAlias (const PString &alias) |
| PINDEX | GetAliasCount () const |
| PString | GetAlias (PINDEX idx) const |
| void | RemoveAlias (const PString &alias) |
| virtual const H235Authenticators & | GetAuthenticators () const |
| PINDEX | GetPrefixCount () const |
| PString | GetPrefix (PINDEX idx) const |
| const PCaselessString & | GetApplicationInfo () const |
| unsigned | GetProtocolVersion () const |
| BOOL | IsBehindNAT () const |
| BOOL | CanDisplayAmountString () const |
| BOOL | CanEnforceDurationLimit () const |
| BOOL | CanReceiveRIP () const |
| BOOL | GetH225Version () const |
H.501 access functions | |
| virtual BOOL | OnSendDescriptorForEndpoint (H225_ArrayOf_AliasAddress &aliases, H225_EndpointType &terminalType, H225_ArrayOf_AliasAddress &transportAddresses) |
Protected Attributes | |
| H323GatekeeperServer & | gatekeeper |
| H323GatekeeperListener * | rasChannel |
| PString | identifier |
| OpalGloballyUniqueID | descriptorID |
| H323TransportAddressArray | rasAddresses |
| H323TransportAddressArray | signalAddresses |
| PStringArray | aliases |
| PStringArray | voicePrefixes |
| PCaselessString | applicationInfo |
| unsigned | protocolVersion |
| BOOL | isBehindNAT |
| BOOL | canDisplayAmountString |
| BOOL | canEnforceDurationLimit |
| unsigned | h225Version |
| unsigned | timeToLive |
| H235Authenticators | authenticators |
| PTime | lastRegistration |
| PTime | lastInfoResponse |
| PSortedList< H323GatekeeperCall > | activeCalls |
| POrdinalDictionary< PString > | serviceControlSessions |
Definition at line 892 of file gkserver.h.
| H323RegisteredEndPoint::H323RegisteredEndPoint | ( | H323GatekeeperServer & | server, | |
| const PString & | id | |||
| ) |
Create a new endpoint registration record.
| server | Gatekeeper server data |
| id | Identifier |
Definition at line 2068 of file gkserver.cxx.
References activeCalls.
| PObject::Comparison H323RegisteredEndPoint::Compare | ( | const PObject & | obj | ) | const |
Compare two objects.
| obj | Other object |
Definition at line 2086 of file gkserver.cxx.
References identifier.
| void H323RegisteredEndPoint::PrintOn | ( | ostream & | strm | ) | const |
Print the name of the gatekeeper.
| strm | Stream to print to. |
Definition at line 2096 of file gkserver.cxx.
References identifier.
| void H323RegisteredEndPoint::AddCall | ( | H323GatekeeperCall * | call | ) | [virtual] |
Add a call to the endpoints list of active calls. This is largely an internal routine, it is not expected the user would need to deal with this function.
Definition at line 2105 of file gkserver.cxx.
References activeCalls.
| BOOL H323RegisteredEndPoint::RemoveCall | ( | H323GatekeeperCall * | call | ) | [virtual] |
Remove a call from the endpoints list of active calls. This is largely an internal routine, it is not expected the user would need to deal with this function.
Definition at line 2124 of file gkserver.cxx.
References activeCalls.
Referenced by H323GatekeeperServer::RemoveCall().
| PINDEX H323RegisteredEndPoint::GetCallCount | ( | ) | const [inline] |
Get the count of active calls on this endpoint.
Definition at line 941 of file gkserver.h.
References activeCalls.
Referenced by H323GatekeeperServer::RemoveEndPoint().
| H323GatekeeperCall& H323RegisteredEndPoint::GetCall | ( | PINDEX | idx | ) | [inline] |
Get the details of teh active call on this endpoint.
Definition at line 945 of file gkserver.h.
References activeCalls.
Referenced by H323GatekeeperServer::RemoveEndPoint().
| H323GatekeeperRequest::Response H323RegisteredEndPoint::OnRegistration | ( | H323GatekeeperRRQ & | request | ) | [virtual] |
Call back on receiving a RAS registration for this endpoint. The default behaviour extract information from the RRQ and sets internal variables to that data.
If returns TRUE then a RCF is sent otherwise an RRJ is sent.
Definition at line 2203 of file gkserver.cxx.
References H323PeerElement::AddDescriptor(), AddServiceControlSession(), aliases, canDisplayAmountString, H323GatekeeperRequest::CheckCryptoTokens(), H323Transaction::Confirm, H323PeerElementDescriptor::CopyToAddressTemplate(), descriptorID, H225_RegistrationRejectReason::e_discoveryRequired, H225_RegistrationRequest::e_endpointIdentifier, H225_RegistrationConfirm::e_serviceControl, H225_RegistrationConfirm::e_terminalAlias, H225_RegistrationRequest::e_terminalAlias, H225_RegistrationRequest::e_timeToLive, gatekeeper, GetCallCreditAmount(), GetCallCreditMode(), H323GatekeeperServer::GetPeerElement(), H323GatekeeperRequest::GetRasChannel(), H323GatekeeperServer::GetTimeToLive(), identifier, lastRegistration, H323PeerElement::LocalServiceRelationshipOrdinal, H225_RegistrationConfirm::m_callSignalAddress, H225_RegistrationRequest::m_callSignalAddress, H225_RegistrationConfirm::m_endpointIdentifier, H225_RegistrationRequest::m_keepAlive, H225_RegistrationRequest::m_protocolIdentifier, H225_RegistrationRequest::m_rasAddress, H225_RegistrationConfirm::m_serviceControl, H225_RegistrationConfirm::m_terminalAlias, H225_RegistrationRequest::m_terminalAlias, H225_RegistrationRequest::m_terminalType, H225_RegistrationConfirm::m_timeToLive, H225_RegistrationRequest::m_timeToLive, OnFullRegistration(), OnSendDescriptorForEndpoint(), protocolVersion, rasAddresses, rasChannel, H323GatekeeperRRQ::rcf, H323Transaction::Reject, H323GatekeeperRRQ::rrq, H323GatekeeperRRQ::SetRejectReason(), signalAddresses, and timeToLive.
| H323GatekeeperRequest::Response H323RegisteredEndPoint::OnFullRegistration | ( | H323GatekeeperRRQ & | request | ) | [virtual] |
Call back on receiving a RAS full registration for this endpoint. This is not called if the keepAlive flag is set indicating a lightweight RRQ has been received.
The default behaviour extract information from the RRQ and sets internal variables to that data.
If returns TRUE then a RCF is sent otherwise an RRJ is sent.
Definition at line 2307 of file gkserver.cxx.
References applicationInfo, canDisplayAmountString, canEnforceDurationLimit, H225_RegistrationRequest::e_callCreditCapability, H225_CallCreditCapability::e_canDisplayAmountString, H225_CallCreditCapability::e_canEnforceDurationLimit, H225_EndpointType::e_gateway, H225_RegistrationRejectReason::e_invalidCallSignalAddress, H225_GatewayInfo::e_protocol, H225_VoiceCaps::e_supportedPrefixes, H225_RegistrationRequest::e_terminalAlias, H225_SupportedProtocols::e_voice, H323Transactor::GetEndPoint(), H323Transaction::GetReplyAddresses(), h225Version, H323Transaction::IsBehindNAT(), isBehindNAT, H323EndPoint::IsLocalAddress(), H225_RegistrationRequest::m_callCreditCapability, H225_RegistrationRequest::m_callSignalAddress, H225_CallCreditCapability::m_canDisplayAmountString, H225_CallCreditCapability::m_canEnforceDurationLimit, H225_RegistrationRequest::m_endpointVendor, H225_EndpointType::m_gateway, H225_GatewayInfo::m_protocol, H225_RegistrationRequest::m_protocolIdentifier, H225_VoiceCaps::m_supportedPrefixes, H225_RegistrationRequest::m_terminalAlias, H225_RegistrationRequest::m_terminalType, OnSecureRegistration(), rasAddresses, rasChannel, H323Transaction::Reject, H323GatekeeperRRQ::rrq, H323GatekeeperRRQ::SetRejectReason(), signalAddresses, and voicePrefixes.
Referenced by OnRegistration().
| H323GatekeeperRequest::Response H323RegisteredEndPoint::OnSecureRegistration | ( | H323GatekeeperRRQ & | request | ) | [virtual] |
Call back to set security on RAS full registration for this endpoint. This is called from OnFullRegistration().
The default behaviour extract information from the RRQ and sets internal variables to that data.
If returns TRUE then a RCF is sent otherwise an RRJ is sent.
Definition at line 2414 of file gkserver.cxx.
References H323Transaction::Confirm, H225_RegistrationRejectReason::e_securityDenial, gatekeeper, H323GatekeeperServer::GetUsersPassword(), H323GatekeeperServer::IsRequiredH235(), H323Transaction::Reject, SetPassword(), and H323GatekeeperRRQ::SetRejectReason().
Referenced by OnFullRegistration().
| H323GatekeeperRequest::Response H323RegisteredEndPoint::OnUnregistration | ( | H323GatekeeperURQ & | request | ) | [virtual] |
Call back on receiving a RAS unregistration for this endpoint. The default behaviour clears all calls owned by this endpoint.
Definition at line 2455 of file gkserver.cxx.
References activeCalls, H323Transaction::Confirm, H225_UnregRejectReason::e_callInProgress, H323Transaction::Reject, and H323GatekeeperURQ::SetRejectReason().
| BOOL H323RegisteredEndPoint::Unregister | ( | int | reason = -1 |
) | [virtual] |
Force unregistration of the endpoint. This sendsa URQ to the endpoint(s) to close the call down.
| reason | Reason for unregistration |
Definition at line 2468 of file gkserver.cxx.
References H225_UnregRequestReason::e_maintenance, gatekeeper, rasChannel, H323GatekeeperServer::RemoveEndPoint(), and H323GatekeeperListener::UnregistrationRequest().
| H323GatekeeperRequest::Response H323RegisteredEndPoint::OnInfoResponse | ( | H323GatekeeperIRR & | request | ) | [virtual] |
Handle an info request response IRR PDU. The default behaviour finds each call current for endpoint and calls the function of the same name in the H323GatekeeperCall instance.
Definition at line 2490 of file gkserver.cxx.
References activeCalls, H323GatekeeperCall::AnsweringCall, applicationInfo, H323Transaction::Confirm, H225_InfoRequestResponseStatus::e_invalidCall, H225_InfoRequestResponse::e_irrStatus, H225_InfoRequestResponse_perCallInfo_subtype::e_originator, H225_InfoRequestResponse::e_perCallInfo, gatekeeper, H323GatekeeperIRR::irr, lastInfoResponse, H225_InfoRequestResponse::m_irrStatus, H225_InfoRequestResponse::m_perCallInfo, H323GatekeeperCall::OriginatingCall, protocolVersion, H323Transaction::Reject, and H323GatekeeperCall::UnknownDirection.
| BOOL H323RegisteredEndPoint::OnTimeToLive | ( | ) | [virtual] |
Function called to do time to live check of the call. Monitor the state of the endpoint and make sure everything is OK.
A return value of FALSE indicates the endpoint has expired and is to be unregistered and removed.
Default behaviour checks the time since the last received RRQ and if it has been too long does an IRQ to see if the endpoint is still there and running. If the IRQ fails, FALSE is returned.
Definition at line 2570 of file gkserver.cxx.
References H323GatekeeperListener::InfoRequest(), lastInfoResponse, lastRegistration, rasChannel, and timeToLive.
| virtual PString H323RegisteredEndPoint::GetCallCreditAmount | ( | ) | const [virtual] |
Get the current call credit for this endpoint. This function is only called if the client indicates that it can use the information provided. If a server wishes to enable this feature by returning a non-empty string, it must be consistent in that usage. That is the H323GatekeeperCall::GetCallCreditAmount() for this endpoint must also return non-empty value.
The return value is a UTF-8 string for amount, including currency.
The default behaviour returns an empty string disabling the function.
Referenced by OnRegistration().
| virtual BOOL H323RegisteredEndPoint::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 return TRUE indicating that calls will debit the account.
Referenced by OnRegistration().
| virtual BOOL H323RegisteredEndPoint::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.
| virtual BOOL H323RegisteredEndPoint::AddServiceControlSession | ( | const H323ServiceControlSession & | session, | |
| H225_ArrayOf_ServiceControlSession & | serviceControl | |||
| ) | [virtual] |
Set the service control session for the PDU. This is an internal function.
Referenced by OnRegistration().
| BOOL H323RegisteredEndPoint::SetPassword | ( | const PString & | password, | |
| const PString & | username = PString::Empty() | |||
| ) | [virtual] |
Set password for user activating H.235 security.
Definition at line 2436 of file gkserver.cxx.
References authenticators.
Referenced by OnSecureRegistration().
| const PString& H323RegisteredEndPoint::GetIdentifier | ( | ) | const [inline] |
Get the endpoint identifier assigned to the endpoint.
Definition at line 1074 of file gkserver.h.
References identifier.
Referenced by H323GatekeeperServer::AddEndPoint(), H323GatekeeperListener::DisengageRequest(), H323GatekeeperServer::RemoveAlias(), H323GatekeeperServer::RemoveEndPoint(), and H323GatekeeperListener::UnregistrationRequest().
| const OpalGloballyUniqueID& H323RegisteredEndPoint::GetDescriptorID | ( | ) | const [inline] |
Get the Peer Element descriptor ID assigned to the endpoint.
Definition at line 1078 of file gkserver.h.
References descriptorID.
Referenced by H323GatekeeperServer::RemoveEndPoint().
| H323GatekeeperServer& H323RegisteredEndPoint::GetGatekeeper | ( | ) | const [inline] |
Get the gatekeeper server data object that owns this endpoint.
Definition at line 1082 of file gkserver.h.
References gatekeeper.
| const H323TransportAddressArray& H323RegisteredEndPoint::GetRASAddresses | ( | ) | const [inline] |
Get the addresses that can be used to contact this endpoint via the RAS protocol.
Definition at line 1087 of file gkserver.h.
References rasAddresses.
Referenced by H323GatekeeperListener::DisengageRequest(), H323GatekeeperListener::InfoRequest(), and H323GatekeeperListener::UnregistrationRequest().
| PINDEX H323RegisteredEndPoint::GetRASAddressCount | ( | ) | const [inline] |
Get the number of addresses that can be used to contact this endpoint via the RAS protocol.
Definition at line 1092 of file gkserver.h.
References rasAddresses.
| H323TransportAddress H323RegisteredEndPoint::GetRASAddress | ( | PINDEX | idx | ) | const [inline] |
Get an address that can be used to contact this endpoint via the RAS protocol.
Definition at line 1097 of file gkserver.h.
References rasAddresses.
Referenced by H323GatekeeperServer::OnLocation().
| const H323TransportAddressArray& H323RegisteredEndPoint::GetSignalAddresses | ( | ) | const [inline] |
Get the addresses that can be used to contact this endpoint via the H.225/Q.931 protocol, ie normal calls.
Definition at line 1104 of file gkserver.h.
References signalAddresses.
| PINDEX H323RegisteredEndPoint::GetSignalAddressCount | ( | ) | const [inline] |
Get the number of addresses that can be used to contact this endpoint via the H.225/Q.931 protocol, ie normal calls.
Definition at line 1109 of file gkserver.h.
References signalAddresses.
Referenced by H323GatekeeperServer::AddEndPoint(), and H323GatekeeperListener::UnregistrationRequest().
| H323TransportAddress H323RegisteredEndPoint::GetSignalAddress | ( | PINDEX | idx | ) | const [inline] |
Get an address that can be used to contact this endpoint via the H.225/Q.931 protocol, ie normal calls.
Definition at line 1114 of file gkserver.h.
References signalAddresses.
Referenced by H323GatekeeperServer::AddEndPoint(), H323GatekeeperServer::OnLocation(), and H323GatekeeperListener::UnregistrationRequest().
| const PStringArray& H323RegisteredEndPoint::GetAliases | ( | ) | const [inline] |
Get the aliases this endpoint may be identified by.
Definition at line 1120 of file gkserver.h.
References aliases.
| BOOL H323RegisteredEndPoint::ContainsAlias | ( | const PString & | alias | ) | [inline] |
Determine if alias is an alias that this endpoint may be identified by.
Definition at line 1124 of file gkserver.h.
References aliases.
Referenced by H323GatekeeperServer::RemoveAlias().
| PINDEX H323RegisteredEndPoint::GetAliasCount | ( | ) | const [inline] |
Get the number of aliases this endpoint may be identified by.
Definition at line 1130 of file gkserver.h.
References aliases.
Referenced by H323GatekeeperServer::AddEndPoint(), and H323GatekeeperServer::RemoveEndPoint().
| PString H323RegisteredEndPoint::GetAlias | ( | PINDEX | idx | ) | const [inline] |
Get an alias that this endpoint may be identified by.
Definition at line 1134 of file gkserver.h.
References aliases.
Referenced by H323GatekeeperServer::AddEndPoint(), and H323GatekeeperServer::RemoveEndPoint().
| void H323RegisteredEndPoint::RemoveAlias | ( | const PString & | alias | ) |
Remove an alias that this endpoint may be identified by. If this was the last alias, then endpoint will be deleted soon after by a cleanup thread. As this function is in the endpoint itself it is not possible for this function to delete the endpoint immediately
Definition at line 2143 of file gkserver.cxx.
References gatekeeper, and H323GatekeeperServer::RemoveAlias().
Referenced by H323GatekeeperServer::RemoveAlias(), and H323GatekeeperServer::RemoveEndPoint().
| virtual const H235Authenticators& H323RegisteredEndPoint::GetAuthenticators | ( | ) | const [inline, virtual] |
Get the security context for this RAS connection.
Definition at line 1149 of file gkserver.h.
References authenticators.
Referenced by H323GatekeeperListener::DisengageRequest(), H323GatekeeperListener::InfoRequest(), and H323GatekeeperListener::UnregistrationRequest().
| PINDEX H323RegisteredEndPoint::GetPrefixCount | ( | ) | const [inline] |
Get the number of prefixes this endpoint can accept.
Definition at line 1153 of file gkserver.h.
References voicePrefixes.
Referenced by H323GatekeeperServer::AddEndPoint().
| PString H323RegisteredEndPoint::GetPrefix | ( | PINDEX | idx | ) | const [inline] |
Get a prefix that this endpoint can accept.
Definition at line 1157 of file gkserver.h.
References voicePrefixes.
Referenced by H323GatekeeperServer::AddEndPoint().
| const PCaselessString& H323RegisteredEndPoint::GetApplicationInfo | ( | ) | const [inline] |
Get application info (name/version etc) for endpoint.
Definition at line 1163 of file gkserver.h.
References applicationInfo.
| unsigned H323RegisteredEndPoint::GetProtocolVersion | ( | ) | const [inline] |
Get the protocol version the endpoint registered with.
Definition at line 1167 of file gkserver.h.
References protocolVersion.
Referenced by H323GatekeeperCall::OnAdmission().
| BOOL H323RegisteredEndPoint::IsBehindNAT | ( | ) | const [inline] |
Return if gatekeeper thinks the endpoint is behind a firewall.
Definition at line 1171 of file gkserver.h.
References isBehindNAT.
Referenced by H323GatekeeperCall::OnAdmission().
| BOOL H323RegisteredEndPoint::CanDisplayAmountString | ( | ) | const [inline] |
Get the flag indicating the endpoint can display credit amounts.
Definition at line 1175 of file gkserver.h.
References canDisplayAmountString.
| BOOL H323RegisteredEndPoint::CanEnforceDurationLimit | ( | ) | const [inline] |
Get the flag indicating the endpoint can enforce a duration limit.
Definition at line 1179 of file gkserver.h.
References canEnforceDurationLimit.
| BOOL H323RegisteredEndPoint::CanReceiveRIP | ( | ) | const |
Get the flag indicating the endpoint can handle RIPs (H225v1 endpoints cannot)
Definition at line 2680 of file gkserver.cxx.
References applicationInfo, and h225Version.
| BOOL H323RegisteredEndPoint::GetH225Version | ( | ) | const [inline] |
Get the H225 version reported in the RRQ
Definition at line 1187 of file gkserver.h.
References h225Version.
| virtual BOOL H323RegisteredEndPoint::OnSendDescriptorForEndpoint | ( | H225_ArrayOf_AliasAddress & | aliases, | |
| H225_EndpointType & | terminalType, | |||
| H225_ArrayOf_AliasAddress & | transportAddresses | |||
| ) | [virtual] |
Function called when gatekeeper sends a descriptor for this endpoint. This allows the gatekeeper to alter the descriptor information before it is sent.
If returns FALSE then the desriptor is not sent
| aliases | aliases for the enndpoint |
| terminalType | terminal type |
| transportAddresses | transport addresses |
Referenced by OnRegistration().
1.5.2