Call routing

Link copied to clipboard

When an entity on your network (for instance, a gateway or a SIP server) has to establish an outgoing call, it must find out where the call is being sent to. To do this, it can use its internal configuration (for example, dial-peer on the gateway) or some external entity (e.g., gatekeeper), or it may ask billing for a list of possible routes. This last method has several advantages: the routing configuration is in one central location, and billing can use information about termination costs to choose the best route (least-cost routing).

Thus, for SIP calls, PortaSIP obtains the routing information directly from billing.

Control of routing on the Cisco gatekeeper (via GKTMP) or other equipment is not currently supported, but you can develop your own routing interface for PortaBilling, which will communicate with PortaBilling using RADIUS and then transfer this information to the originator in the correct format.

High-level routing overview

Link copied to clipboard

The following happens after the customer making the call has already been identified, the phone number has been translated into E.164, and all the required authorization checks have been performed:

  • If the call is made to one of the access numbers for IVR applications, route the call to the PortaSIP Media server and launch the IVR application.
  • If the call is for one of the phone numbers provisioned in the system (there is an account with an account ID identical to the dialed number), direct the call to the PortaSIP server where the SIP phone is currently registered. Also, provide a list of routes for follow-me numbers or a voice mailbox, so that the call can be redirected there if the SIP phone is not currently available (off-line, not answering, etc.).
  • Otherwise, route the call to one of the gateways for termination, according to the routing rules specified in PortaBilling.

Routing of SIP on-net (SIP-to-SIP) calls

Link copied to clipboard

As the first step in routing calculations, PortaBilling checks if there is an account with an account ID equal to the dialed number (given in E.164). If such an account is found, it is clear that the call is designated for one of the subscribers provisioned on the system. PortaBilling then extracts the latest known location for this account from the location database, in order to determine which PortaSIP server the account is currently registered on, and routes the call there. The SIP server maintains information about all currently registered SIP user agents, so it is able to properly communicate with the SIP user agent handling this number.

Routing of off-net calls

Link copied to clipboard

You can have different vendors for terminating off-net calls. For example, you can terminate calls to the US either to AT&T, via a T1 connected to your gateway in New York, or to a remote gateway from Qwest.

Rate routing parameters

Link copied to clipboard

Ordinarily, tariffs define the termination costs for each connection to a vendor. If you create a tariff with the Routing type, a few more fields will be added to rates in that tariff:

  • Route category – you can split rates into categories such as “Premium,” “Cheap,” etc., and use these categories in routing plans.
  • Preference – routing priority (0–10), higher values mean higher priority, 0 means do not use this rate for routing at all.
  • Huntstop – signals that no routes with a lower route category or preference should be considered.

This allows you to easily manage both termination costs and routing from a single location on the web interface. Thus, when such a routing tariff is associated with a connection, you can send calls for termination to all prefixes for which rates exist in the tariff.

Multiple routes

Link copied to clipboard

It is dangerous to have only one termination partner: if it is down, your customers will not be able to make any calls. Normally, you will try to find several vendors and enter their rates into the system. Each connection to a vendor (with routing tariff) will produce one possible route, and PortaBilling will arrange these according to cost or your other preferences, thus providing fail-over routing.

Least cost routing

Link copied to clipboard

Least cost routing (LCR) is the method for computing routing lists based solely on vendors’ cost. Thus, if you decide not to use any routing preferences (all vendors have the same preference), when a user makes a call, the LCR routing list will have the routes ordered by price from lowest to highest.

Compare the two illustrations below. The first one shows simple least-cost routing: all of the available carriers are arranged according to cost. In the second illustration, PortaSwitch routing preferences are used, so that the administrator can re-arrange the routing. In this case, carrier D has been moved down the routing list, while carrier A has been moved up to the top of the list, thus becoming the first route.

Simple least-cost routing simulationRouting simulation using routing preferences

Routing plans

Link copied to clipboard

Routing preferences in the rate allow you to specify that, for example, you would rather send a call to MCI than to T-Systems. However, this decision is “global”, and so will apply to all calls made in your system. But what if you would like to use MCI first for customer A, while T-Systems should be the first route for customer B, and customer C should be routed to MCI only?

