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

96 HP-UX C SIP Stack Programmers Guide
Transaction API
Is UAC
Transactions have a client side and a server side. The client side is known as a
client transaction and the server side as a server transaction. The client
transaction sends the request, and the server transaction sends the response. The
Is UAC parameter indicates whether or not the transaction is a client
transaction.
New Header Handles
Some of the transaction fields are message parts. For example, the To header
field is a Party header object. Before setting a parameter of this type in the
transaction, you should request a new handle for the parameter from the
transaction. After initializing the message part, you can set it back in the
transaction.
Transmitter
Each transaction holds a single transmitter and uses it to send SIP messages and
message retransmissions. The transaction creates its transmitter upon
initialization and terminates it only upon destruction. The transmitter is
responsible for all message sending activities, including address resolution, via
handling, and the actual message sending. The application can get the
transmitter from the transaction in the
RvSipTransactionFinalDestResolvedEv(). Using the Transmitter API, the
application can manipulate the DNS list before the message is sent. For more
information see the Working with Transmitters chapter.
TRANSACTION
C
ONTROL
The following API functions provide transaction control:
RvSipTransactionMake()
After creating a transaction, you can use this function to set the To, From and
CSeq parameters in the transaction and send a request with a specified method
and a given Request-URI. All parameters given to this function are in textual
format.
RvSipTransactionRequest()
After creating a transaction and setting the To and From headers and CSeq
sequence number, you can use this function for generating and sending a request
with a specified method and a given Request-URI.