Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

For the quick configuration, you can import the scheme from the file  внутренние звонки-schemainternal calls-scheme.json

Code Block
languagejs
firstline1
titleCallflow
linenumberstrue
collapsetrue
[
    {
        "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": ""
    }
]

...

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.

Code Block
languagejs
firstline1
titleCallflow
linenumberstrue
collapsetrue
[
    {
        "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": ""
    }
]

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

...

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. 

Info
titleВажно!

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

...