OpenH323 1.18.0
Public Types | Public Member Functions | Protected Attributes
H4502Handler Class Reference

#include <h450pdu.h>

Inheritance diagram for H4502Handler:
H450xHandler

List of all members.

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 H323ConnectiongetAssociatedConnection () 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

Member Enumeration Documentation

Sub-state for call transfer.

Enumerator:
e_ctIdle 
e_ctAwaitIdentifyResponse 
e_ctAwaitInitiateResponse 
e_ctAwaitSetupResponse 
e_ctAwaitSetup 
e_ctAwaitConnect 

Constructor & Destructor Documentation

H4502Handler::H4502Handler ( H323Connection connection,
H450xDispatcher dispatcher 
)

Member Function Documentation

virtual void H4502Handler::AttachToAlerting ( H323SignalPDU pdu) [virtual]

Reimplemented from H450xHandler.

virtual void H4502Handler::AttachToConnect ( H323SignalPDU pdu) [virtual]

Reimplemented from H450xHandler.

virtual void H4502Handler::AttachToReleaseComplete ( H323SignalPDU pdu) [virtual]

Reimplemented from H450xHandler.

virtual void H4502Handler::AttachToSetup ( H323SignalPDU pdu) [virtual]

Reimplemented from H450xHandler.

void H4502Handler::AwaitSetupResponse ( const PString &  token,
const PString &  identity 
)
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).

Parameters:
primaryCallTokenPrimary call
const H323Connection& H4502Handler::getAssociatedConnection ( ) const [inline]

Get the connection assoicated with this H4502Handler.

References H450xHandler::connection.

State H4502Handler::GetState ( ) const [inline]

Get the current call transfer state.

References ctState.

const PString& H4502Handler::getTransferringCallToken ( ) const [inline]

Get the transferringCallToken member

References transferringCallToken.

void H4502Handler::HandleCallTransferFailure ( const int  returnError)

Handle the failure of a call transfer operation.

Parameters:
returnErrorfailure reason
void H4502Handler::HandleConsultationTransfer ( const PString &  callIdentity,
H323Connection incoming 
)

Handle the reception of a callTransferSetupInvoke APDU whilst a secondary call exists.

Parameters:
callIdentityCall Identity of secondary call
incomingNew incoming connection
BOOL H4502Handler::isConsultationTransferSuccess ( ) [inline]

Was the transfer through consultation successful.

References consultationTransfer.

BOOL H4502Handler::IsctTimerRunning ( ) [inline]

Is the Call Transfer Timer running?

References ctTimer.

virtual 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.

virtual void H4502Handler::OnReceivedCallTransferAbandon ( int  linkedId) [virtual]

Handle an incoming Call Transfer Abandon operation.

Parameters:
linkedIdInvokeId of associated operation (if any)
virtual void H4502Handler::OnReceivedCallTransferActive ( int  linkedId,
PASN_OctetString *  argument 
) [virtual]

Handle an incoming Call Transfer Active operation.

Parameters:
linkedIdInvokeId of associated operation (if any)
argumentParameters for the active operation
virtual void H4502Handler::OnReceivedCallTransferComplete ( int  linkedId,
PASN_OctetString *  argument 
) [virtual]

Handle an incoming Call Transfer Complete operation.

Parameters:
linkedIdInvokeId of associated operation (if any)
argumentParameters for the complete operation
virtual void H4502Handler::OnReceivedCallTransferIdentify ( int  linkedId) [virtual]

Handle an incoming Call Transfer Identify operation.

Parameters:
linkedIdInvokeId of associated operation (if any)
virtual void H4502Handler::OnReceivedCallTransferInitiate ( int  linkedId,
PASN_OctetString *  argument 
) [virtual]

Handle an incoming Call Transfer Initiate operation.

Parameters:
linkedIdInvokeId of associated operation (if any)
argumentParameters for the initiate operation
virtual void H4502Handler::OnReceivedCallTransferSetup ( int  linkedId,
PASN_OctetString *  argument 
) [virtual]

Handle an incoming Call Transfer Setup operation.

Parameters:
linkedIdInvokeId of associated operation (if any)
argumentParameters for the setup operation
virtual void H4502Handler::OnReceivedCallTransferUpdate ( int  linkedId,
PASN_OctetString *  argument 
) [virtual]

Handle an incoming Call Transfer Update operation.

Parameters:
linkedIdInvokeId of associated operation (if any)
argumentParameters for the update operation
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.

Parameters:
timerExpiryFlag to indicate expiry
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.

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.

Parameters:
timerExpiryFlag to indicate expiry
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.

virtual BOOL H4502Handler::OnReceivedInvoke ( int  opcode,
int  invokeId,
int  linkedId,
PASN_OctetString *  argument 
) [virtual]
Parameters:
invokeIdInvokeId of operation (used in response)
linkedIdInvokeId of associated operation (if any)
argumentParameters for the initiate operation

Implements H450xHandler.

virtual BOOL H4502Handler::OnReceivedReturnError ( int  errorCode,
X880_ReturnError returnError 
) [virtual]

Reimplemented from H450xHandler.

virtual BOOL H4502Handler::OnReceivedReturnResult ( X880_ReturnResult returnResult) [virtual]

Reimplemented from H450xHandler.

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.

Parameters:
timerExpiryFlag to indicate expiry
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.

virtual void H4502Handler::OnReceivedSubaddressTransfer ( int  linkedId,
PASN_OctetString *  argument 
) [virtual]

Handle an incoming Subaddress Transfer operation.

Parameters:
linkedIdInvokeId of associated operation (if any)
argumentParameters for the subaddress transfer operation
H4502Handler::PDECLARE_NOTIFIER ( PTimer  ,
H4502Handler  ,
OnCallTransferTimeOut   
)

Callback mechanism for Call Transfer Timers CT-T1, CT-T2, CT-T3 & CT-T4

void H4502Handler::SetAssociatedCallToken ( const PString &  token) [inline]

Set the associated callToken.

References CallToken.

void H4502Handler::SetConsultationTransferSuccess ( ) [inline]

Set the 'consultationTransfer' member to TRUE (indicating a successful transfer)

References consultationTransfer.

void H4502Handler::StartctTimer ( const PTimeInterval  value) [inline]

Start the Call Transfer Timer using the specified time interval.

References ctTimer.

void H4502Handler::StopctTimer ( )

Stop the Call Transfer Timer

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).

Parameters:
remotePartyRemote party to transfer the existing call to
callIdentityCall Identity of secondary call if present

Member Data Documentation

PString H4502Handler::CallToken [protected]

Referenced by SetAssociatedCallToken().

BOOL H4502Handler::ctResponseSent [protected]

Referenced by GetState().

PTimer H4502Handler::ctTimer [protected]

Referenced by IsctTimerRunning(), and StartctTimer().


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