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:

^\+?(7|8)(\d{10,12})$

Now the scheme itself:

[
	{
		"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&reg0.$2"
				}
			]
		}
	}
]

Highlights of the scheme:

  • enable conversation recording.
  • in dialString add + to the dialed number. $ 2 is the second match in the regular expression - (\ d {10,12}).

  • No labels