HP-UX C SIP Stack Programmer's Guide (Novembery 2007)

92 HP-UX C SIP Stack Programmers Guide
Transaction API
TRANSACTION
E
NTITIES
The Transaction API relates to the following two entities:
Transaction (transaction)
Transaction Manager (TransactionMgr)
TRANSACTION
A transaction represents a SIP transaction as defined in RFC 3261. The
transaction consists of a request (and its retransmissions) together with the
response triggered by that request. Your application can initiate transactions,
send requests and respond to incoming requests using the Transaction API.
A transaction is a stateful object, which can assume any state from a set defined
in the Transaction API. The Transaction state machine represents the state of the
transaction between the client and the server.
An Invite transaction also includes the ACK request when the final response to
the Invite request is non-2xx. The ACK of a 2xx response is not part of the
transaction and is handled separately.
Note This behavior is new from version 4.0. To keep the previous behavior,
where the ACK was always part of the Invite transaction, you should set the
bOldInviteHandling configuration parameter to RV_TRUE.
TRANSACTION MANAGER
The TransactionMgr manages the collection of all transactions. The
TransactionMgr is mainly used for creating new transactions.
WORKING WITH
H
ANDLES
All transactions and the TransactionMgr are identified using handles. You must
supply these handles when using the Transaction API.
RvSipTranscMgrHandle defines the TransactionMgr handle. You receive this
handle by calling RvSipStackGetTransactionMgrHandle().
RvSipTranscHandle defines a transaction handle. For client transactions, you
receive the transaction handle when creating a transaction with
RvSipTranscMgrCreateTransaction(). For Server transactions, you receive the
transaction handle from the RvSipTransactionCreatedEv() callback.
TRANSACTION API The Transaction API contains a set of functions and function callbacks that
allow you to set or examine transaction parameters and to control a transaction
request or response.