July 2017
Intermediate to advanced
434 pages
12h 59m
English
In this example, we need to match a called number beginning with the prefix 1 and match the incoming IP address at the same time.
<extension name="Test2">
<condition field="network_addr"
expression="^192\.168\.1\.1$"/>
<condition field="destination_number" expression="^1(\d+)$">
<action application="bridge"
data="sofia/profilename/$0@192.168.2.2"/>
</condition>
</extension>
Here, although we match with the rule ^1(\d+)$, we don't use the variable $1, which would contain only the rest of the dialed number with the leading 1 stripped off. Instead, we use the variable $0 that contains the original destination number.
Read now
Unlock full access