CCgetcharge
Previous Topic  Next Topic 

Synopsis: 

       CCgetcharge(port, timeslot,&pType,&pCharge,&pMeter)


Arguments:

       port The logical E1/T1 port number.

channel The channel number.

pType - Pointer to a variable that wiull hold the charging type

pCharge - Pointer to a variable holding the returned charging information (returned as a 34byte (68 char) hexi-string)

pMeter - Pointer to a variable holding the number of metering pulse received.


Description:   This function maps to the following Aculab function:


       ACU_ERR call_get_charge(GET_CHARGE_XPARMS *chargep);


This function obtains information regarding the cost of a call. The function may be used any time that a valid call handle is available, however, the call charge information may not be valid until the call has cleared and the call has gone to the EV_IDLE state. The function provides for the receipt of call charging information and/or the accumulation of meter pulses.


The pType argument is a pointer to a varibale that will hold the received charging type which will be one of the following values (As defined in ACULAB.INC):


const CHARGE_NONE                =        0;                                

const CHARGE_INFO                =        1;                                

const CHARGE_METER        =        2;                



The meaning of these types is described below:


       • CHARGE_NONE - There is no valid charging information available in either the charge or meter fields.

       • CHARGE_INFO - The information contained in the element charge is valid and may be used.

       • CHARGE_METER -The information contained within the meter element is valid and may be used.

       • CHARGE_INFO + CHARGE_METER - The information contained in both the charge and meter elements is valid and may be used.


The pCharge argument is a pointer to a variable that will contain the charging information, returned as as 34byte (68 char) hexstring.


The pMeter argument is a pointer to a variable that will hold the number of metering pulses.


Returns:  Returns 0 if successful or a negative error code