Page MenuHomePhabricator

Prepaid
AG Projects RTC Platforms (Accounting Guides)

This document describes the prepaid functionality

Prepaid Accounts

book-general-sip-platform-prepaid-engine (424×568 px, 56 KB)

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

  • SipPortaddBalance()
  • SipPortgetPrepaidStatus()
  • SipPortgetCreditHistory()

Graphical client

CDRToolRatingPrepaid

book-general-sip-platform-cdr-prepaid-accounts (272×1 px, 62 KB)

CDRToolRatingPrepaid history

book-general-sip-platform-cdr-prepaid-history (281×1 px, 54 KB)

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:

  • SipPortaddBalanceFromVoucher()

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.

CDRToolRatingPrepaid cards

book-general-sip-platform-cdr-prepaid-cards (521×1 px, 66 KB)

Next Steps

Continue by: