HP-UX C SIP Stack Programmer's Guide (Novembery 2007)
Authentication 207
Server Authentication Implementation
hCallLeg,
hTransc,
RVSIP_TRANSC_AUTH_ACTION_SKIP,
NULL,
NULL);
}
if(rv != RV_OK)
{
printf("RvSipCallLegAuthProceed fail. Status is %d.", rv);
}
}
/*=========================================================================================*/
Sample Code
The following code demonstrates the implementation of the
RvSipCallLegAuthCompletedEv callback function.
/*=========================================================================================*/
void RVCALLCONV AppAuthCompletedEv(
IN RvSipCallLegHandle hCallLeg,
IN RvSipAppCallLegHandle hAppCallLeg,
IN RvSipTranscHandle hTransc,
IN RvBool bAuthSucceed)
{
RvStatus rv;
RvSipCallLegState eState;
if(bAuthSucceed == RV_FALSE)
{
/*------------------------------------------------------------------------------------
The authentication procedure was completed with failure. Sends a 401 Unauthorized
response.
------------------------------------------------------------------------------------*/
rv = RvSipCallLegRespondUnauthenticatedDigest(
hCallLeg, NULL, 401, NULL,
g_strSrvAuthRealm, NULL,
g_strSrvAuthNonce, NULL,
RV_TRUE,
RVSIP_AUTH_ALGORITHM_UNDEFINED, NULL,
RVSIP_AUTH_QOP_UNDEFINED, NULL);
if(rv != RV_OK)
{