# SIPTransaction Class Reference

`#include <sippdu.h>`

Inheritance diagram for SIPTransaction:

List of all members.

## Public Member Functions

| SIPTransaction (SIPEndPoint &endpoint, OpalTransport &transport, const PTimeInterval &minRetryTime=PMaxTimeInterval, const PTimeInterval &maxRetryTime=PMaxTimeInterval)
| SIPTransaction (SIPConnection &connection, OpalTransport &transport, Methods method=NumMethods)
| ~SIPTransaction ()
PBoolean | Start ()
PBoolean | IsInProgress () const
PBoolean | IsFailed () const
PBoolean | IsCompleted () const
PBoolean | IsCanceled () const
PBoolean | IsTerminated () const
void | WaitForCompletion ()
PBoolean | Cancel ()
void | Abort ()
virtual PBoolean | OnReceivedResponse (SIP_PDU &response)
virtual PBoolean | OnCompleted (SIP_PDU &response)
OpalTransport & | GetTransport () const
SIPConnection * | GetConnection () const
PString | GetInterface () const

## Protected Types

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

## Protected Member Functions

void | Construct (const PTimeInterval &minRetryTime=PMaxTimeInterval, const PTimeInterval &maxRetryTime=PMaxTimeInterval)
bool | SendPDU (SIP_PDU &pdu)
bool | ResendCANCEL ()
| PDECLARE_NOTIFIER (PTimer, SIPTransaction, OnRetry)
| PDECLARE_NOTIFIER (PTimer, SIPTransaction, OnTimeout)
virtual void | SetTerminated (States newState)

## Protected Attributes

SIPEndPoint & | endpoint
OpalTransport & | transport
PSafePtr< SIPConnection > | connection
PTimeInterval | retryTimeoutMin
PTimeInterval | retryTimeoutMax
States | state
unsigned | retry
PTimer | retryTimer
PTimer | completionTimer
PSyncPoint | completed
PString | 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 |
  Aborting |
  Proceeding |
  Cancelling |
  Completed |
  Terminated_Success |
  Terminated_Timeout |
  Terminated_RetriesExceeded |
  Terminated_TransportError |
  Terminated_Cancelled |
  Terminated_Aborted |
  NumStates |

## Constructor & Destructor Documentation

SIPTransaction::SIPTransaction | ( | SIPEndPoint & | endpoint,
|  | OpalTransport & | transport,
|  | const PTimeInterval & | minRetryTime = `PMaxTimeInterval`,
|  | const PTimeInterval & | maxRetryTime = `PMaxTimeInterval` |
| ) |  |  |

SIPTransaction::SIPTransaction | ( | SIPConnection & | connection,
|  | OpalTransport & | transport,
|  | Methods | method = `NumMethods` |
| ) |  |  |

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

SIPTransaction::~SIPTransaction | ( |  | ) |

## Member Function Documentation

PBoolean SIPTransaction::Start | ( |  | ) |

PBoolean SIPTransaction::IsInProgress | ( |  | ) | const`[inline]`

PBoolean SIPTransaction::IsFailed | ( |  | ) | const`[inline]`

PBoolean SIPTransaction::IsCompleted | ( |  | ) | const`[inline]`

PBoolean SIPTransaction::IsCanceled | ( |  | ) | const`[inline]`

PBoolean SIPTransaction::IsTerminated | ( |  | ) | const`[inline]`

void SIPTransaction::WaitForCompletion | ( |  | ) |

PBoolean SIPTransaction::Cancel | ( |  | ) |

void SIPTransaction::Abort | ( |  | ) |

virtual PBoolean SIPTransaction::OnReceivedResponse | ( | SIP_PDU & | response | ) | `[virtual]`

Reimplemented in SIPInvite.

virtual PBoolean SIPTransaction::OnCompleted | ( | SIP_PDU & | response | ) | `[virtual]`

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

SIPConnection* SIPTransaction::GetConnection | ( |  | ) | const`[inline]`

PString SIPTransaction::GetInterface | ( |  | ) | const`[inline]`

void SIPTransaction::Construct | ( | const PTimeInterval & | minRetryTime = `PMaxTimeInterval`,
|  | const PTimeInterval & | maxRetryTime = `PMaxTimeInterval` |
| ) |  |  | `[protected]`

bool SIPTransaction::SendPDU | ( | SIP_PDU & | pdu | ) | `[protected]`

bool SIPTransaction::ResendCANCEL | ( |  | ) | `[protected]`

SIPTransaction::PDECLARE_NOTIFIER | ( | PTimer | ,
|  | SIPTransaction | ,
|  | OnRetry |  |
| ) |  |  | `[protected]`

SIPTransaction::PDECLARE_NOTIFIER | ( | PTimer | ,
|  | SIPTransaction | ,
|  | OnTimeout |  |
| ) |  |  | `[protected]`

virtual void SIPTransaction::SetTerminated | ( | States | newState | ) | `[protected, virtual]`

## Member Data Documentation

SIPEndPoint& SIPTransaction::endpoint `[protected]`

OpalTransport& SIPTransaction::transport `[protected]`

PSafePtr<SIPConnection> SIPTransaction::connection `[protected]`

PTimeInterval SIPTransaction::retryTimeoutMin `[protected]`

PTimeInterval SIPTransaction::retryTimeoutMax `[protected]`

States SIPTransaction::state `[protected]`

unsigned SIPTransaction::retry `[protected]`

PTimer SIPTransaction::retryTimer `[protected]`

PTimer SIPTransaction::completionTimer `[protected]`

PSyncPoint SIPTransaction::completed `[protected]`

PString SIPTransaction::localInterface `[protected]`

OpalTransportAddress SIPTransaction::m_remoteAddress `[protected]`

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

- sippdu.h