Dialogic 05-0867-005 Table Top Game User Manual


 
cc_RetrieveRej( ) reject a request to retrieve a held call
212
CRN crn_buf;
LINEDEV ldev = sr_getevtdev();
int len = sr_getevtlen();
void *ev_datap = sr_getevtdatap();
cc_GetCRN(&crn_buf, ev_datap);
if ( cc_HoldAck( crn_buf)<0)
procdevfail(ldev);
return( 0 );
}
/***********************************************************/
/* RetrieveCallHdlr - Reject the retrieve call request */
/***********************************************************/
int RetrieveCallHdlr( )
{
CRN crn_buf;
LINEDEV ldev = sr_getevtdev();
int len = sr_getevtlen();
void *ev_datap = sr_getevtdatap();
cc_GetCRN(&crn_buf, ev_datap);
if ( cc_RetrieveRej( crn_buf, TEMPORARY_FAILURE ) <0)
procdevfail(ldev);
return( 0 );
}
int procdevfail(LINEDEV ldev)
{
int reason;
char *msg;
reason = cc_CauseValue(ldev);
cc_ResultMsg(ldev,reason,&msg);
printf("reason = %x - %s\n",reason,msg);
}
!
! !
!
Errors
If the function returns a value < 0 to indicate failure, use the cc_CauseValue( )
function to retrieve the reason code for the failure. The cc_ResultMsg( ) function
can be used to interpret the reason code. Error codes are defined in the files
ccerr.h, isdnerr.h, and isdncmd.h.
Possible error codes from the cc_RetrieveRej( ) function include the following:
Error Code Description
ERR_ISDN_FW | ISDN_BADSTATE Cannot accept event in current state.
ERR_ISDN_LIB | E_ISNULL_PTR Null pointer error