Billing for US Inter / Intra State Calls
PortaBilling® offers a simple solution for identifying and billing for US Inter / Intra State VoIP traffic. In order to properly apply LCR and calculate call costs in accordance to rates applied by vendors, PortaBilling® determines whether the caller resides in the same state as the called party and then applies the correct rate.
1. Clone the existing configuration.
2. From the Configuration Tree choose BillingEngine.
3. In the Groups section select the FeatureModules group.
4. Select Yes under the IntraZonePriceLevel, DomainRating and ChargingZones options.
5. Click the Save button and then the Verify button.
6. Verify the new configuration and click the Check / Apply button.
When a user from the United States dials a US phone number, PortaBilling® first checks if both the number calling and the called number start with a “1.” If so, then PortaBilling® searches for both destinations in the database. If these destinations are in the same state, PortaBilling® applies charges according to the intra-state rate; if the destinations are in the different states, the inter-state rates are applied.
In order for PortaBilling® to make correct call routing decisions and call cost calculations based on both the number calling and the called number, enable this functionality by clicking the Enable US Intra-State icon.
To specify inter / intra state rates, perform the following steps:
1. On the Tariff Management page you will see a list of available tariffs. Click the Rates icon in front of the name of the tariff.
2. On the Edit Rates screen, click Add.
3. Fill in the required information:
· Destination – A destination prefix may be entered directly or you can access the destinations directory by clicking the Destination link (in the column header). Here you will find the desired prefix by country name.
· Click the Set Inter / Intra State button to enter different rates for the intra- and inter-state calls.
· Interval – Specify the billing unit in seconds. If you want to define different intervals, click and specify the First and Next intervals.
· Price – Specify the per-minute price for this destination. Once the Inter / Intra State option is set, you may specify separate prices for intra-state and inter-state calls in the corresponding fields. If you have defined the First and Next intervals, click and specify the per-minute prices for those intervals.
4. Click the Save button in the toolbar or the Add icon at the left side of the row.
5. Repeat these steps if you need to enter more rates.
Please consult thefor information about uploading US Inter / Intra state rates via the Rate Upload Wizard.
Note that for correct functionality of this feature you need to manage the NPA NXX Area Code data in the PortaBilling® database. To keep this data full and up-to-date you can purchase the NPA NXX database from one of NPA NXX database providers, convert it to an appropriate format and import it into the PortaBilling® database. The data should be imported in the following format: i_env, destination, domain in the Voice_Phone_Number_Domains table, where i_env can be zero to become available for all billing environments.
You can find an example of a NPA NXX Area Code data format in /home/porta-db/billing/schema/npanxx.sql.xz
We provide the default set of NPA NXX Area Codes that can be manually imported into the PortaBilling® database for testing purposes. To do this, perform the following operations:
1. Login into your PortaBilling® web server using ssh.
2. Execute the following commands:
unxz --stdout npanxx.sql.xz | mysql -u root porta-billing
Wait until the database is being imported. It may take up to several minutes.