1.5.2 Examples of the strings modifications
Removing leading zeros from dialed number
Assumptions:
- Dialed number: 0044285476159
- The number to be sent to the Dialing Plan: 44285476159
Configuration:
In the client account panel click on the Advanced tab, then put into the Routing rules the following expression:
00->
This will cause removing the initial "00"
If the tariff comprises the prefixes without any zeros in front, which is often the case, you should also strip the 00 from the dialed number that goes to the billing process. To do so copy the modification expression 00-> to the Tariff rules field.
Similarly, if the dialed number starts with + you can strip it with the following expression:
+->
If you want to apply both expressions, use the OR operator:
00-> OR +->
Adding prefix to the dialed number
Assumption:
- Dialed number: 44285476159
- Desired number to be sent to the destination endpoint: 7723644285476159
Configuration:
In this case the modifications should be added either in the Routing/Routing plan or in the Routing/Destinatons in the gateway configuration.
If you choose to modify the dialed number via the Routing plan, go to the Advanced tab in the routing entry matching the dialed number and in the Dialed number manipulation section, Dialing rules field enter the expression DN:77236 or click the extended menu button and enter 77236 in the Dialed number field.
If you choose to modify the dialed number in the gateway's settings, the 77236 should be added in the Advanced tab, Dialed number manipulation section, Dialing rules field.
These settings will change the dialed number by adding the prefix before it is forwarded to the destination gateway. It is often required by the termination carriers for billing or authentication purposes.
If there is a cost tariff associated with the gateway, the dialed number can also be modified before the call is getting rated. This can be done by adding the TP: command in the Tariff rules field. The syntax is exactly the same as for the routing process except that instead of DN: the TP: is used. For example TP:123 will add 123 before the dialed number.
Replacing prefix with desired characters
Assumptions:
- Dialed number: 0044285476159
- Desired number to be sent to the Dialing Plan: $$44285476159
- Desired number to be matched with client's tariff prefixes: 44285476159
Configuration:
This scenario is a compilation of both scenarios described above. The initial "00" has to be removed from the dialed number and replaced with "$$". This can be done by placing the entry 00->$$ in the Routing rules in the client's settings.
To send the proper number to the tariff the entry 00-> has to be placed in the Tariff rules.
Setting different termination gateway for different clients
Let's assume all calls from the client B should be routed through destination called Termination1 and all calls from client A, to the same country, through Termination2. For this purpose in the Routing rules field of the client A the prefix $ has to be added. The same field for the B will remain empty.
Next in the Routing plan an entry with the prefix $ has to be added pointing the Termination1 gateway. The other Routing plan entries should have prefixes starting with just the country codes. When a call from A arrives to the switch the $ is added when looking for a matching entry in the Routing plan. The best match is the entry with the prefix $ pointing to the destination Termination1.
It is important that before sending a dialed number to the destination gateway the special prefix $ should be removed. This can be done using Routing rules in the Routing plan’s entry. Add there $-> .
Redirect all calls from client to Voipbox scenario
When working with the calling cards services the calls coming from a DID have to be sent to a PIN scenario on VoipBox. To be sure that any other number will not be sent from the DID carrier to Voipswitch and by mistake connected through Voipswitch, a special Routing plan’s entry should be created. The entry will be pointing to the PIN scenario dedicated for the calling card service. Next, in the provider’s wholesale client account set the Routing rules so that to every number sent from that provider a special prefix will be added matching the newly created routing entry. This will ensure that no matter what number is sent from the DID provider, it will always be connected to the VoipBox scenario.