cc_SetBilling( ) Vari-A-Bill services

216

* This function is used in conjunction with AT&T Vari-A-Bill
* service only.
* Do not use it in other protocol applications
*/
rate.ATT.cents = 99;
if(cc_SetBilling(crn, ISDN_FLAT_RATE, &rate, EV_SYNC) <0)
callfail(crn);
.
.
.
.
.
if ( cc_DropCall(crn, NORMAL_CLEARING, EV_SYNC)<0)
callfail(crn);
if ( cc_ReleaseCall(crn)<0)
callfail(crn);
if ( cc_Close(devhdl)<0)
printf(Error closing device, errno = %d\n, errno);
}
int callfail(CRN crn)
{LINEDEV ld;
cc_CRN2LineDev(crn,&ld);
procdevfail(ld);
}
int procdevfail(LINEDEV handle)
{int reason;
char *msg;
reason = cc_CauseValue(handle);
cc_ResultMsg(handle, reason, &msg);
printf(reason = %x - %s\n,reason,msg);
}
!
! !
!
Errors
If the function returns < 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_SetBilling( ) function include the following: