HP-UX C SIP Stack Programmer's Guide (Novembery 2007)
298 HP-UX C SIP Stack Programmer’s Guide
Connection API
RvSipTransportConnectionStatusEv()
The connection notifies about events that do not effect the connection state
using the connection status callback. If, for example, there was an error in the
connection, the connection will notify the application with
RVSIP_TRANSPORT_CONN_STATUS_ERROR. The connection will then
disconnect with the RVSIP_TRANSPORT_CONN_REASON_ERROR reason.
Note You do not have to register to this callback if you do not want to get
connection statuses.
CONNECTION STATES The Connection state machine represents the state of the connection between
two SIP User Agents. The RvSipTransportConnectionStateChangedEv()
callback reports connection state changes and state change reasons. The state
change reason indicates why the connection reached the new state.
The connection associates with the following states:
RVSIP_TRANSPORT_CONN_STATE_IDLE
The IDLE state is the initial state of the Connection state machine. Upon
creation of the connection, the connection assumes the IDLE state. It remains in
this state until the RvSipTransportConnectionInit() function is called,
whereupon it should move to the READY state.
RVSIP_TRANSPORT_CONN_STATE_READY
After calling the RvSipTransportConnectionInit() function that initializes the
connection and inserts it into the connection hash, the connection enters the
READY state. The connection will move from the READY state to the
CONNECTING state in the following cases:
If the application specifically called the
RvSipTransportConnectionConnect() function on this
connection.
If one of the persistent SIP Stack objects located this connection
in the hash and connected it to send a message.
Calling the RvSipTransportConnectionTerminate() function in the READY state
will move the connection to the TERMINATED state.