Inheritance diagram for H4502Handler:

Public Types | |
| enum | State { e_ctIdle, e_ctAwaitIdentifyResponse, e_ctAwaitInitiateResponse, e_ctAwaitSetupResponse, e_ctAwaitSetup, e_ctAwaitConnect } |
Public Member Functions | |
| H4502Handler (H323Connection &connection, H450xDispatcher &dispatcher) | |
| virtual void | AttachToSetup (H323SignalPDU &pdu) |
| virtual void | AttachToAlerting (H323SignalPDU &pdu) |
| virtual void | AttachToConnect (H323SignalPDU &pdu) |
| virtual void | AttachToReleaseComplete (H323SignalPDU &pdu) |
| virtual BOOL | OnReceivedInvoke (int opcode, int invokeId, int linkedId, PASN_OctetString *argument) |
| virtual void | OnReceivedCallTransferIdentify (int linkedId) |
| virtual void | OnReceivedCallTransferAbandon (int linkedId) |
| virtual void | OnReceivedCallTransferInitiate (int linkedId, PASN_OctetString *argument) |
| virtual void | OnReceivedCallTransferSetup (int linkedId, PASN_OctetString *argument) |
| virtual void | OnReceivedCallTransferUpdate (int linkedId, PASN_OctetString *argument) |
| virtual void | OnReceivedSubaddressTransfer (int linkedId, PASN_OctetString *argument) |
| virtual void | OnReceivedCallTransferComplete (int linkedId, PASN_OctetString *argument) |
| virtual void | OnReceivedCallTransferActive (int linkedId, PASN_OctetString *argument) |
| virtual BOOL | OnReceivedReturnResult (X880_ReturnResult &returnResult) |
| void | OnReceivedInitiateReturnResult () |
| void | OnReceivedSetupReturnResult () |
| void | OnReceivedIdentifyReturnResult (X880_ReturnResult &returnResult) |
| virtual BOOL | OnReceivedReturnError (int errorCode, X880_ReturnError &returnError) |
| void | OnReceivedInitiateReturnError (const bool timerExpiry=false) |
| void | OnReceivedSetupReturnError (int errorCode, const bool timerExpiry=false) |
| void | OnReceivedIdentifyReturnError (const bool timerExpiry=false) |
| void | TransferCall (const PString &remoteParty, const PString &callIdentity) |
| void | ConsultationTransfer (const PString &primaryCallToken) |
| void | HandleConsultationTransfer (const PString &callIdentity, H323Connection &incoming) |
| void | AwaitSetupResponse (const PString &token, const PString &identity) |
| State | GetState () const |
| virtual void | onReceivedAdmissionReject (const int returnError) |
| void | HandleCallTransferFailure (const int returnError) |
| void | StartctTimer (const PTimeInterval value) |
| void | StopctTimer () |
| BOOL | IsctTimerRunning () |
| PDECLARE_NOTIFIER (PTimer, H4502Handler, OnCallTransferTimeOut) | |
| const H323Connection & | getAssociatedConnection () const |
| void | SetAssociatedCallToken (const PString &token) |
| const PString & | getTransferringCallToken () const |
| void | SetConsultationTransferSuccess () |
| BOOL | isConsultationTransferSuccess () |
Protected Attributes | |
| PString | transferringCallToken |
| PString | transferringCallIdentity |
| State | ctState |
| BOOL | ctResponseSent |
| PTimer | ctTimer |
| PString | CallToken |
| BOOL | consultationTransfer |
Definition at line 310 of file h450pdu.h.
| enum H4502Handler::State |
| BOOL H4502Handler::OnReceivedInvoke | ( | int | opcode, | |
| int | invokeId, | |||
| int | linkedId, | |||
| PASN_OctetString * | argument | |||
| ) | [virtual] |
| invokeId | InvokeId of operation (used in response) |
| linkedId | InvokeId of associated operation (if any) |
| argument | Parameters for the initiate operation |
Implements H450xHandler.
Definition at line 940 of file h450pdu.cxx.
References H450xHandler::currentInvokeId, H4502_CallTransferOperation::e_callTransferAbandon, H4502_CallTransferOperation::e_callTransferActive, H4502_CallTransferOperation::e_callTransferComplete, H4502_CallTransferOperation::e_callTransferIdentify, H4502_CallTransferOperation::e_callTransferInitiate, H4502_CallTransferOperation::e_callTransferSetup, H4502_CallTransferOperation::e_callTransferUpdate, H4502_CallTransferOperation::e_subaddressTransfer, OnReceivedCallTransferAbandon(), OnReceivedCallTransferActive(), OnReceivedCallTransferComplete(), OnReceivedCallTransferIdentify(), OnReceivedCallTransferInitiate(), OnReceivedCallTransferSetup(), OnReceivedCallTransferUpdate(), and OnReceivedSubaddressTransfer().
| void H4502Handler::OnReceivedCallTransferIdentify | ( | int | linkedId | ) | [virtual] |
Handle an incoming Call Transfer Identify operation.
| linkedId | InvokeId of associated operation (if any) |
Definition at line 989 of file h450pdu.cxx.
References H450ServiceAPDU::BuildReturnResult(), H450xHandler::connection, ctState, H450xHandler::currentInvokeId, H4502_CallTransferOperation::e_callTransferIdentify, e_ctAwaitSetup, H225_AliasAddress::e_dialedDigits, X880_Code::e_local, H4501_GeneralErrorList::e_notAvailable, X880_ReturnResult::e_result, H225_AliasAddress::e_transportID, H4502_CTIdentifyRes::Encode(), H450xHandler::endpoint, H323EndPoint::GetCallIdentityDictionary(), H323EndPoint::GetCallTransferT2(), H323Transport::GetLocalAddress(), H323Connection::GetLocalPartyName(), H323EndPoint::GetNextH450CallIdentityValue(), H323Connection::GetSignallingChannel(), H4502_CTIdentifyRes::m_callIdentity, H4501_EndpointAddress::m_destinationAddress, X880_ReturnResult_result::m_opcode, H4502_CTIdentifyRes::m_reroutingNumber, X880_ReturnResult_result::m_result, X880_ReturnResult::m_result, H323EndPoint::OnCallTransferIdentify(), H450xHandler::SendReturnError(), H323TransportAddress::SetPDU(), StartctTimer(), and H450ServiceAPDU::WriteFacilityPDU().
Referenced by OnReceivedInvoke().
| void H4502Handler::OnReceivedCallTransferAbandon | ( | int | linkedId | ) | [virtual] |
Handle an incoming Call Transfer Abandon operation.
| linkedId | InvokeId of associated operation (if any) |
Definition at line 1049 of file h450pdu.cxx.
References ctState, H450xHandler::currentInvokeId, e_ctAwaitSetup, e_ctIdle, and StopctTimer().
Referenced by OnReceivedInvoke().
| void H4502Handler::OnReceivedCallTransferInitiate | ( | int | linkedId, | |
| PASN_OctetString * | argument | |||
| ) | [virtual] |
Handle an incoming Call Transfer Initiate operation.
| linkedId | InvokeId of associated operation (if any) |
| argument | Parameters for the initiate operation |
Definition at line 1069 of file h450pdu.cxx.
References H450xHandler::connection, ctResponseSent, H450xHandler::DecodeArguments(), H4502_CallTransferErrors::e_establishmentFailure, H4502_CallTransferErrors::e_invalidReroutingNumber, H450xHandler::endpoint, H323Connection::GetCallToken(), H4502_CTInitiateArg::m_callIdentity, H4502_CTInitiateArg::m_reroutingNumber, H323EndPoint::OnCallTransferInitiate(), H450ServiceAPDU::ParseEndpointAddress(), H450xHandler::SendReturnError(), and H323EndPoint::SetupTransfer().
Referenced by OnReceivedInvoke().
| void H4502Handler::OnReceivedCallTransferSetup | ( | int | linkedId, | |
| PASN_OctetString * | argument | |||
| ) | [virtual] |
Handle an incoming Call Transfer Setup operation.
| linkedId | InvokeId of associated operation (if any) |
| argument | Parameters for the setup operation |
Definition at line 1094 of file h450pdu.cxx.
References H450xHandler::connection, ctState, H450xHandler::DecodeArguments(), e_ctAwaitSetupResponse, e_ctIdle, H4502_CTSetupArg::e_transferringNumber, H4502_CallTransferErrors::e_unrecognizedCallIdentity, H450xHandler::endpoint, H323EndPoint::GetCallIdentityDictionary(), H323Connection::HandleConsultationTransfer(), H4502_CTSetupArg::m_callIdentity, H4502_CTSetupArg::m_transferringNumber, H450ServiceAPDU::ParseEndpointAddress(), and H450xHandler::SendReturnError().
Referenced by OnReceivedInvoke().
| void H4502Handler::OnReceivedCallTransferUpdate | ( | int | linkedId, | |
| PASN_OctetString * | argument | |||
| ) | [virtual] |
Handle an incoming Call Transfer Update operation.
| linkedId | InvokeId of associated operation (if any) |
| argument | Parameters for the update operation |
Definition at line 1139 of file h450pdu.cxx.
References H450xHandler::DecodeArguments().
Referenced by OnReceivedInvoke().
| void H4502Handler::OnReceivedSubaddressTransfer | ( | int | linkedId, | |
| PASN_OctetString * | argument | |||
| ) | [virtual] |
Handle an incoming Subaddress Transfer operation.
| linkedId | InvokeId of associated operation (if any) |
| argument | Parameters for the subaddress transfer operation |
Definition at line 1149 of file h450pdu.cxx.
References H450xHandler::DecodeArguments().
Referenced by OnReceivedInvoke().
| void H4502Handler::OnReceivedCallTransferComplete | ( | int | linkedId, | |
| PASN_OctetString * | argument | |||
| ) | [virtual] |
Handle an incoming Call Transfer Complete operation.
| linkedId | InvokeId of associated operation (if any) |
| argument | Parameters for the complete operation |
Definition at line 1159 of file h450pdu.cxx.
References H450xHandler::DecodeArguments().
Referenced by OnReceivedInvoke().
| void H4502Handler::OnReceivedCallTransferActive | ( | int | linkedId, | |
| PASN_OctetString * | argument | |||
| ) | [virtual] |
Handle an incoming Call Transfer Active operation.
| linkedId | InvokeId of associated operation (if any) |
| argument | Parameters for the active operation |
Definition at line 1169 of file h450pdu.cxx.
References H450xHandler::DecodeArguments().
Referenced by OnReceivedInvoke().
| void H4502Handler::OnReceivedInitiateReturnResult | ( | ) |
Handle the reception of a callTransferInitiate returnResult when we are in call transfer state e_ctAwaitInitiateResponse. Note this is an internal function and it is not expected an application would use it.
Definition at line 1203 of file h450pdu.cxx.
References ctState, H450xHandler::currentInvokeId, e_ctIdle, and StopctTimer().
Referenced by OnReceivedReturnResult().
| void H4502Handler::OnReceivedSetupReturnResult | ( | ) |
Handle the reception of a callTransferSetup returnResult when we are in call transfer state e_ctAwaitSetupResponse. This funtion exists to handle the case when the transferred-to endpoint does not support H.450.2. Note this is an internal function and it is not expected an application would use it.
Definition at line 1215 of file h450pdu.cxx.
References H323EndPoint::ClearCall(), ctState, H450xHandler::currentInvokeId, e_ctIdle, H323Connection::EndedByCallForwarded, H450xHandler::endpoint, StopctTimer(), and transferringCallToken.
Referenced by OnReceivedReturnResult(), and H323Connection::OnReceivedSignalConnect().
| void H4502Handler::OnReceivedIdentifyReturnResult | ( | X880_ReturnResult & | returnResult | ) |
Handle the reception of a callTransferIdentify returnResult when we are in call transfer state e_ctAwaitIdentifyResponse. Note this is an internal function and it is not expected an application would use it.
Definition at line 1228 of file h450pdu.cxx.
References CallToken, H450xHandler::connection, ctState, e_ctIdle, X880_ReturnResult::e_result, H450xHandler::endpoint, H323EndPoint::FindConnectionWithLock(), H323Connection::GetCallToken(), X880_ReturnResult_result::m_result, X880_ReturnResult::m_result, H450ServiceAPDU::ParseEndpointAddress(), H323Connection::SetAssociatedCallToken(), StopctTimer(), H323EndPoint::TransferCall(), and H323Connection::Unlock().
Referenced by OnReceivedReturnResult().
| void H4502Handler::OnReceivedInitiateReturnError | ( | const bool | timerExpiry = false |
) |
Handle the reception of a callTransferInitiate returnError or expiry of Call Transfer Timer CT-T3 when we are in call transfer state e_ctAwaitInitiateResponse. Note this is an internal function and it is not expected an application would use it.
| timerExpiry | Flag to indicate expiry |
Definition at line 1293 of file h450pdu.cxx.
References H450ServiceAPDU::BuildCallTransferAbandon(), CallToken, ctState, H450xHandler::currentInvokeId, H450xHandler::dispatcher, e_ctIdle, H450xHandler::endpoint, H323EndPoint::FindConnectionWithLock(), H450xDispatcher::GetNextInvokeId(), H323EndPoint::OnReceivedInitiateReturnError(), H323Connection::OnReceivedInitiateReturnError(), StopctTimer(), transferringCallToken, H323Connection::Unlock(), and H450ServiceAPDU::WriteFacilityPDU().
Referenced by OnReceivedReturnError().
| void H4502Handler::OnReceivedSetupReturnError | ( | int | errorCode, | |
| const bool | timerExpiry = false | |||
| ) |
Handle the reception of a callTransferSetup returnError or expiry of Call Transfer Timer CT-T4 when we are in call transfer state e_ctAwaitSetupResponse. This funtion also additionally handles the case when the transferred-to endpoint does not support H.450.2 and has rejected the incoming call request. Note this is an internal function and it is not expected an application would use it.
| timerExpiry | Flag to indicate expiry |
Definition at line 1329 of file h450pdu.cxx.
References H323EndPoint::ClearCall(), H450xHandler::connection, ctState, H450xHandler::currentInvokeId, e_ctIdle, H450xHandler::endpoint, H323EndPoint::FindConnectionWithLock(), H323Connection::GetCallToken(), H323Connection::HandleCallTransferFailure(), StopctTimer(), transferringCallToken, and H323Connection::Unlock().
Referenced by H323Connection::OnReceivedReleaseComplete(), and OnReceivedReturnError().
| void H4502Handler::OnReceivedIdentifyReturnError | ( | const bool | timerExpiry = false |
) |
Handle the reception of a callTransferIdentify returnError or expiry of Call Transfer Timer CT-T1 when we are in call transfer state e_ctAwaitIdentifyResponse. Note this is an internal function and it is not expected an application would use it.
| timerExpiry | Flag to indicate expiry |
Definition at line 1358 of file h450pdu.cxx.
References H450ServiceAPDU::BuildCallTransferAbandon(), H450xHandler::connection, ctState, H450xHandler::currentInvokeId, H450xHandler::dispatcher, e_ctIdle, H450xDispatcher::GetNextInvokeId(), H323Connection::Lock(), StopctTimer(), H323Connection::Unlock(), and H450ServiceAPDU::WriteFacilityPDU().
Referenced by OnReceivedReturnError().
| void H4502Handler::TransferCall | ( | const PString & | remoteParty, | |
| const PString & | callIdentity | |||
| ) |
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).
| remoteParty | Remote party to transfer the existing call to |
| callIdentity | Call Identity of secondary call if present |
Definition at line 1385 of file h450pdu.cxx.
References H450ServiceAPDU::BuildCallTransferInitiate(), H450xHandler::connection, ctState, H450xHandler::currentInvokeId, H450xHandler::dispatcher, e_ctAwaitInitiateResponse, H450xHandler::endpoint, H323EndPoint::GetCallTransferT3(), H323Connection::GetEndPoint(), H450xDispatcher::GetNextInvokeId(), H323EndPoint::ParsePartyName(), H323EndPoint::ResolveCallParty(), StartctTimer(), and H450ServiceAPDU::WriteFacilityPDU().
| void H4502Handler::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).
| primaryCallToken | Primary call |
Definition at line 1412 of file h450pdu.cxx.
References H450ServiceAPDU::BuildCallTransferIdentify(), H450xHandler::connection, ctState, H450xHandler::currentInvokeId, H450xHandler::dispatcher, e_ctAwaitIdentifyResponse, H450xHandler::endpoint, H323EndPoint::GetCallTransferT1(), H450xDispatcher::GetNextInvokeId(), SetAssociatedCallToken(), StartctTimer(), and H450ServiceAPDU::WriteFacilityPDU().
| void H4502Handler::HandleConsultationTransfer | ( | const PString & | callIdentity, | |
| H323Connection & | incoming | |||
| ) |
Handle the reception of a callTransferSetupInvoke APDU whilst a secondary call exists.
| callIdentity | Call Identity of secondary call |
| incoming | New incoming connection |
Definition at line 1434 of file h450pdu.cxx.
References H323EndPoint::ClearCall(), H450xHandler::connection, ctState, H450xHandler::currentInvokeId, e_ctAwaitSetup, e_ctIdle, H450xHandler::endpoint, H323EndPoint::GetCallIdentityDictionary(), H323Connection::GetCallToken(), H323Connection::OnConsultationTransferSuccess(), and StopctTimer().
| State H4502Handler::GetState | ( | ) | const [inline] |
Get the current call transfer state.
Definition at line 493 of file h450pdu.h.
References ctState.
Referenced by H323Connection::OnReceivedReleaseComplete(), and H323Connection::OnReceivedSignalConnect().
| void H4502Handler::onReceivedAdmissionReject | ( | const int | returnError | ) | [virtual] |
Handle the reception of an Admission Reject during a pending call transfer operation at the transferred endpoint. If the call transfer state of the current connection is e_ctAwaitSetupResponse, the stack attempts to find the existing connection between the transferred and transferring endpoints and inform this connection that a callTransferInitiateReturnError PDU needs to be sent. No action is taken if the current connection is not in call transfer state e_ctAwaitSetupResponse.
Definition at line 1479 of file h450pdu.cxx.
References ctState, e_ctAwaitSetupResponse, e_ctIdle, H450xHandler::endpoint, H323EndPoint::FindConnectionWithLock(), H323Connection::HandleCallTransferFailure(), StopctTimer(), transferringCallToken, and H323Connection::Unlock().
Referenced by H323Connection::SendSignalSetup().
| void H4502Handler::HandleCallTransferFailure | ( | const int | returnError | ) |
Handle the failure of a call transfer operation.
| returnError | failure reason |
Definition at line 1500 of file h450pdu.cxx.
References H450xHandler::SendReturnError().
| void H4502Handler::StartctTimer | ( | const PTimeInterval | value | ) | [inline] |
Start the Call Transfer Timer using the specified time interval.
Definition at line 514 of file h450pdu.h.
References ctTimer.
Referenced by AwaitSetupResponse(), ConsultationTransfer(), OnReceivedCallTransferIdentify(), and TransferCall().
| void H4502Handler::StopctTimer | ( | ) |
Stop the Call Transfer Timer
Definition at line 1506 of file h450pdu.cxx.
References ctTimer.
Referenced by HandleConsultationTransfer(), onReceivedAdmissionReject(), OnReceivedCallTransferAbandon(), OnReceivedIdentifyReturnError(), OnReceivedIdentifyReturnResult(), OnReceivedInitiateReturnError(), OnReceivedInitiateReturnResult(), OnReceivedSetupReturnError(), and OnReceivedSetupReturnResult().
| BOOL H4502Handler::IsctTimerRunning | ( | ) | [inline] |
Is the Call Transfer Timer running?
Definition at line 522 of file h450pdu.h.
References ctTimer.
Referenced by H323Connection::OnReceivedReleaseComplete(), and H323Connection::OnReceivedSignalConnect().
| H4502Handler::PDECLARE_NOTIFIER | ( | PTimer | , | |
| H4502Handler | , | |||
| OnCallTransferTimeOut | ||||
| ) |
Callback mechanism for Call Transfer Timers CT-T1, CT-T2, CT-T3 & CT-T4
| const H323Connection& H4502Handler::getAssociatedConnection | ( | ) | const [inline] |
Get the connection assoicated with this H4502Handler.
Definition at line 530 of file h450pdu.h.
References H450xHandler::connection.
| void H4502Handler::SetAssociatedCallToken | ( | const PString & | token | ) | [inline] |
Set the associated callToken.
Definition at line 534 of file h450pdu.h.
References CallToken.
Referenced by ConsultationTransfer().
| const PString& H4502Handler::getTransferringCallToken | ( | ) | const [inline] |
Get the transferringCallToken member
Definition at line 538 of file h450pdu.h.
References transferringCallToken.
| void H4502Handler::SetConsultationTransferSuccess | ( | ) | [inline] |
Set the 'consultationTransfer' member to TRUE (indicating a successful transfer)
Definition at line 542 of file h450pdu.h.
References consultationTransfer.
| BOOL H4502Handler::isConsultationTransferSuccess | ( | ) | [inline] |
Was the transfer through consultation successful.
Definition at line 546 of file h450pdu.h.
References consultationTransfer.
1.5.2