HP-UX C SIP Stack Programmer's Guide (Novembery 2007)
136 HP-UX C SIP Stack Programmer’s Guide
Register-Client State Machine
BASIC REGISTER-
C
LIENT STATES
RVSIP_REG_CLIENT_STATE_IDLE
The IDLE state is the initial state of the Register-Client state machine. Upon
register-client creation, the Register-Client assumes the IDLE state. The
register-client remains in this state until RvSipRegClientRegister() is called,
whereupon it moves to the REGISTERING state.
RVSIP_REG_CLIENT_STATE_REGISTERING
After calling RvSipRegClientRegister() and sending a REGISTER request, the
register-client enters the REGISTERING state. The register-client remains in
this state until it receives a final response from the Registrar. If a 2xx class
response is received, the register-client assumes the REGISTERED state. If a
3xx class response is received, the register-client moves to the REDIRECTED
state. If 401 or 407 responses are received, the register-client moves to the
UNAUTHENTICATED state. If the REGISTER request is rejected with a 4xx,
5xx or 6xx class response—other than 401 and 407—the register-client assumes
the FAILED state. If no final response is received before time-out, the register-
client assumes the FAILED state.
RVSIP_REG_CLIENT_STATE_REDIRECTED
A register-client in the REGISTERING state can receive a 3xx class response.
In this case, the register-client assumes the REDIRECTED state. The register-
client has already updated the Registrar address according to the first Contact
header received in the 3xx class response. You can update the Registrar address
with any other preferred Registrar address. At this point, you can confirm the
redirection of the REGISTER request by calling the RvSipRegClientRegister()
function. You can also decide to terminate the register-client using the
RvSipRegClientTerminate() function.
RVSIP_REG_CLIENT_STATE_UNAUTHENTICATED
A register-client in the REGISTERING state can receive a 401 or 407 response.
In this case, the register-client assumes the UNAUTHENTICATED state. At
this point, you may re-send the registration request with authentication
information by calling RvSipRegClientAuthenticate(). You can also terminate
the register-client using the RvSipRegClientTerminate() function.