CLI-based/Retail
I have now made a retail version for FreeSWITCH-Billing.
It works like this:
- A specific context is created for this application.
- Any calls which comes in on said context is handled by the retail script.
-
The script Looks up the incomming caller ID Number in a DB table.
- The CLI is associated with a "Master" acount via the Master account's ID.
-
This Master account has a balance, a rate table and a username/password (for later use, this user will be able to check his traffic, balance, etc via web)
- If the account has a positive balance, the rate table is used to apply a price per minute.
- The Max talk time is calculated and set by the script and the call is sent out using the route tables (already existing in the wholesale side).
- Once the call is finished, the CDR is posted using mod_xml_cdr on a web server and the receiving php inserts the cdr into the cdr table, also calculating and setting the cost of the call.
TO DO:
- web pages for the client to check out his balance, clis, etc.
I will upload this into the github this weekend!
Have fun!
note: any suggestion is VERY welcome!