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

82 HP-UX C SIP Stack Programmers Guide
Call-leg Forking Support
/*===================================================================*/
static void RVCALLCONV AppCallLegTranscStateChangedEvHandler(
IN RvSipCallLegHandle hCallLeg,
IN RvSipAppCallLegHandle hAppCallLeg,
IN RvSipTranscHandle hTransc,
IN RvSipAppTranscHandle hAppTransc,
IN RvSipCallLegTranscState eTranscState,
IN RvSipTransactionStateChangeReason eReason)
{
switch(eTranscState)
{
case RVSIP_CALL_LEG_TRANSC_STATE_SERVER_GEN_REQUEST_RCVD:
RvSipCallLegTranscResponse(hCallLeg,hTransc,200);
break;
default:
break;
}
}
/*===================================================================*/
AUTHENTICATING A
CALL-LEG
TRANSACTION
A call-leg transaction can receive a 401 or 407 response to its request. To send
the request again with authentication information, the application should do the
following:
1. Create a new call-leg transaction.
2. Fill the outbound message of this transaction with the same
information that was set to the unauthenticated transaction.
3. Call the RvSipCallLegTranscRequest() function with the same
method as the unauthenticated transaction.
The call-leg will automatically add the needed authentication information
(credentials) to the outgoing request, and the request will be sent. The call-leg
will also automatically add these credential to further outgoing requests.
For more information on the authentication process see the Authentication
chapter.
CALL-LEG F ORKING
S
UPPORT
A proxy might fork an initial INVITE request. As a result, the client may receive
multiple responses from multiple User Agent Servers (UASs) for the same
initial request. (According to the forwarding rules of proxies, a proxy must
forward back all 1xx provisional response messages. The proxy must also
forward back all 2xx final response messages, or a single non-2xx final response
message).