PrepaidAG Projects RTC Platforms (Accounting Guides)
This document describes the prepaid functionality
Prepaid Accounts
Prepaid functionality can be enabled by setting the SIP account prepaid attribute to 'true'. As a result, a new record is created in CDRTool application, in the prepaid table. This record is used to maintain the balance of the prepaid account. A SIP account marked as prepaid can make PSTN calls within the limits of the balance associated with the CDRTool prepaid account.
Every credit and debit operation is logged into the prepaid_history table, which can be queried using SOAP functions or can be accessed using CDRTool web pages.
SOAP/XML functions
- SipPort → addBalance()
- SipPort → getPrepaidStatus()
- SipPort → getCreditHistory()
Graphical client
CDRTool → Rating → Prepaid
CDRTool → Rating → Prepaid history
Voice prompts
Voice prompts can be played when the balance is not sufficient to make a new session. This feature must be enabled in the SIP Proxy configuration.
define(`USE_FAILURE_PROMPTS', `1') # Voice message prompts for prepaid failure conditions. define(`PREPAID_NO_CREDIT_PROMPT', `sip:800301@MEDIA_SERVER') define(`PREPAID_ERROR_PROMPT', `sip:800399@MEDIA_SERVER')
Prepaid Cards
You may generate prepaid cards with designated values. The cards are randomly generated, identified by a combination of ID and NUMBER combination that can be safely sold to end-users or resellers in the form of scratch cards.
SOAP/XML functions
Each prepaid card has a value, the value is transfered to the SIP account when the correct ID and NUMBER are supplied to the function:
- SipPort → addBalanceFromVoucher()
Graphical client
The Batches with prepaid cards can be exported in comma separated values format to external systems, for example to a printer that makes scratch cards.
CDRTool → Rating → Prepaid cards
Next Steps
Continue by:
- learning about Rating: Assignment; or
- learning about Rating: Logic; or
- go back to CDR Description.