Rate this page:

Routing rules

Routing rules are necessary to execute a scenario when a call arrives or when the StartScenarios method is called.

Without a routing rule you cannot execute a scenario.

How to create a rule

Copy URL

In your application, switch to the Routing tab of the application and either click Create in the center of the screen or New rule in the upper right corner:

Create a rule

This opens a New rule editor, where you can specify a rune name and properties, and attach scenarios:

New rule editor
  • The Pattern parameter is relevant for inbound calls only. It checks the incoming call's destination (the dialed number or username specified in the e.destination property of the incoming call), and if the destination meets the regular expression specified in this parameter, the rule executes. The default .* pattern means that the rule executes your scenario for any call.
    +?[1-9]\d{1,14} pattern matches any phone number,
    123.+ matches 1234, 12356, etc., and so on.

Note

If the incoming phone number meets several rules' patterns, only the first rule executes.

  • The Video conference parameter is necessary if you want to enable video conference functionality for the attached scenarios.

  • The Available scenarios dropdown list allows you to attach one or more scenarios to the rule.

Multiple scenarios

You can attach multiple scenarios to one rule. In this case, VoxEngine executes all the attached scenarios one by one in one context, allowing code reuse.

After you specify all the parameters, click Create and your rule is ready to trigger.

Route a call between applications

Copy URL

You can route a call between different Voximplant applications via the callSIP method.