Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 5 Next »

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 внутренние звонки-schema.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 00 number.

The outbound routing scheme

The routing scheme for making outbound calls. В коде нужно указать название шлюза, через который будут проходить исходящие звонки.

Callflow
[
    {
        "ringReady": ""
    },
    {
        "preAnswer": ""
    },

    {
        "ringback": {
            "call": {
                "name": "%(1000,6000,425);loops=-1",
                "type": "tone"
            },
            "hold": {
                "name": "%(1000,6000,425);loops=-1",
                "type": "tone"
            },
            "transfer": {
                "name": "%(1000,6000,425);loops=-1",
                "type": "tone"
            }
        }
    },
    {
        "recordSession": {
            "action": "start",
            "bridged": true,
            "minSec": 2,
            "stereo": true,
            "type": "mp3"
        }
    },
  
    {
        "bridge": {
            "codecs": [
                "PCMA",
                "PCMU"
            ],
            "endpoints": [
                {
                    "dialString": "$1",
                    "name": "НАЗВАНИЕ ШЛЮЗА",
                    "parameters": {
                 
                    },
                    "type": "gateway"
                }
            ]
        }
    },
    {
        "hangup": ""
    }
]

Правило исходящей маршрутизации

Для исходящей маршрутизации нужно также настроить правило. В поле номера назначение прописывается регулярное выражение ^(.*)$

Важно!

В настройке правил маршрутизации важна последовательность, так как при исходящем звонке номер проверяется по каждому правилу сверху вниз. 

Схема входящей маршрутизации с маршрутизацией на конкретного оператора

Пример схемы маршрутизации входящего звонка через шлюз на оператора, внутренний номер которого (extention) 200. Данная схема маршрутизации должна быть указана в настройке шлюза (Подключение провайдера связи).

Callflow
[
    {
        "recordSession": {
            "action": "start",
            "bridged": false,
            "followTransfer": true,
            "minSec": 2,
            "stereo": true,
            "type": "mp3"
        }
    },
    {
        "bridge": {
            "endpoints": [
                {
                    "extension": "200",
                    "type": "user"
                }
            ]
        }
    },
    {
        "hangup": ""
    }
]

Схема входящей маршрутизации с маршрутизацией на трех операторов последовательно

Пример схемы маршрутизации входящего звонка через шлюз последовательно на трех операторов, внутренние номера которых (extension) 200, 201, 202. Данная схема маршрутизации должна быть указана в настройке шлюза (Подключение провайдера связи).

Callflow
[
    {
        "recordSession": {
            "action": "start",
            "bridged": false,
            "followTransfer": true,
            "minSec": 2,
            "stereo": true,
            "type": "mp3"
        }
    },
    {
        "bridge": {
            "endpoints": [
                
                {
                    "extension": "200",
                    "parameters": {
                        "call_timeout": "20"
                    },
                    "type": "user"
                },
                {
                    "extension": "201",
                    "parameters": {
                        "call_timeout": "20"
                    },
                    "type": "user"
                },
                {
                    "extension": "202",
                    "parameters": {
                        "call_timeout": "20"
                    },
                    "type": "user"
                }
                                
            ]
        }
    },
        
    {
        "hangup": ""
    }
]

Схема входящей маршрутизации звонка в очередь

После настройки очереди в схеме маршрутизации необходимо указать идентификатор очереди, в какую нужно маршрутизировать входящий звонок.

Идентификатор очереди можно узнать из адресной строки браузера, открыв страницу настройки очереди.

Пример схемы маршрутизации во входящую очередь, идентификатор в системе которой 78. 

Callflow
[
    {
        "answer": ""
    },
    {
        "recordSession": {
            "action": "start",
            "bridged": true,
            "followTransfer": "true",
            "minSec": 2,
            "stereo": true,
            "type": "mp3"
        }
    },
    {
        "joinQueue": {
            "priority": 100,
            "queue": {
                "id": 78
            }
        }
    },
    {
        "hangup": ""
    }
]


  • No labels

0 Comments

You are not logged in. Any changes you make will be marked as anonymous. You may want to Log In if you already have an account.