General info


By default Sippy Softswitch allows applying only one tariff to an account. This tariff is called as "Default" in the examples below. However, sometimes a question appears how to configure and use different prices and even different routing based on CLI (i.e. ANI based routing) or CLD (prefix based routing). A configuration of these two solutions is shown below. 


How to setup ANI/CLI based routing


Task:

  • if ANI starts with 123, then apply Premium prices and route call to a carrier with Premium quality;
  • if ANI starts with 456, then apply Gold prices and route call to a carrier with Gold quality;
  • in other cases, use default prices and routes.


The setup assumes that you already have an account which has assigned:

  1. Default Tariff (i.e. default service plan) with default prices;
  2. Default Routing Group with default routes.

(if you don't, please refer to the Basic setup checklist)


First of all, you need to open Authentication Rules for the needed account using popup menu:


Next, click Add button and define the options of a new authentication rule as below:


Then, add another authentication rule with different ANI prefix, tariff and routing group (see below):


You can see every authentication rule has its own Tariff and Routing Group (Premium and Gold respectively). The CLI translation rules may be required if you need to remove the prefix from CLI (i.e. do some translations with ANI).


Once it's done, you can check your setup using Test Dial Plan tool. Here are two examples:


If ANI starts with 123:


If ANI starts with 456:


How to setup CLD prefix based routing


Task:

  • if CLD starts with 444, then apply Premium prices and route call to a carrier with Premium quality;
  • if CLD starts with 555, then apply Gold prices and route call to a carrier with Gold quality;
  • in other cases, use default prices and routes.


The setup assumes that you already have an account which has assigned:

  1. Default Tariff (i.e. default service plan) with default prices;
  2. Default Routing Group with default routes.

(if you don't, please refer to the Basic setup checklist)


Next, you need to create authentication rules. Add one authentication rule as below:


Then, add another authentication rule as below:


You can see every authentication rule has its own Tariff and Routing Group (Premium and Gold respectively). The CLD translation rules may be required if you need to remove the prefix from CLD (i.e. do some translations with the dialed number).


Once it's done, you can check your setup using Test Dial Plan tool. Here are two examples:


If CLD starts with 444:


If CLD starts with 555:


How to block calls based on either CLI (ANI) or CLD


Task:

  • if ANI is "Anonymous", then block the call;
  • if CLD has less than 10 digits, then block the call;
  • in other cases, allow calls using default pricing and routing.


The setup assumes that you already have an account which has assigned:

  1. Default Tariff (i.e. default service plan) with default prices;
  2. Default Routing Group with default routes.

(if you don't, please refer to the Basic setup checklist)


First of all, you need to create an authentication rules which will filter all calls that have CLD shorter or longer than 10 digits:


The translation rule is:

s/^(\d{,9}|\d{11,})$/BLOCK/


Next, you need to add an authentication rules that will be matching all Anonymous calls:


Once the rules are added, feel free to check how your setup works. 


He is an example of a call to 11 digits CLD:


Here is an example of a call from Anonymous CLI:



Summary


The examples provided above cover very simple use-cases in order to show the technique of splitting the traffic with prefixes. However, by running a real business you can have more complicated requirements where more than two prefixes are required OR where a verification of CLI/CLD length is needed. In such case you can add as many authentication rules as you need in order to cover all possible steps of use-case.


Useful links

  1. Understanding authentication
  2. Understanding routing
  3. Understanding number translation
  4. Video tutorial: Authentication rules part 1
  5. Video tutorial: Authentication rules part 2
  6. All video tutorials