In this section, you need to create rules and templates for distributing outgoing calls for providers connected to the PBX.
You can create an unlimited number of outbound routing rules.
You can create several rules for one provider.
Additional examples of configuring outgoing routing are available in the FAQ section.
To add a new outgoing routing rule, click the Add a new rule button.
The name of the rule can be set arbitrarily.
In a note, you can describe the call route that you want to implement; this can help you in debugging in the future.
Set a template for outgoing calls. Read more about number templates in the next paragraph.
The example in the picture above means the following: if the dialed number starts with "345" or "375" and the rest of the number consists of 10 digits.
If the dialed number matches the rules of several routes, then the call will be made in the order of the route descriptions, one by one, until the call is answered, or until there are no more suitable routes.
Convert number - this setting is intended to remove the number prefix and replace it with the desired prefix.
Set a template for outgoing calls. Read more about number templates in the next paragraph.
In the example given, digits are not cut off at the beginning of the number and digits are not added.
Select from the list the provider for which you configured outgoing routing and save the changes.
For example, the number +74952293042 should be converted to the number 84952293042.
The implementation of the rule looks like this:
For example, the numbers 84952293042 and 74952293042 should be converted to +74952293042.
The implementation of the rule looks like this:
For example, the numbers 4952293042 and 4996382584 should be converted to 84952293042 and 84996382584 respectively.
The implementation of the rule looks like this:
For example, the numbers 84952293042 and 74996382584 should be converted to 2293042 and 6382584 respectively.
The implementation of the rule looks like this:
The number starts with | The rest of the number consists of the specified number of digits | Examples of numbers |
---|---|---|
[7-8]{1}
10
79257184255, 84952293042
7925
leave the field blank
79257184255, 7925, 7925718…
7ХХ
0
700, 701, 702…
74952293042
0
74952293042
74(95|99)
7
74952293042, 74996382584…
(7|8)0{1}
1
700, 701, 802, 803…
(25|26)
0
25, 26
[0-9]{1}
0
digit from 0 to 9, occurrence once
[1-5]{2}
0
12, 15, 14, 25 digit from 1 to 5, occurrence twice
[8-9]+
0
8899, 888, 988888 digit from 8 to 9, occurrence one or more times
In this section, you need to create rules and templates for distributing incoming calls for providers created in MikoPBX. The rules for incoming calls describe the route of a call from the moment it arrives at the PBX to the moment it is completed. You can create an unlimited number of inbound routing rules. You can create several rules for one provider.
Additional examples of configuring incoming routing are available in the FAQ section.
Rules are listed in order of priority. If no one answers the incoming call within the time interval specified in the rule, the call will be routed to the next priority rule. Rules can be moved up and down in the list, that is, their priority can be changed by dragging them by the arrows.
If the call is not answered according to any of the rules, the Default incoming route is used.
The following actions are available and can be specified as the default rule:
Play busy signal - the client will play a busy signal and the incoming call will be ended;
Hang up;
Redirect the call - the call can be transferred to a number that you can select in the field located to the right of the action. You can select an IVR menu, call queue, conference, or employee extension number as the number for transfer.
For one provider, you can describe several incoming routes.
First, the call goes along the upper route. If the client does not get through, then the call goes according to the lower rule (lower priority). If the client does not get through via the second route, then the call goes through the default route.
To add a new incoming routing rule, click the Add a new rule button.
In the Note field, describe the route you want to implement. In the future, this will help you debug the call circuit.
Select the Provider for which you are creating a new incoming call distribution template.
The additional DID number is the number the client called you on. This field is optional and should be completed if you need to route calls more accurately.
At the next step, you need to indicate to which phone number the incoming call from the client will be sent. The telephone number can be IVR menu numbers, call queues, conferences, or employee internal numbers.
Specify the time during which the call will be sent to the phone number you specified.
If after the specified time interval no one answers the incoming call, the call will be routed to the next priority rule.
To make or receive external phone calls over the public switched telephone network or the Internet, you must create at least one provider account. Each technology has its own account type. To add a new account or modify an existing one, go to Routing -> Telephony Providers.
The provider overview contains a list of all available service providers. A green icon next to the provider's name indicates that MikoPBX has registered this provider, and you can start using this provider. You can enable or disable the use of the provider using the switch on the left.
To connect a new provider account, click Connect SIP or Connect IAX depending on the type of account you are connecting.
Instructions for connecting to the most popular service providers can be found in our FAQ.
In the general settings of the SIP provider, specify the following settings:
Provider Name - an arbitrary name that is convenient for you. It will be displayed in the selection lists in the corresponding menus.
Account Type - the type of registration for the provider account.
Provider host URL or IP Address - can be either a URL or an IP address.
Username and Password provided by your provider.
DTMF Mode - determines how DTMF signals are transmitted over SIP. There are different standards used to transmit DTMF to SIP providers. Try using different standards to find the mode that suits you.
inband sends keypresses as "tones." To use this standard, you need a high-quality audio codec.
Auto, rfc, and info transmit keypresses through SIP encoding.
In this section, list all communication service provider addresses from which incoming calls can arrive. Access to these addresses for SIP and RTP ports will be automatically opened on the firewall.
By default, it is set to 5060. The SIP protocol describes how a client application (e.g., a softphone) can request the initiation of a connection from another, possibly physically remote client in the same network using its unique name. The protocol defines how clients agree on opening exchange channels based on other protocols that can be used for direct information transmission (e.g., RTP).
Allows you to specify the transport protocol used for this provider account.
This is the provider's SIP proxy server for processing requests. The actual SIP server may differ from this address. The outbound proxy takes on primary requests and forwards them to the appropriate server.
When this option is enabled, Asterisk will send SIP OPTIONS packets. This is necessary to support NAT tunneling on your router.
Specify the frequency with which Asterisk will send OPTIONS-type SIP messages to check if this device is working and available for making calls.
If this device does not respond within the specified period (default is 60 seconds), Asterisk considers it turned off and unavailable for making calls.
You can disable the use of the fromuser field of the SIP packet header.
The fromuser and fromdomain parameters in the pjsip.conf file are used for outgoing calls from Asterisk to the SIP device.
You can override:
the username in the From field in SIP packets (fromuser).
the domain name in the From field in SIP packets (fromdomain).
The fields User and Domain serve this purpose.
In this field, you can modify Asterisk configuration files.
You can override almost all parameters. For example, when using chan_pjsip, the provider is described with the following sections:
To override fields in sections, fill in the Additional Parameters field as follows:
To complete the configuration, click Save Settings.
There are cases when you need to connect multiple accounts from one communication service provider. In this case, the settings Host or IP Address and SIP Connection Port may be the same for all accounts.
Asterisk handles this situation differently. The PBX will not be able to correctly route the call to the desired provider, and the call will be dropped.
As a solution, in older versions of the PBX, you could describe additional inbound routes for which you would fill in the Additional Number (DID) field with the Username value for each account of the provider. This required creating N number of additional routes, equal to the number of provider accounts.
An alternative is the Registering multiple accounts from one provider instruction. This approach was not very intuitive.
The Username field, in most cases, will be used as the destination number Additional Number (DID) for incoming calls. Considering that outgoing routes for all Usernames will be configured, the call will be correctly processed by the PBX.
This option is used when connecting most providers.
Registration is necessary when the provider cannot know from which IP address the client will connect. For example, when the PBX is behind NAT. The provider's server is usually on a public IP address.
This option is relevant for the operation of some FXO / GSM gateways when an external device must connect to your PBX using a login and password.
This option is also relevant when the remote device is behind NAT, and MikoPBX cannot know its IP address.
Relevant for secure private networks. For example, Rostelecom often lays its network cable and connects the client to its local network.
In this case, the PBX and the provider must be in the same network.
In this section, rules for operating the station during non-working hours, holidays, and weekends are described. During non-working days, typically no employees are available to answer calls, so a voice notification is played to the caller requesting them to call back during regular business hours.
To add a new rule, click on the "Add Time Interval" button.
A form for creating a new rule will open.
In the form, you will find the following fields:
Period: The calendar period when employees are absent from the office, such as during New Year's or May holidays.
Weekdays: Specific weekdays for which the rule will be applied.
Time Range: The time period during the day when employees are absent.
Incoming Call Action: You can choose to play a sound file or perform a call transfer. Call transfer options include transferring the call to a conference, IVR menu, queue, internal employee extension, or specific termination numbers.
In the Note field, you can add a note with a description of the created rule, so that you can quickly navigate through the essence of this rule using this description. With the eraser button, you can clear the fields opposite which this button is located.
By activating this function, a new menu "Route restrictions" will appear on top of you
Here you can choose which specific routes the rule you are creating will apply to.
This rule is used for calls during non-working hours from Monday to Friday, specifically from 7:00 PM to 9:00 AM
This rule is used to handle calls on Saturdays and Sundays.