Vari-A-Bill services cc_SetBilling( )
215
!
! !
!
Termination Events
• CCEV_SETBILLING - indicates that the billing information for the call has
been acknowledged by the network. This event is returned only when the
AT&T Vari-A-Bill feature is used.
• CCEV_TASKFAIL - indicates that a request/message was rejected by the
firmware. Typically, this event is triggered by an incorrect function call
during the call.
!
! !
!
Cautions
• This function is available only on the AT&T network and only for the PRI
4ESS protocol.
• cc_SetBilling( ) may not function in all service-provider environments.
Check whether retrieving billing information is an option with the service
provider.
!
! !
!
Example
#include <windows.h> /* For Windows applications only */
#include <stdio.h>
#include <errno.h>
#include “srllib.h”
#include “dtilib.h”
#include “cclib.h”
void main()
{
LINEDEV devhdl = 0;
CRN crn = 0;
char *devname = “dtiB1T1”;
char dnis_buf[CC_ADDRSIZE];
CC_RATE_U rate;
if ( cc_Open(&devhdl, devname, 0)<0)
{
printf(“Error opening device: errno = %d\n”, errno);
exit(1);
}
printf(“Waiting for call\n”);
if (cc_WaitCall(devhdl, &crn, NULL, -1, EV_SYNC)<0)
procdevfail(devhdl);
if ( cc_GetDNIS(crn, dnis_buf)<0)
callfail(crn);
if ( cc_AnswerCall(crn, 0, EV_SYNC)<0)
callfail(crn);
/*
* using cc_SetBilling( ) to set the rate of the current call.