Calling card service
MyVoipApp Support Team
Support@myvoipapp.com
1. Introduction

"Calling card" is a virtual card service. It is more like a prepaid account which users can use it to make outgoing call in any SIP clients who have been connected to MSS. With "calling card", the balance is control. Each calling card has some balance. If the balance is not enough, the user cannot use it to make outgoing call. When one call is finished, some fee will be decreased from the balance.
In another way, MSS can limit some SIP clients to make outgoing call; the feature is "call level". User can use "calling card" to suppress the call level and make outgoing call.
In miniSipServer (MSS), the default called number prefix for "calling card" is "*300*". That means the calling card service will be triggered if the user dials "300*". Below figure describes the basic process of this service.

MSSversion 2.5 or above (for 100 clients or for 1000 clients) can support this service. Please download it from http://www.myvoipapp.com.
We need configure MSS to support this service. These configurations include:
- Connect to database. MSS uses MySQL as its default database.
- Limit some called numbers can only be routed successfully through calling card.
- Configure charge information, such as fee matrix.
- Configure card information, such as card number, password and balance, etc.
2. Basic Configuration
2.1 Remote database
In current phase, MSS can only connect to MySQL database (please download MySQL from http://www.mysql.com/ and install it firstly).
Please click menu "Data->System information->Remote database" and configure the parameters according to your MySQL configurations.

|
Item |
Value |
Description |
|
Database address |
domain name or IP address |
Remote MySQL address. Note, MSS and MySQL can be installed in the same computer. In this case, the "database address" should be "localhost". |
|
Visit port |
Integer |
Remote MySQL visit port. If you updated port in MySQL configuration, you need update this configuration in MSS too. The default value is 3306. Please refer to MySQL manual document. |
|
User name |
String |
The user name which is created in MySQL database. The user should have the right to create database, create tables, etc. |
|
Password |
String |
Password of the visit user. It depends on MySQL configuration. |
2.2 Limit called number
In default, all called numbers in MSS can be routed for all local users. If we want to deploy calling card service, of course, some called numbers or all called numbers must be limited. For example, we can limit users that they cannot make out-group call but they can do it through calling card.
What we should do is set "call level" for such called number. Please click menu "Dial plan->Called analysis" and select or add called prefix to edit. For example, we limit the call level for "external line" call to 1. That means the call will success if the user has "call level 1" right or through "calling card" service.

2.3 Charge information
Since "Calling card" is a prepaid service, it is important to configure prepaid information. It includes following configuration: (1) Configure prepaid rate; (2) Configure fee matrix.

2.3.1 Prepaid rate
Please click menu "Services->Calling card->Prepaid rate" and prepare to add a new prepaid rate.

|
Item |
Value |
Description |
|
ID |
Integer |
Indication of current record. |
|
Interval |
Integer |
Interval for calculating fee. The unit is "second". |
|
Tariff |
Integer |
Fee for each "Interval". |
For an example, "ID=1; Interval=60; Tariff=10". It means that MSS should reduce 10(coin, USD and so on) from the card's balance every 60 seconds.
2.3.2 Fee matrix
Please click menu "Services->Calling card->Fee matrix" and prepare to configure how to calculate fee.

|
Item |
Value |
Description |
|
Called prefix |
String |
The destination prefix which the call will be routed. This field can be set with "*". That means for all destinations. |
|
Prepaid rate ID |
Integer |
Prepaid rate for calculating fee. This ID is configured in previous section "2.3.1Prepaid rate". |
For examples:
We configure following records in the "caller prepaid" table.
|
Called prefix |
Prepaid rate ID |
Description |
|
* |
1 |
For all prepaid subscriber and all destination, the rate "1" will be applied. |
|
101 |
2 |
Any subscribers call destination with prefix "101", the rate "2" will be applied. |
Then, we can see which rate will be applied in following cases.
- Call "101", the rate ID "2" will be applied.
- Call "102", the rate ID "1" will be applied.
- Call "9xxx", the rate ID "1" will be applied.
- Call "1011", the rate ID "2" will be applied.
2.4 Card information
A card always includes following information: card number, password for this card and balance.
Please click menu "Services->Calling card->Card information" to add or edit a card information.

|
Item |
Value |
Description |
|
Card |
String |
Card number. |
|
Password |
String |
Password for this card. |
|
Balance |
Integer |
Balance. |
3 Advance configuration
3.1 Announcement files
As described in chapter "Introduction", several audio will be played to caller party. These audio files are recorded in English default. All audio files are installed in directory "mss_install_directory\ann". You can replace them as you want.
Please refer to document "record our own audio" for details.
3.2 CDR
A table will be created in MySQL database to store all CDRs of these calling cards. The table name is 'tbl_callingcard_cdr'. The advance user can visit or query it directly.