It's been 18 months but I haven't dropped my hopes for putting kazoo in production ;) Hopefully I can understand erlang a little better this time and ask not so simple questions.
I'm based in Europe in a non English speaking country with a different currency than the dollar and different market expectations, so I'm facing somewhat of a steep ride. My major concern is fraud prevention and spending control for all accounts.
TL;DR: I'd like to understand if it's possible to terminate all calls for an account when some condition occurs (tipically low-credit event), in the middle of a call or multiple calls.
Here's my current handling of limits, fraud prevention and rating:.
I have Upstream providers (telco) and downstream Resellers and End users. I understand kazoo can accommodate hierarchies of accounts, but I'm not sure how they're checked on a live call and what happens exactly when a limit is breached.
Here's the description of the credit based part of the fraud control:
The main account can only consume X amount of credit (euro) per day/week/month, using it's own Rates (tied to the variable upstream provider).
The reseller can only consume X amount of money, (euro, pounds, other) per day/week/month using transfer rates from the main account. There's a new "ratedeck?" for each reseller.
In turn, the end user can only consume X amount of money as the reseller, but based on their own ratedeck.
The fraud control at the moment works like this:
Each time interval (one or few seconds) we calculate the current total due for all running calls for each account (main, reseller, end user) and compare that to their allowance (per total credit or day/week/month).
When we determine that the account is over it's allowance, *ALL* calls for the account are terminated in an instant. Usually this means the credit for the account is 0 or below it's threshold.
New calls will usually not be allowed as the credit is 0.
I see jonny5 has some provisions for credit checking, for prepaid/postpaid accounts but I'm not sure how often it is called and if it's called for all accounts involved (or at least for all reseller/end user accounts) on each call.
Also how does hotornot fit in the whole picture?
I hope I'm not overcomplicating things here.
Thank you