I've got a customer using a free calling package with no complaints so far. Whilst waiting for a compile I was watching the Asterisk console and noticed several calls all of which seemed to correctly deduct minutes from the monthly package and leave the balance untouched:
Code:
a2billing.php|1: file:Class.RateEngine.php - line:1146 - -> dialstatus : ANSWER, answered time is 236
a2billing.php|1: file:Class.RateEngine.php - line:836 - ft2c_package_offer : 1 ; 150000 ; 129919
a2billing.php|1: file:Class.RateEngine.php - line:850 - :[ID_CARD_PACKAGE_OFFER CREATED : 909]:['46', '4', '236']
a2billing.php|1: file:Class.RateEngine.php - line:907 - [CC_asterisk_stop QUERY = INSERT INTO cc_call (uniqueid,sessionid,username,nasipaddress,starttim
e,sessiontime, calledstation, terminatecause, stoptime, calledrate, sessionbill, calledcountry, calledsub, destination, id_tariffgroup, id_tariffplan, id_
ratecard, id_trunk, src, sipiax, buyrate, buycost, id_card_package_offer) VALUES ('1192643698.167', 'SIP/XXXXXXXXXX-00766be0', 'XXXXXXXXXX', '', CURRENT_TIMESTAMP - interval '236 seconds' , '236', 'XXXXXXXXXXX', 'ANSWER', now(), '0.0176', '-0', '', '', 'XXXXXXXXXXXXXX', '5', '34', '117045', '3', 'XXXXXXXXX', '0', '0.01', '0.0393333333333', '909')]
a2billing.php|1: file:Class.RateEngine.php - line:910 - [CC_asterisk_stop 1.1: SQL: DONE : result=1]
a2billing.php|1: file:Class.RateEngine.php - line:928 - [CC_asterisk_stop 1.2: SQL: UPDATE cc_card SET credit= credit+0 , redial='XXXXXXXXXXX' , lastus
e=now(), nbused=nbused+1 WHERE username='XXXXXXXXXX']
a2billing.php|1: file:Class.RateEngine.php - line:933 - UPDATE cc_trunk SET secondusedreal = secondusedreal + 236 WHERE id_trunk='3'
a2billing.php|1: file:Class.RateEngine.php - line:937 - UPDATE cc_tariffplan SET secondusedreal = secondusedreal + 236 WHERE id='34'
a2billing.php|1: file:a2billing.php - line:311 - [a2billing account stop]
What version of A2B are you running please?
Code:
a2b root # php /var/lib/asterisk/agi-bin/a2billing.php -v
A2Billing - Version Asterisk2Billing - Version 1.3.1 (Yellowjacket) - Release : September 2007