In order for a user to call through the Youmagic gateway, open Callflow - Default in Webitel WebClient. Default is the outgoing route, users and devices enter it after registering with the Webitel server. Let's create a simple ACR Scheme that will allow us to call landline numbers through our gateway.
In the Number field, create a regular expression that will be designed to dial a number with +, without +, with 8 or 7 at the beginning and the number of characters from 10 to 12:
Что бы пользователь мог позвонить через Youmagic шлюз, в Webitel WebClient открываем Callflow - Default. Default - это исходящий маршрут, в него попадают пользователи и устройства после регистрации на сервере Webitel. Создадим простую ACR Scheme, которая позволит звонить на городские номера через наш шлюз.
В поле Number создадим регулярное выражение, которое будет рассчитано на набор номера с +, без +, с 8 либо 7 в начале и количеством знаков от 10 до 12:
^\+?(7|8)(\d{10,12})$
Теперь сама схемаNow the scheme itself:
Code Block | ||
---|---|---|
| ||
[ { "ringback": { "call": { "name": "$${ru-ring}", "type": "tone" }, "transfer": { "name": "$${ru-ring}", "type": "tone" } } }, { "recordSession": { "action": "start", "type": "mp3", "stereo": "false" } }, { "bridge": { "endpoints": [ { "type": "sipGateway", "name": "74997045627", "dialString": "+7®0.$2" } ] } } ] |
Основные моменты схемы:
Highlights of the scheme:
- enable conversation recording.
- in dialString add + to the dialed number. $ 2 is the second match in the regular expression -
- включить запись разговора.
- в dialString добавляем + к набранному номеру. $2 - это второе совпадение в регулярном выражение - (\ d {10,12}).