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

Working with Transmitters 215
Transmitter API
Remark: Regardless of the value of this parameter, the transmitter will update
the transport and rport parameters of the top Via header.
Keep Msg Flag
Indicates that the transmitter should not destruct the message immediately after
encoding is completed. Before the transmitter sends a message, it first encodes
the message to a buffer and then sends the buffer to the remote party. After
encoding is completed, the transmitter destructs the message. In case of send
failure, the transmitter moves to the MSG_SEND_FAILURE state. In this state,
the application can re-send the message to the next address in the DNS list using
RvSipTransmitterSendMessage(). The application can instruct the transmitter
not to destruct the message after encoding by setting the Keep Msg Flag to
RV_TRUE and, in this case, it can supply NULL as a message handle to the
RvSipTransmitterSendMessage() function. The message will be destructed only
upon termination of the transmitter.
TRANSMITTER
CONTROL
The following API functions provide transmitter control:
RvSipTransmitterSendMessage()
Sends a message to the remote party. The application should supply the message
that it wishes the transmitter to send. To send the message, the transmitter has to
resolve the destination address. The transmitter first moves to the
RESOLVING_ADDR state and starts the address resolution process. The
transmitter calculates the remote address of the message according to RFC 3261
and RFC 3263 and takes into account the existence of outbound proxy, Route
headers and loose routing rules.
Once address resolution is completed, the transmitter moves to the
FINAL_DEST_RESOLVED state. This state is the last chance for the
application to modify the Via header. The transmitter will then move to the
READY_FOR_SENDING state and will try to send the message. If the message
is sent successfully, the transmitter will move to the MSG_SENT state. If the
transmitter fails to send the message, it will move to the
MSG_SEND_FAILURE state.
The RvSipTransmitterSendMessage() function can be called in two states—the
IDLE state for initial sending, and the MSG_SEND_FAILURE state for sending
the message to the next address in the DNS list in case the previous address
failed.
Remarks: