cc_GetSigInfo( ) gets the signaling information of an incoming message
154
.
.
.
switch(sr_getevttype()){
.
.
.
case CCEV_CALLINFO:
/* retrieve signaling information from queue */
if ( cc_GetSigInfo(&ie_blk, U_IES, ev_datap) <0)
{
/* failed, get failure reason */
procdevfail (ldev);
}
else
{
/* succeeded, process signaling information */
.
.
.
}
break;
}
.
.
.
}
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.