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

216 HP-UX C SIP Stack Programmers Guide
Transmitter API
The DNS procedure is a-synchronic, and therefore the send
function may return with success before the message was
actually sent.
If you wish the transmitter to fix the top Via header of the
message according to the remote party address and transport
types, you should first call the
RvSipTransmitterSetFixViaFlag() function. Otherwise the
transmitter will only fix the via transport and will add the rport
parameter in case it was configured to the SIP Stack. The sent-
by parameter will remain untouched.
The transmitter copies the message supplied by the application
to the SIP Stack memory. The application is responsible for
destructing the message it supplies to this function.
RvSipTransmitterHoldSending()
Holds all sending activities of the transmitter and moves the transmitter to the
ON_HOLD state. After address resolution is completed and before the message
is sent, the transmitter moves to the FINAL_DEST_RESOLVED state. In this
state, the application can hold the message sending by calling
RvSipTransmitterHoldSending(). If the application wishes, it can change the
remote address at this point using the RvSipTransmitterSetDestAddress()
function and manipulate the rest of the DNS list using the Transport layer API.
If the application wishes the transmitter to use the next element in the list, it can
use the RvSipTransmitterSetDestAddress() function to reset the current
destination address. The transmitter will then repeat the address resolution
process before sending the message. It is the responsibility of the application to
resume the sending of the message using RvSipTransmitterResumeSending().
RvSipTransmitterResumeSending()
Resumes the sending activities of the transmitter. This function can be called
only in the ON_HOLD state of the transmitter. When this function is called, the
transmitter first checks that a destination address exists. If one exists, the
transmitter moves to the READY_FOR_SENDING state and then sends the
message to this address. If there is no a destination address (the user reset the
address by calling RvSipTransmitterSetDestAddress() with NULL values), the
transmitter returns to the RESOLVING_ADDR state and to the address
resolution process.