Routing Setup
Routing scheme for internal calls
In the Admin interface of Webitel, you need to set up a routing scheme in the Flow section. To make calls between users inside the system, you should configure the following routing scheme. The routing scheme setup: Flow schemas
For the quick configuration, you can import the scheme from the file internal calls-scheme.json
Callflow
[
{
"set": {
"hangup_after_bridge": "true"
}
},
{
"preAnswer": ""
},
{
"ringReady": ""
},
{
"recordSession": {
"action": "start",
"bridged": true,
"followTransfer": true,
"minSec": 2,
"stereo": true,
"type": "mp3"
}
},
{
"ringback": {
"all": true,
"call": {
"name": "%(1000,6000,425);loops=-1",
"type": "tone"
},
"hold": {
"name": "%(1000,6000,425);loops=-1"
},
"transfer": {
"name": "%(1000,6000,425);loops=-1"
}
}
},
{
"bridge": {
"endpoints": [
{
"extension": "${destination_number}",
"parameters": {
"leg_timeout": 90
},
"type": "user"
}
],
"parameters": {
"call_timeout": 90
}
}
},
{
"hangup": ""
}
]
An outbound routing rule for internal calls
After configuring the routing scheme, you need to set up the outbound routing rules. For this purpose, you have to create a new rule Dialplan in the outbound routing section.
A regular expression ^(\d{3,4})$
is written in the destination number field.
It means that the internal number plan contains any 3- and 4-digit numbers, for example, 100, 101, 1002, 9999.
The routing scheme for echo test
For a quick setup, you can import the scheme from the file echo test-schema.json
Callflow
[
{
"preAnswer": ""
},
{
"ringReady": ""
},
{
"answer": ""
},
{
"echo": ""
}
]
An outbound routing rule for the echo test
For the echo test, you also need to set a rule for 0 number.
The routing scheme for the conference
Additionally, you can configure the routing scheme for the conference.
For a quick setup, you can import the scheme from the file conference-schema.json
Callflow
[
{
"answer": ""
},
{
"conference": {
"name": "$1",
"profile": "video-mcu-stereo"
}
},
{
"hangup": ""
}
]
An outbound routing rule for conference
For the conference, you also need to set a rule for the 00 number.
The outbound routing scheme
The routing scheme for making outbound calls. In code, you need to specify the gateway number through which the outbound calls will be passing.
Callflow
An outbound routing rule
For the outbound routing, you also need to set a rule. You have to write the regular expression ^(.*)$
in the destination number field.
Важно!
The sequence is important in the routing rules configuration because during the outbound call the number is checked according to each rule from top to bottom.
Inbound routing scheme with the routing to a specific agent
An example of the inbound call routing scheme through a gateway to an agent whose internal number (extension) is 200. This routing scheme must be specified in the gateway settings (Connecting a Communication Provider).
Callflow
Inbound routing scheme with the routing to 3 agents in series
An example of the inbound call routing scheme through a gateway sequentially to 3 agents whose internal numbers (extension) are 200, 201, 202. This routing scheme must be specified in the gateway settings (Connecting a Communication Provider).
Callflow
The routing scheme for an inbound call into a queue
After configuring a queue in the routing scheme, you need to specify the queue identifier where the incoming call will be addressed.
You can find the queue identifier in the browser address bar by opening the queue settings page.
An example of a routing scheme to the inbound queue which system identifier is 78.
Callflow