OPAL Version 3.10.2
SIPTransaction Class Reference

#include <sippdu.h>

Inheritance diagram for SIPTransaction:
SIP_PDU SIPBye SIPInfo SIPInvite SIPMessage SIPNotify SIPOptions SIPPing SIPPrack SIPPublish SIPRefer SIPReferNotify SIPRegister SIPResponse SIPSubscribe

Public Member Functions

 SIPTransaction (Methods method, SIPEndPoint &endpoint, OpalTransport &transport)
 SIPTransaction (Methods method, SIPConnection &connection)
 ~SIPTransaction ()
virtual SIPTransactionCreateDuplicate () const =0
PBoolean Start ()
bool IsTrying () const
bool IsProceeding () const
bool IsInProgress () const
bool IsFailed () const
bool IsCompleted () const
bool IsCanceled () const
bool IsTerminated () const
void WaitForCompletion ()
PBoolean Cancel ()
void Abort ()
virtual PBoolean OnReceivedResponse (SIP_PDU &response)
virtual PBoolean OnCompleted (SIP_PDU &response)
OpalTransportGetTransport () const
SIPConnectionGetConnection () const
PString GetInterface () const
void SetInterface (const PString &localIf)

Static Public Member Functions

static PString GenerateCallID ()

Protected Types

enum  States {
  NotStarted, Trying, Proceeding, Cancelling,
  Completed, Terminated_Success, Terminated_Timeout, Terminated_RetriesExceeded,
  Terminated_TransportError, Terminated_Cancelled, Terminated_Aborted, NumStates
}

Protected Member Functions

bool SendPDU (SIP_PDU &pdu)
bool ResendCANCEL ()
void SetParameters (const SIPParameters &params)
 PDECLARE_NOTIFIER (PTimer, SIPTransaction, OnRetry)
 PDECLARE_NOTIFIER (PTimer, SIPTransaction, OnTimeout)
virtual void SetTerminated (States newState)

Protected Attributes

SIPEndPointm_endpoint
OpalTransportm_transport
PSafePtr< SIPConnectionm_connection
PTimeInterval m_retryTimeoutMin
PTimeInterval m_retryTimeoutMax
States m_state
unsigned m_retry
PTimer m_retryTimer
PTimer m_completionTimer
PSyncPoint m_completed
PString m_localInterface
OpalTransportAddress m_remoteAddress

Detailed Description

Session Initiation Protocol transaction. A transaction is a stateful independent entity that provides services to a connection (Transaction User). Transactions are contained within connections. A client transaction handles sending a request and receiving its responses. A server transaction handles sending responses to a received request. In either case the SIP_PDU ancestor is the sent or received request.


Member Enumeration Documentation

enum SIPTransaction::States [protected]
Enumerator:
NotStarted 
Trying 
Proceeding 
Cancelling 
Completed 
Terminated_Success 
Terminated_Timeout 
Terminated_RetriesExceeded 
Terminated_TransportError 
Terminated_Cancelled 
Terminated_Aborted 
NumStates 

Constructor & Destructor Documentation

SIPTransaction::SIPTransaction ( Methods  method,
SIPEndPoint endpoint,
OpalTransport transport 
)
SIPTransaction::SIPTransaction ( Methods  method,
SIPConnection connection 
)

Construct a transaction for requests in a dialog. The transport is used to determine the local address

SIPTransaction::~SIPTransaction ( )

Member Function Documentation

void SIPTransaction::Abort ( )
PBoolean SIPTransaction::Cancel ( )
virtual SIPTransaction* SIPTransaction::CreateDuplicate ( ) const [pure virtual]
static PString SIPTransaction::GenerateCallID ( ) [static]
SIPConnection* SIPTransaction::GetConnection ( ) const [inline]

References m_connection.

PString SIPTransaction::GetInterface ( ) const [inline]

References m_localInterface.

OpalTransport& SIPTransaction::GetTransport ( ) const [inline]

References m_transport.

bool SIPTransaction::IsCanceled ( ) const [inline]
bool SIPTransaction::IsCompleted ( ) const [inline]

References Completed, and m_state.

bool SIPTransaction::IsFailed ( ) const [inline]

References m_state, and Terminated_Success.

bool SIPTransaction::IsInProgress ( ) const [inline]

References m_state, Proceeding, and Trying.

bool SIPTransaction::IsProceeding ( ) const [inline]

References m_state, and Proceeding.

bool SIPTransaction::IsTerminated ( ) const [inline]

References m_state, and Terminated_Success.

bool SIPTransaction::IsTrying ( ) const [inline]

References m_state, and Trying.

virtual PBoolean SIPTransaction::OnCompleted ( SIP_PDU response) [virtual]
virtual PBoolean SIPTransaction::OnReceivedResponse ( SIP_PDU response) [virtual]

Reimplemented in SIPInvite.

SIPTransaction::PDECLARE_NOTIFIER ( PTimer  ,
SIPTransaction  ,
OnRetry   
) [protected]
SIPTransaction::PDECLARE_NOTIFIER ( PTimer  ,
SIPTransaction  ,
OnTimeout   
) [protected]
bool SIPTransaction::ResendCANCEL ( ) [protected]
bool SIPTransaction::SendPDU ( SIP_PDU pdu) [protected]
void SIPTransaction::SetInterface ( const PString &  localIf) [inline]

References m_localInterface.

void SIPTransaction::SetParameters ( const SIPParameters params) [protected]
virtual void SIPTransaction::SetTerminated ( States  newState) [protected, virtual]
PBoolean SIPTransaction::Start ( )
void SIPTransaction::WaitForCompletion ( )

Field Documentation

PSyncPoint SIPTransaction::m_completed [protected]

Referenced by GetConnection().

PString SIPTransaction::m_localInterface [protected]

Referenced by GetInterface(), and SetInterface().

unsigned SIPTransaction::m_retry [protected]
PTimeInterval SIPTransaction::m_retryTimeoutMax [protected]
PTimeInterval SIPTransaction::m_retryTimeoutMin [protected]
PTimer SIPTransaction::m_retryTimer [protected]

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