This can be accomplished using routing plans. A routing plan is a combination of route categories in a specific order. It defines which categories of vendors are available for termination as well as in which order they should be arranged (route categories with a higher order value are tried first). For instance, in the example above MCI may be assigned as the “Normal” route category and T-Systems as the “Premium” category. After that, three routing plans will be created:

  • Quality – Includes first “Premium” and then “Normal” route categories.
  • Ordinary – Includes first “Normal” and then “Premium” route categories.
  • Cost-efficient – Includes only “Normal” route category.

Thus, the system will offer a different set of routes depending on which routing plan is assigned to the account making a phone call. One routing plan, called All Available Routes, is always in the system, and is assigned to the account unless otherwise specified. This routing plan uses all available routes, regardless of their route category.

Route sorting

Link copied to clipboard

How exactly does PortaBilling arrange multiple available routes?

  1. By route category. Only route categories which are included in the routing plan will be used, following the order given in the routing plan.
  2. If you have multiple route categories within the routing plan, you can either merge them into the same group by assigning them the same order value, or keep each one separate, with its own order value. Then routes within the same order group of route categories will be arranged according to preference.
  3. For routes with the same preference, the system can arrange them according to cost (a comparison is made on the Price_Next rate parameter) so that cheaper routes will be among the first ones, or in random fashion.

Routing configuration example

Link copied to clipboard

Routing scheme

Consider the following example. If you have:

  • A “Standard” routing plan, which includes three route categories: “Default” (order 70), “Cheap” (order 40) and “Expensive” (order 10).
  • Six vendors (A, B, C, D, E, F) with the following rates:
    Vendor Prefix Route category Preference Price
    A 8610 Cheap 7 0.04
    B 86 Default 5 0.06
    C 86 Cheap 6 0.03
    D 86 Cheap 6 0.025
    E 86 Expensive 5 0.11
    F 8610 Premium 5 0.09

then, when a customer with this routing plan makes a call to 8610234567, the system will arrange the possible routes as follows:

  • Vendor Parameters Comment
    B Default, 5, 0.06 The “Default” route category is first in the routing plan.
    A Cheap, 7, 0.04 This vendor has the highest preference in the “Cheap” category.
    D Cheap, 6, 0.025 This vendor has the same preference as vendor C, but a cheaper per-minute rate.
    C Cheap, 6, 0.03
    E Expensive, 5, 0.11 This is the only vendor in the last route category.

    (Vendor F was not included in the routing, since his route category is not in the customer’s routing plan).

Routing plans with profit guarantee

Link copied to clipboard

PortaBilling supports a “profit-guarantee” mode for routing. If this mode is activated in a routing plan, all routes where the price per minute which your vendors apply to you is higher than that which you apply to your customers will be removed from the route list by the billing engine during real-time route calculation. Or, to put it in simpler terms, a route will not be selected if it is more expensive than what you charge your customers.

Routing plan selection

Link copied to clipboard

There are two possibilities for choosing which routing plan is used to find available vendors and terminate a call:

  • Each account is assigned an individual routing plan. When the end user simply dials a number in the normal way, this routing plan will be used.
  • If the end user wants to choose a specific routing plan for a particular call, he dials a routing plan selection code before the number. For example, if he wants to use the “Premium” routing plan to call US phone number 12065551234, he would dial 2312065551234, where 23 is the selection code defined as a property of the “Premium” routing plan.

Selection codes

Link copied to clipboard

The selection code is a property of a routing plan, and so obviously each routing plan has its own unique selection code. If you want to have a routing plan which cannot be specifically selected by an end user, simply leave the selection code field empty.

Selection code in the Routing plan

Dialing rules

Link copied to clipboard

By including a routing plan in the rating table definition of the product, you can allow every account that uses this assigned product to use this routing plan.

To allow a specific customer to select this routing plan for a call, enable it in the customer’s dialing rules. If the routing plan selection is disabled, calls will be routed using the account’s default routing plan.