This page describes how to set pricing of calls to different destinations, and using multiple SIP termination providers.

In a previous example we discussed a simple scenario with one peer and all calls charged at the same rate. In reality, you will probably want to charge calls to different destinations at different rates, and may want to have multiple peers such as primary and secondary services.

Configuring outbound groups

An outbound group is a set of external numbers that are billed at the same rate. For example, if calls to UK land lines are all billed at the same rate, then "UK land lines" could be an outbound group. Groups can have multiple time chunks, which allows calls to the group to be billed at different rates at different times of the day and days of the week.

You will need to create a spreadsheet with a list of outbound groups. This can be complicated if you need to combine pricing from multiple termination providers to produce one list of destinations which are each billed at the same rate.

Creating the outbound groups is much easier if you use pricing from one provider and simply load that into a spreadsheet and edit it into the format required. Each row in the spreadsheet will be a destination which will later have a price set. Note that outbound groups don't specify the price to use, or which peer to use for the destination - that comes later.

  1. Using the top-right selection box ensure you're working as your system level user, not a sub-customer.
  2. To get the format required for the outbound groups spreadsheet click on Global » Routing » Outbound groups, leave "Name contains" empty and click "Search". Scroll to the bottom and click on "Export as .csv".
  3. Create your spreadsheet now and save it in .csv format. Ensure that it is comma separated and uses quotes.
  4. Click on Global » Routing » Outbound groups, leave "Name contains" empty and click on "Search". Scroll to the bottom and click on "Import".
  5. Select your .csv file to import.
  6. If you haven't set up any important outbound groups before then clear out the system by setting "Delete all existing outbound groups first" to "Yes".
  7. Leave "Overwrite existing outbound groups" as "No".
  8. Click on "Import".

Configuring peers

A peer is a service used to reach the PSTN, for example a SIP termination provider. Peers also set the system level (which can be marked up for customers) cost of outbound calls by having a price for each outbound group.

You will need to create a spreadsheet with a list of outbound call costs. If you've used the rows in your provider's list of prices as the rows in your outbound groups then it should be easy to use the same information to create the spreadsheet of costs.

This example assumes you have signed up for service with a primary and a secondary SIP termination provider. If you only have one SIP termination provider you can skip the steps which refer to the secondary.

  1. If you haven't already, create a peer but don't continue to the peer costs.
  2. Create another peer called "Secondary SIP termination provider" using the same steps.
  3. To get the format required for the outbound call costs spreadsheet click on Global » Routing » Peers, select the primary peer, scroll to the bottom, click on "Outbound call costs", and click on "Export as .csv".
  4. Create your spreadsheet now and save it in .csv format. Ensure that it is comma separated and uses quotes.
  5. Click on Global » Routing » Peers, select the primary peer, scroll down to the bottom, click on "Outbound call costs", and then on "Import".
  6. Select your .csv file to import.
  7. If you haven't set up any important outbound call costs before then clear out the system by setting "Delete existing costs first" to "Yes".
  8. Leave "Overwrite existing costs" as "No".
  9. In the "Apply costs to other peers" field select the "Secondary SIP termination provider" peer and then click "Add selected".
  10. Click on "Import".

Configuring routes

A route has a number prefix so that any outbound call to a number starting with that prefix will be sent to the peer specified in the route, and charged at the rate of the outbound group specified in the route.

You will need to create a spreadsheet with a list of routes. If you've used the rows in your provider's list of prices as the rows in your outbound groups then it should be easy to use the same information to create the spreadsheet of routes. You can just copy the outbound group names and add columns to specify the primary and secondary peers.

  1. To get the format required for the routes spreadsheet click on Global » Routing » Routes, leave "Called prefix starts with" empty and click "Search". Scroll to the bottom and click on "Export as .csv".
  2. Create your spreadsheet now and save it in .csv format. Ensure that it is comma separated and uses quotes.
  3. Click on Global » Routing » Routes, leave "Called prefix starts with" empty and click on "Search". Scroll to the bottom and click on "Import".
  4. Select your .csv file to import.
  5. If you haven't set up any important routes before then clear out the system by setting "Delete all existing routes and rate plan routing exceptions first" to "Yes".
  6. Leave "Overwrite existing routes" as "No".
  7. Click on "Import".

Testing your configuration

Your system should now be configured to route calls to the desired peer and charge at the specified rate. For more details on how outbound groups, outbound call costs, and routes come together click here.

  1. Make a call from one of your registered telephones to a PSTN number that you own. It should be sent to the "Primary SIP termination provider" peer by the route with the longest matching prefix and the destination phone should ring.
  2. If the call to the PSTN number does not work have a look at taking traces. Taking a trace using Billing and analysis » Analysis » Traces will give you a detailed record of what exactly happened with the call.
  3. Click on Global » Routing » Peers, select the primary peer, set "Fail a percentage of the time" to "100", and click "Save". Then make a call from your telephone to a PSTN number and the call should be sent to the secondary peer. Afterwards, set the percentage fail for the primary peer back to 0.
  4. Click on Calls and messages » Calls » Call history to view the calls made and what was charged.
  5. Scroll down to the bottom of the call history and click on "Export as .csv". Open the .csv file and review the information included. If the call history export was run at the system level then it will include information on which peer and outbound group were used.