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

74 HP-UX C SIP Stack Programmers Guide
Call-leg PRACK State Machine
AUTHENTICATING A
R
E-INVITE
When a re-INVITE procedure is ended with a 401 or 407 final response, the
application needs to re-send the re-INVITE with authentication information. In
this case, the RVSIP_CALL_LEG_MODIFY_STATE_ACK_SENT state will
have the RVSIP_CALL_LEG_REASON_AUTH_NEEDED reason. The
application should repeat the process of sending the re-INVITE, (prepare the
outbound message, and call the RvSipCallLegReInviteCreate() and
RvSipCallLegReInviteRequest() functions again). The call-leg will
automatically add the needed authentication information (credentials) to the new
outgoing re-INVITE, and the request will be sent to the remote party. For more
information on the authentication process, see the Authentication chapter.
CALL-LEG PRACK
S
TATE MACHINE
The Call-leg PRACK state machine represents the state of a PRACK process
between two SIP User Agents. A PRACK process starts when the UAS triggers
a reliable provisional response in the OFFERING or REINVITE_RCVD states.
The RvSipCallLegPrackStateChangedEv() callback reports call-leg PRACK
state changes and state change reasons.
The application can work in automatic or manual PRACK modes. In automatic
mode, a PRACK request will be sent automatically on receipt of reliable
provisional response. When a PRACK request is received, the SIP Stack will
automatically send the response. In manual mode, the application should use the
PRACK state machine and the Call-leg PRACK API to trigger the PRACK
request and response. To work in manual PRACK mode, you should set the
manualPrack configuration parameter to RV_TRUE when the SIP Stack
initializes.
The call-leg associates with the following PRACK states:
RVSIP_CALL_LEG_PRACK_STATE_UNDEFINED
There is currently no active PRACK process.
RVSIP_CALL_LEG_PRACK_STATE_REL_PROV_RESPONSE_RCVD
A reliable provisional response was received.
RVSIP_CALL_LEG_PRACK_STATE_PRACK_SENT
A PRACK request was sent.
RVSIP_CALL_LEG_PRACK_STATE_PRACK_FINAL_RESPONSE_RCVD
A PRACK final response was received.