HP-UX C SIP Stack Programmer's Guide (Novembery 2007)
54 HP-UX C SIP Stack Programmer’s Guide
Call-leg State Machine
RVSIP_CALL_LEG_STATE_CANCELLED
Upon receiving a CANCEL request in the OFFERING state, the SIP Stack will
automatically accept the CANCEL and move to the CANCELLED state. If the
SIP Stack is configured to work in the manual behavior mode, your application
will be responsible for responding with 487. Otherwise, 487 will be sent
automatically. If you call the RvSipCallLegAccept() function in this state, the
call-leg will move to the ACCEPTED state.
RVSIP_CALL_LEG_STATE_REDIRECTED
A call-leg in the INVITING state may receive a 3xx class response. In this case,
the call-leg assumes the REDIRECTED state. The call-leg automatically sends
an ACK message and then updates the remote contact to the first contact address
found in the 3xx message. At this point, you may confirm the redirection by
calling the RvSipCallLegConnect() function again and the request will be sent
to the updated remote contact. You can also decide to terminate the call using
the RvSipCallLegTerminate() function.
RVSIP_CALL_LEG_STATE_UNAUTHENTICATED
A call-leg sending an INVITE request to a server or Proxy may receive a 401 or
407 response. In this case, the call-leg assumes the UNAUTHENTICATED
state. At this point, you may re-send your request with authentication
information by calling the RvSipCallLegAuthenticate() function. You can also
terminate the call using the RvSipCallLegTerminate() function.
RVSIP_CALL_LEG_STATE_OFFERING
Upon receipt of the initial INVITE by an incoming call, the call-leg assumes the
OFFERING state. In this state, it is up to you to decide whether to accept or
reject the call using the Call-Leg API.
RVSIP_CALL_LEG_STATE_ACCEPTED
If you accept a call in the OFFERING state, the call-leg assumes the
ACCEPTED state. The call-leg moves to the CONNECTED state upon receipt
of an ACK message from the calling party.
RVSIP_CALL_LEG_STATE_CONNECTED
The call-leg is connected. This state indicates a successful session setup. The
call-leg reaches this state either when a 200 final response is received on an
initial INVITE, or when an ACK is received on a 200 final response. While in