Details
-
Type:
New Feature
-
Status: Done
-
Resolution: Done
-
Affects Version/s: None
-
Fix Version/s: None
-
Labels:None
Description
The following code allows the admin to set a post-paid customer credit limit to 0 which then allows the post paid customer to make unlimited calls. The code is in /freeswitch/scripts/astpp/lib/astpp.functions.lua
function get_balance(userinfo) balance = (userinfo['balance']) + (userinfo['credit_limit'] * userinfo['posttoexternal']); -- Override balance if call is DID / inbound and coming from provider to avoid provider balance checking upon DID call. if (userinfo['type'] == '3' and call_direction == 'inbound') then balance = 10000 end -- Make Postpaid calls unlimited if credit limit set to 0. if (userinfo['posttoexternal'] == '1' and userinfo['credit_limit'] == '0.00000') then balance = 10000 end return balance end