Switch
This extension allows the call to be routed based on the variables set in the dialplan. When a call enters this door, variables from an external system can be loaded. Subsequently, the individual conditions are evaluated in order from top to bottom. If neither condition is met, the call is hung up, or directed to extension set as default extension.
Settings
The parameter | Meaning |
---|---|
Lookup | Performs a set query to an external system to obtain variables when entering this extension. |
Variable | The name of the variable to make the decision against. It is entered without the Asterisk denotation $, eg my_variable or CALLERID(num) |
Operator | Condition comparison type is - is/equal is not - is not/is not equal greater than - more than less than - less than starts with - the text begins ends with - the text ends contains - the text contains |
Value to compare | The value to which the variable is to be compared |
Dial extension | The extension number to dial if the condition is met. |
Default extension | The extension number to be dialed if none of the conditions are met. |
Tips
Mergers and Demergers
If the same operation needs to be performed in the dialplan for several doors (e.g. playing a recording announcement), but then it should continue again with separate logic for each extension, then it is possible to set when entering the original extensions variable, from them continue into one playbackup and then use the switch to untangle into multiple extensions.
The parameter | The value |
---|---|
Variable | continue |
Operator | is not |
Value to compare | (empty) |
Dial extension | ${continue} |
Skipping an empty queue
If all agents are logged out of the queue, then in certain cases it is appropriate that the call did not enter the queue at all (e.g. skipping the message playback). This condition evaluates to number of available agents (ready or ACW) in queue ID 123. If the value is 0 (not available no operator), then connects the call to door 987, where there may be an answering machine, for example.
The parameter | The value |
---|---|
Variable | QUEUE_MEMBER(queue123,logged) |
Operator | is |
Value to compare | 0 |
Dial extension | 987 |