… charge calling card customers XX/min extra when they call a toll-free line
This is very easy to do with PortaBilling’s Usage charges feature:
- Create two tariffs – one with your normal rates (for example 0.13 dollar/min for calls to Czech Republic) and the other one with “toll-free” rates, including your toll-free costs there (for example, 0.17 dollar/min for calls to Czech Republic).
TIP: When calculating the price for the toll-free line, it is not enough to add together your ordinary price plus the costs of one minute on the toll-free line. In order to make a 3-minute call, the customer will spend about 4 minutes on the line while listening to voice prompts, entering a PIN/destination and waiting for an answer. Additionally, situations where a customer will enter an incorrect PIN or be unable to reach his party at all should be taken into account. Therefore, usually:
TollFree_ Price = Ordinary_Price + X*Toll_FreeCost
where X is a ratio between the total duration of incoming toll-free calls and the total duration of outgoing calls. For even more accurate billing, you may configure a separate charge for incoming call legs.
- Make sure your IVR script supports the “Access code” feature (using the “PortaBilling Original CLD” RADIUS attribute). PortaOne’s TCL developers can help you add this feature to your application.
- Create a product for your calling cards and make two entries in rating list:
- one with an Access code equal to your toll-free number and “Toll-free tariff”;
- another with an Access code equal to your local access number and “Ordinary tariff.”
… configure separate charge for incoming call leg
Incorporating incoming call leg costs into the price of an outgoing call works well when there are just a few different cost levels for an incoming call leg (e.g., zero cost for local access numbers and $0.01/min for toll-free). If there are variations in incoming call leg costs (e.g., price differences between toll-free numbers and access numbers from different parts of the USA or costs that depend on origination locations), then the number of required outgoing tariffs grows quickly and becomes hard to manage. That’s why PortaBilling provides separate pricing for incoming (calls to an access number) and outgoing (calls to a final destination) call legs in the Prepaid Card Calling Application.
Required application options
- Incoming session accounting – this allows to define how to charge the user for a call to an access number (incoming call legs).
- No charges – this option is set by default. It means that the user is not charged for a call to this voice application until they make an outgoing call.
- Charge for all IVR session time – this option allows you to charge users different prices for a call to this voice application and an outgoing call that is then made using this application. It means that a user is charged one price for the period that begins from launching the voice application until the call is connected to its destination (including the periods between several outgoing calls) and another price for an outgoing call. You can use separate charges for failed and successful outgoing calls. You need to set the Incoming access code prefix option empty and add access codes for successful (ACCESS_CODE.ANSWER) and failed outgoing calls (ACCESS_CODE.ANSWER.FAIL) for corresponding tariffs in the account’s product configuration (Product > Charges > Usage charges > Access code field).
- Charge only for time spent in outgoing call(s) – the user is charged for outgoing calls and for the call to this application. The duration of the call to the voice application is calculated as the sum of the duration of the outgoing calls and is charged accordingly. If the outgoing call is not connected, the user isn’t charged for the call to this voice application.
- Charge for all IVR session time, but do not charge if all outgoing calls fail – the user is charged for the period that begins from launching the voice application until the call is finished (see Charge for all IVR session time option). If the outgoing call isn’t connected, then the user isn’t charged for a call to this voice application.
- Rate by – this specifies which number should be used for charging an incoming call leg. Available options are: CLI, CLD.
- Incoming access code prefix – this prefix must be added to an access number to permit the use of a different tariff for an incoming call leg cost.
Configuration
Let’s consider the following example. An ITSP sells prepaid calling cards in the USA. It provides local access numbers for each state plus a toll-free access number which is available in all states.
The ITSP charges its end users $0.05/min for an incoming call to the toll-free number and there is no charge to local access numbers. Alaska is a remote location so calls to its local access number cost $0.03/min for the incoming call leg. That is why the ITSP decides to sell two types of prepaid cards in Alaska:
- One that is more expensive, but which charges nothing for an incoming call leg;
- Another that is cheaper, but which charges $0.03/min for an incoming call leg.
Here we will show how easy it is to configure all these access numbers and rates in the products by using the Incoming access code prefix.
Configure a prepaid card applications as described in the Prepaid Calling Cards handbook and then adjust the following options:
- Assign the incoming access code prefixes to all IVR applications:
- Create three customer tariffs to charge incoming call legs differently.
- Create a product with no charge for an incoming call leg for calls to local Alaska access numbers. To do this, match the IVR applications and tariffs on the Usage charges panel of the Product page:
- Create a product with a $0.03/min price for an incoming call leg for calls to local Alaska access numbers. To do this, match the IVR applications and tariffs on the Usage charges tab of the Product page:
- Services – select Voice calls;
- Node – choose the PortaSIP node;
- Access code – use the incoming access code prefixes created previously – Toll_Free; Local and Local.Alaska;
- Tariff – select the tariffs created previously, respective to the prefixes. PortaSwitch supports the two-segment Incoming access code prefix separated by a dot (e.g., Local.Alaska). This can be useful when you want to charge end users differently according to the product. Thus, if there is an entry for the Local.Alaska access code in the product, end users will be charged $0.03/min for an incoming call leg. If there is no such entry, end users will be charged according to the tariff assigned to the Local access code.
Two xDRs will be generated for this kind of call: one with a charge for the incoming call leg and the other with a charge for the outgoing call leg. To charge for the incoming call leg the billing engine must match the access code with the rating entry in the product. To do this, the PortaSIP Media Server forms the access code adding the prefix before the access number. The billing engine receives the access code and looks for the best matching Access code in the end user’s product. If it is not found, the billing engine cuts the rightmost segment of the received access code together with the dot and searches again. The tariff that is defined for the longest matching access code will be applied.
Thus, if an end user buys a prepaid card and makes a call to the 19075550001 access number, the billing engine receives the Local.Alaska.19075550001 access code. There is no entry that matches the Local.Alaska.19075550001 access code in the product, so the billing engine cuts the rightmost segment of the code and tries to find the rating entry for the Local.Alaska access code. The Local_Alaska_Incoming tariff is defined for this access code in the Fair Cost product, so the end user using this product will be charged $0.03/min for an incoming call leg. In the case of a Promo product the billing engine must again cut the rightmost segment of the code to find the rating entry for the Local access code. It finds it and according to it, the incoming call leg is free of charge for the end user.
… use special tariff for the first IVR session
PortaBilling offers the option for using a special tariff for the first IVR session made by users with prepaid cards. With this functionality you may charge your customers different tariffs for the first and subsequent calls. In order to use this functionality you need to have an app_porta_debitcard.tcl TCL script from PortaOne, Inc for the CISCO gateway. On the web interface, you should also create:
- Two tariffs (one for the first call and a second for subsequent calls) with the following settings: Applied to – Customer; Update usage time – Always.
- Product containing these two tariffs:
… configure automated dialing to a specified number?
For an end user who only needs to make calls to a single destination number automated dialing can be configured to that specific number. The end user dials an access number, enters a PIN (if required) and the system connects him with his callee. Consequently, the end user saves money on his incoming call leg (since there is no need for IVR prompts to be played or for him to manually dial the number), therefore leaving more funds for his outgoing call leg.
Consider the following example.
John Doe has a prepaid calling card with PIN 121255512000. He only uses this card for cheap calls to his friend in India. John Doe wants to automatically connect with his friend after dialing the access number rather than have to also input a long string of numbers each time. To do this, he sets his friend’s phone number as an associated number on his self-care web interface.
To enable automating dialing, first select the Check associated number checkbox on the administrator web interface.
- On the navigation menu, select Infrastructure, then select Voice calls processing and go to Voice applications.
- On the Voice applications panel, select Application specific and enable the Check associated number option.
- Click Save.
Then define the destination number on the Account self-care portal.
- Log in with the account’s web access login and password. After that you will see the account’s dashboard interface.
- In the Cloud PBX tab, click General.
- Type in the destination number in the Associated Number field.
- Click
Save.
… enable end users to top up an account with a voucher
This chapter demonstrates how to enable end users to top up their funds by using a voucher. End users may refill their accounts on their account self-care interface or via a special IVR. Please note that only debit or credit accounts that have an individual credit limit can use vouchers to top up their funds.
In order to distinguish vouchers (accounts) from other accounts, all vouchers are created with a @pin realm. These vouchers may be used to top up accounts that don’t have sub-realms.
A sub-realm is a unit that imposes a scope of uniqueness for an account ID. For instance, to enable a user to enjoy various PINLess dialing services and not confuse them, create users accounts with different sub-realms. Then the user is able to top up their accounts by using vouchers that share the same sub-realm.
Consider the following example:
Prepaid user Richard Roe subscribes to the MegaCall PINless dialing service. Since the MegaCall product has a mega1 sub-realm, Richard Roe buys a voucher that has the same mega1 sub-realm. All he has to do is dial his access number and then he can successfully top up his account by using the IVR application.
Set up the Configuration server
Create sub-realms
You can create additional sub-realms on the Configuration server web interface.
- Log in to the Configuration server web interface.
- Select the current configuration and click Clone.
- Select the Web Cluster instance.
- Select the environment where you want to add new product sub-realms.
- Select BusinessRoles under Groups.
- Click the
icon and type in the sub-realm’s name.
- Click Save.
Enable top up of accounts with any applicable vouchers
It is recommended that you create a separate special customer for generating vouchers. This allows you to keep all of the vouchers in one place and manage them effectively. Since accounts that use vouchers belong to different customers, it is necessary to enable their top ups on the Configuration server.
- Select PortaSwitch on the Configuration Tree.
- Select the Global environment.
- Select BillingFeatures under Groups.
- Select No in the CheckVoucherOwner option.
- Click the Save button and then the
Verify button.
- Verify the new configuration and click the
Check/Apply button.
Create an IVR application and associate access numbers
Define which IVR application launches when an end user dials the access number for account top up via voucher.
- On the navigation menu, select Infrastructure, then select Voice calls processing and go to Voice applications.
- On the Create voice application panel, fill in the following fields:
- Click Save. You must create a new IVR application with an access number for each sub-realm of a product.
Configure the IVR application
- On the Translation rules panel set up the required parameters:
- ANI translation rule – specify a translation rule to use for transforming the calling numbers so that a @mega.1.ani sub-realm is added. A corresponding translation rule (e.g., s/$/@mega.1.ani/) will add the realm @mega.1 to the calling number. The ANI authenticated account, as the one initiating the call, is the one that will be charged once the call is completed. There is a helpful tooltip for each option. Just point your mouse to the desired option to bring it up.
- ANI translation rule – specify a translation rule to use for transforming the calling numbers so that a @mega.1.ani sub-realm is added. A corresponding translation rule (e.g., s/$/@mega.1.ani/) will add the realm @mega.1 to the calling number. The ANI authenticated account, as the one initiating the call, is the one that will be charged once the call is completed.
- Click Save.
Modify customer rates
To top up the balance with vouchers via IVR, add rates for the destination UM into the tariffs used for your end users.
- On the Tariff panel, click the Rates.
- On the Add rate panel, insert UM in the Destination field and specify a zero price for it. Leave the other fields as they are.
- Click Save.
Create a product for vouchers
Since a voucher specifies the type of account, both the tariff and the product must be configured before generating it. Moreover, the sub-realm for vouchers is selected within the product.
- On the navigation menu, select Service catalog and click Products.
- On the Create product panel, fill in the product details:
- Name – type an internal product name that will be shown on the administrator interface.
- Name visible to end users – type a name of the product that will be shown to end users on their self-care interfaces.
- Product type – select Main product here.
- Currency – choose a currency the product will be priced in.
- Managed by – select Administrator only here, since we are setting up a service without the involvement of resellers.
- Account default ACL – choose an Access Control List (ACL) for accounts with this product assigned. ACLs control which objects end users can access to and which actions they can perform.
- Account role – select Voucher from the list.
- Realm – select mega.1 from the list.
- Click Save.
Included services
Define which service types are included in the product. A service type is a description of the physical service provided to end users.
To add a service type:
- On your product’s panel, click Services.
- On the Services panel, click Add a service.
- In the Select services to add dialog box, select Voice calls and click Add.
Usage charges
The rating list has two functions: it defines permitted access points (nodes and access numbers) and specifies which tariff should be used for billing in each of these points.
- On your product’s panel, click Charges, then click Usage charges.
- On the Usage charges panel, click Add.
- Fill in the required information:
- Service – select Voice calls.
- Node – select the PortaSIP node.
- Access code – leave this field empty
- Tariff – a tariff is a pseudo-property for a voucher. Hence, select any tariff that was created previously.
- Overdraft protection – to configure overdraft protection for this product, consult the Configure Overdraft Protection Section within the Product section in the Overdraft protection configuration handbook. If you use several access numbers for the IVR application, you must add a rating entry for each of them.
- Click Save.
Create a voucher’s owner
Create a customer to keep all the vouchers organized in one location. This is recommended for generating and efficiently managing vouchers.
- On the navigation menu, select Sales, then select Customers.
- On the Create customer panel, fill in the customer details:
- Name – type a short name for the customer object; this will be used on the web interface.
- Balance control – select Prepaid.
- Currency – choose the currency in which this customer will be billed.
- Available funds – the amount of funds available for the user can be set to zero.
- Business model – a business model defines what type of service is to be provided to the customer. Select Universal for this customer.
- Customer class – select Default customer class.
- Click Save.
Generate vouchers
- On your customer’s panel, click Accounts.
- On the Create an account panel, click Account generator.
- In the Account generation dialog, fill in information about vouchers.
Initial configuration
Link copied to clipboard- Account role – select Voucher from the list.
- Product – select Vouchers for MegaCall from the list.
- Quantity – number of accounts (vouchers) to be generated.
- Batch – accounts are grouped into batches. If Add a new batch is selected, all accounts will be placed into a new batch. Otherwise, an existing batch should be selected from the drop-down list.
- New batch name – type a name for the new batch.
Optional configuration
Link copied to clipboard- Opening balance – the initial balance on the voucher.
- Requires manual activation – it is normal practice to generate all vouchers as inactive so they cannot be misused before being sold to the dealer or end customer.
- ID length – all account IDs (PINs) will be numerical and of the specified length. In order to avoid problems with the prepaid card print-shop, PortaBilling will not generate account numbers with a leading zero. Also, PortaBilling will only allow generation of a batch with feasible parameters, e.g., it is impossible to generate a batch of 1,000 accounts with ID length 4 and ID starting at 55.
- Service password – select Empty in this field.
- Click Generate. Account generation tasks are executed every few minutes, so it may take time to generate large numbers of accounts.