Creating US inter/intra-state rates

Link copied to clipboard

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.

Enable separate US inter/intra-state rates on the Configuration server

Link copied to clipboard
  1. Clone the existing configuration.
  2. From the Configuration Tree choose BillingEngine.
  3. In the Groups section select the ZoneRating group.
  4. Select Yes under the US_Enabled option.
    Upon activation of separate rates for inter/intra-state calls on the Configuration server (the US_Enabled option is set to Yes), it is required to re-upload all tariffs containing US destinations. Otherwise, intra-state calls would be charged at 0 price.

    Enable the Inter / Intra state rates

  5. Click the Save button and then the check_apply Verify button.
  6. Verify the new configuration and click the check_apply Check/Apply button.

Create US inter/intra-state rates

Link copied to clipboard

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.

Note, the following taxation plugins are supported in PortaBilling to calculate customers’ taxes for the inter/intra-state calls:

  • Avalara;
  • EZtax (former BillSoft);
  • SureTax.

To specify inter/intra-state rates, do the following:

  1. On the navigation menu on the left, select Service catalog and click Tariffs.
  2. Open the tariff and click Rates.
  3. On the Add rate panel, fill in the rate details:
    • 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.
    • Rating mode – select the Separate inter/intra-state rate option to enter different rates for the intra- and inter-state calls.
    • First interval/Next interval – specify the billing unit in seconds.
    • Intra-state rate/Inter-state rate – specify separate prices for intra-state and inter-state calls in the corresponding fields.

      Specify inter / intra state rates

  4. Click Save.
  5. Repeat these steps if you need to enter more rates.

Please consult the Rate upload/download section for 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 mysql and Oracle databases for testing purposes. To do this, perform the following operations:

  1. Login in to your PortaBilling web server using ssh.
  2. Execute the following commands:
    • For mysql database:
      cd /home/porta-db/billing/schema/
      unxz --stdout npanxx.sql.xz | mysql -u root porta-billing
    • For Oracle database:
      cd /home/porta-db/billing/schema/
      unxz --stdout $NPANXX_XZ| sqlplus <login>/<password>@PMASTER

Wait until the database is being imported. It may take up to several minutes.

On this page

What's new
Admin manuals
UI help
Back to main menu