HP-UX C SIP Stack Programmer's Guide (Novembery 2007)
Working with Transmitters 219
Transmitter State Machine
The RvSipTransmitterStateChangedEv() callback reports transmitter state
changes and state change reasons. The state change reason indicates the reason
for the new state of the transmitter. The transmitter associates with the
following states:
RVSIP_TRANSMITTER_STATE_UNDEFINED
Indicates that the transmitter was not yet initialized.
RVSIP_TRANSMITTER_STATE_IDLE
The initial state of the transmitter. Upon transmitter creation, the transmitter
assumes the IDLE state. It remains in this state until
RvSipTransmitterSendMessage() is called. The transmitter then moves to the
RESOLVING_ADDR state and starts the address resolution process.
RVSIP_TRANSMITTER_STATE_RESOLVING_ADDR
Indicates that the transmitter is about to start the address resolution process.
After RvSipTransmitterSendMessage() is called, the transmitter copies the
supplied message and moves to the RESOLVING_ADDR state. The transmitter
then uses RFC 3261 rules to get the remote URI from the message, and the
procedures of RFC 3263 to resolve the address by querying the DNS server.
When the DNS procedure is completed and the destination address is
determined, the transmitter moves to the FINAL_DEST_RESOLVED state.
RVSIP_TRANSMITTER_STATE_FINAL_DEST_RESOLVED
Indicates that the transmitter has completed the address resolution process and
that it has a destination address to use. The application can use the
RvSipTransmitterGetDestAddress() function to get the destination address. The
application can change the destination address using the
RvSipTransmitterSetDestAddress() function. If the application did not set the
Fix Via flag, the FINAL_DEST_RESOLVED state is the last chance for the
application to fix the Via by itself before the message is sent.
In this state, the application can hold the message sending activity by calling the
RvSipTransmitterHoldSending() function. If so, the transmitter will move to the
ON_HOLD state. Otherwise, the message will be sent when the state changed
callback returns.