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

Working with Call-legs (Dialogs) 81
Call-leg Transactions
/*========================================================================*/
void RVCALLCONV AppCallLegTranscCreatedEvHandler(
IN RvSipCallLegHandle hCallLeg,
IN RvSipAppCallLegHandle hAppCallLeg,
IN RvSipTranscHandle hTransc,
OUT RvSipAppTranscHandle *hAppTransc,
OUT RvBool *bAppHandleTransc)
{
RvChar method[50];
RvSipTransactionGetMethodStr(hTransc,50,method);
/*Handles only INFO requests. Leaves the rest of the requests for the
Stack to handle.*/
if(strcmp(method,"INFO")==0)
{
*bAppHandleTransc = RV_TRUE;
}
else
{
*bAppHandleTransc = RV_FALSE;
}
*hAppTransc = NULL;
}
/*=================================================================================*/
Sample Code
The following sample code demonstrates an application implementation of the
RvSipCallLegTranscStateChangedEv() event. As indicated in the transaction
created callback, the state changed callback will be called only for an INFO
request. In this sample, the application accepts the request.