July 2017
Intermediate to advanced
434 pages
12h 59m
English
To route incoming calls that come in to a certain DID via the context public to a fixed extension in the context inhouse, do something like the following:
<context name="public">
<extension name="test_did">
<condition field="destination_number"
expression="^\d{6}(\d{4})$">
<action application="transfer" data="$1 XML inhouse"/>
</condition>
</extension>
</context>
This will capture only the last four digits of a ten-digit number and transfer the caller to that number via the inhouse context. Note the parentheses around \d{4} that allow us to capture only the last four digits.
Read now
Unlock full access