Prepaid Account
Account Parameters
Parameter Name
|
Database Field
| type |
Default | Descriptions
|
User |
account_user
| varchar |
<NULL> | Account User |
Domain
|
account_domain
| varchar |
<NULL> | Account Domain
|
Status
| account_status
| 'locked' or 'active'
| 'active'
| Account Status
|
1st Use From
|
valid_from
| date
|
0000-00-00 | Date from which 1st Use is allowed
|
1st Use To
|
valid_to
| date
|
0000-00-00 | Date to which 1st Use is allowed |
Use Period
|
valid_period
| varchar
|
'1 year'
| Period from 1st Use that account stay valid
|
Date 1st Use
|
date_1st_use
| date
|
0000-00-00 | Date of 1st Use Set upon 1st Use
| Date Last Use
| date_last_use
| date | 0000-00-00 | Date of Last Use Updated upon each Use
| Use Expire | date_expire
| date | 0000-00-00 | Date to which account expire Set upon 1st Use as <Date 1 Use> + <Valid Period>
| Original Balance
| orig_balance
| double
| 0
| Balance when the account is created
| Balance
| balance
| double
| 0
| Current balance
| Rate Plan
| rate_plan
| varchar
| <NULL>
| Rate Plan for this Account
| Service Plan
| service_plan
| varchar
| <NULL>
| Service Plan for this Account
| Last Charge Date
| srv_charge_last
| date
| 0000-00-00 | Date of last Service Charge to this Account
| Next Charge Date
| srv_charge_next
| date
| 0000-00-00 | Date of next Service Charge to this Account
| Next Reset Date
| reset_next
| varchar
| 'never'
| Next date to reset the Balance back to the <Original Balance>
|
Prepaid CallAnnouncement of Available MinuteAnnouncement of Available Minute at the beginning of a Prepaid Call has the following steps
- Caller enter the Destination number
- NMS lookup Dial Plan, Dial Policy and Route Table to form the destination SIP URI
- NMS send Rate Quote request with the Caller's Account, From-URI and To-URI to the NAS
- NAS lookup the Account Balance and Rate Table entry to calculate the available minute and return the result to the NMS
- If the Rate Quote result is OK, the NMS announce the available minute to the caller
Calculation of the Available Minute by the NAS is as follow :
[Available Second] = ( [Account Balance] - [Extra Charge from Rate Entry] ) * 60 / [Rate per Minute] + 0.5;
if ( [Available Second] > [Max Talk Time]) [Available Second] = [Max Talk Time];
[Available Minute] = truncate( [Available Second] / 60 );
|
Mid Call Balance Control
At configurable interval during an active Prepaid Call :
- NMS send Rate Continue request to the NAS
- NAS update the calculation of the incurred charge, compare against the Caller's Account Balance to calculate the Remaining Talk Time and return the result to the NMS
- If the Remaining Talk Time reach the Whisper Threshold, the Remaining Talk Time will be whispered to the Caller
- If the Remaining Talk Time is zero, the NMS will disconnect the call
Calculation for mid call balance control:
[Usage Charge] = [Duration] * [Rate] ;
[Incurred Charge] = [Usage Charge];
if ( [Actual Duration] > [Long Call Duration Threshold] )
[Incurred Charge] += [Long Call Charge];
if ( ( [Actual Duration] - [Long Call Duration Threshold] ) > [Long Call Increment] * N )
[Incurred Charge] += [Long Call Charge] * N;
|
Total Charge at End of CallCalculation of Total Charge at End of Call
[Usage Charge] = [Duration] * [Rate];
[Total Charge before Tax] = [Usage Charge];
if ( [Actual Duration] > [Long Call Duration Threshold] )
[Total Charge before Tax] += [Long Call Charge];
if ( ( [Actual Duration] - [Long Call Duration Threshold] ) > [Long Call Increment] * N )
[Total Charge before Tax] += [Long Call Charge] * N;
if ( [Actual Duration] > [Disconnect Charge Duration Threshold] ) [Total Charge before Tax] += [Disconnect Charge];
[Total Charge] = [Total Charge before Tax] * ( 1 + [Tax Rate] );
|
Prepaid Pass Through- Prepaid Pass Through is a Responder Application in the NMS.
- Require no Subscriber Account in the NMS
- The Caller is prompted for Account PIN
- NMS queries AccountBalance from the NAS
- If
the Account PIN doesn't exist in the NAS's Account Table, the NAS will
apply the "Auto Account Creation" procedure described below
- NMS admit the caller to made upon valid Balance and Expiration information returned from NAS
Auto Account Creation with Prepaid Card
When processing an AccountBalance Request for a non-existing
account, the NAS will search its Prepaid Card table, matching the
Account Number against the Prepaid Card Activation Code. If there is a
match and that the associated Prepaid Card is valid, un-used and
not-locked :
-
- A new NAS account will be created with the Account Number equal to the Prepaid Card Activation Code.
- The full value of the Prepaid Card will be transferred to the newly Created Account.
- The Rate Plan, Service Plan, Service Charge Day of Month and
Account Balance Reset Day of Month will be defined by the Prepaid card
entry
- The "Date 1st Use" of the Created Account will be set to current Date
- The "Use Expire" of the Created Account will be set to current Date + "Use Period" of the Prepaid Card
- The Prepaid Card will be marked as used by the Created Account
- A Service Record entry with "Category"=="Create Account" will be inserted to
registered the time of the account creation and the amount
transferred from the Prepaid Card to the Created Account.
- The Balance and Expiration information will be returned in the Response to the AccountBalance Request
Recharge Procedures
-
- Validate Domain and Account
- Check for existence and not locked
- Current Date is before the "Use Expire" of the Recharging Account
- Validate Prepaid Card
- Activation Code exist
- Current Date is within "Valid From" to "Valid To" of the Prepaid card
- Prepaid Card is Not Locked
- Prepaid Card is Not Used
- The full value of the Prepaid Card will be transferred to the Recharging Account.
- The "Use Expire" of the Recharged Account will be extended to current Date + "Use Period" of the Prepaid Card
- The Prepaid Card will be marked as used by the Recharged Account
- A Service Record entry with "Category"=="Recharge Account" will be inserted to
registered the date of the account recharge and the amount
transferred from the Prepaid Card to the Recharged Account.
Prepaid Card Number
- Unique per Domain
- 10 to 16-digit Activation Code
- 5 to 9-digit Serial Number
- Upto 100K to 1-billion Recharge Card per domain
- 5 to 7-digit Cryptographic Hash
- 100K to 10-million combinations for each code against Brute Force attack
Code Length |
# S/N Digit |
# Hash Digit |
# Card
|
16 |
9 |
7 |
1 billion
|
15 |
8 |
7 |
100 million
|
14 |
7 |
7 |
10 million
|
13 |
6 |
7 |
1 million
|
12 |
6 |
7 |
1 million
|
11 |
6 |
5 |
1 million
|
10 |
5 |
5 |
100K
|
|