Calls to numbers:
383 XXXXXXXXXX
380 XXXXXXXXXX
375 XXXXXXXXXX
371 XXXXXXXXXX
Go to Routing → Outbound Routing
Create a new outbound routing rule:
Fill in the parameters according to the template below:
Now, when calling any numbers that meet the patterns: 383 XXXXXXXXX, 380 XXXXXXXXX, 375 XXXXXXXXX, 371 XXXXXXXXX, the call will be routed through the provider (Novofon).
It is necessary to replace the number prefixes 345, 347 with +345. Example, the numbers 3454952293042 and 3474952293042 should be converted to +3454952293042.
Go to "Routing" → "Outbound Routing"
Click "Add a new rule"
Create a template as shown in the image:
Click "Save settings"
Go to the “System” section -> “System file customization”
Select the file “/etc/asterisk/extensions.conf” to edit.
Select the “Add to end of file” mode.
Add the code to the second field:
Save settings.
It is necessary to replace the number prefixes +345 with 347. For example, the number +3454952293042 should be converted to the number 3474952293042.
Go to "Routing" → "Outbound Routing"
Click "Add a new rule"
Create a template as shown in the image:
Click "Save settings"
Go to the System file customization section
Open modules.conf for editing
Add the following code to the end of the file:
Open the extensions.conf file for editing
Add the following code to the end of the file:
In the lines of the form "Set(PUSH(rrItem)=SIP-1601534775)", the ids of providers are listed, among which outgoing ones should be evenly distributed. The ID can be copied in the browser's address bar when editing the provider. The "busyLevel" variable defines the maximum allowed number of simultaneous calls through the provider.
For each provider, you will need to describe the outgoing route. The template in the routes must be the same.
Now it's done