Hello
I have a problem many other persons had but i didn't find how to solve it...
The method of calculation of the time is wrong when billing A-leg and B-leg.
It calculates the timeout value as it : timeout = (credit - 1) / price_B_leg
Which is quite a mysterious way to calculate the timeout ?
I use a2billing 1.8.1
Here is some debug : the customer has 1.41€ ; A-leg price is 0,06€/min ; B-leg price is 0,05€/min
Code:
a2billing.php,3,callback: file:Class.A2Billing.php - line:893 - uniqueid:1339927957.373 - DESTINATION ::> 0033556434136
a2billing.php,3,callback: file:Class.A2Billing.php - line:900 - uniqueid:1339927957.373 - RULES APPLY ON DESTINATION ::> 33556434136
a2billing.php,3,callback: file:Class.RateEngine.php - line:98 - uniqueid:1339927957.373 - [CC_asterisk_rate-engine: (8, 33556434136)]
a2billing.php,3,callback: file:Class.RateEngine.php - line:120 - uniqueid:1339927957.373 - [CC_asterisk_rate-engine - CALLERID : unknown]
a2billing.php,3,callback: file:Class.RateEngine.php - line:182 - uniqueid:1339927957.373 - [rate-engine: Count Total result 1]
a2billing.php,3,callback: file:Class.RateEngine.php - line:267 - uniqueid:1339927957.373 - [CC_asterisk_rate-engine: Count Total result 1]
a2billing.php,3,callback: file:Class.RateEngine.php - line:268 - uniqueid:1339927957.373 - [CC_asterisk_rate-engine: number_trunk 1]
a2billing.php,3,callback: file:Class.A2Billing.php - line:1016 - uniqueid:1339927957.373 - OK - RESFINDRATE::> 1
a2billing.php,3,callback: file:Class.RateEngine.php - line:282 - uniqueid:1339927957.373 - [CC_RATE_ENGINE_ALL_CALCULTIMEOUT (0.41371)]
a2billing.php,3,callback: file:Class.RateEngine.php - line:288 - uniqueid:1339927957.373 - [CC_RATE_ENGINE_ALL_CALCULTIMEOUT: k=0 - res_calcultimeout:480]
a2billing.php,3,callback: file:Class.A2Billing.php - line:1028 - uniqueid:1339927957.373 - RES_ALL_CALCULTIMEOUT ::> 1
a2billing.php,3,callback: file:Class.A2Billing.php - line:1727 - uniqueid:1339927957.373 - TIMEOUT::> 480 : minutes=8 - seconds=0
a2billing.php,3,callback: file:Class.RateEngine.php - line:1240 - uniqueid:1339927957.373 - app_callingcard: Dialing 'SIP/IPSIP1/0000033556434136|60|HRrL(480000:61000:30000)' with timeout of '480'.
The timeout of 8 mins (480sec) seems to be found with = (1.41[credit] - 1)/0.05[price_B_leg]
the real timeout value should be 1.41 / (0.05+0.06) = 12 mins (if we don't take in account the time used by customer to enter his PIN code and the destination phone number)...
Any fix ? in some situation it leads to a negative balance of the customers.
Thanks in advance,