July 2017
Intermediate to advanced
434 pages
12h 59m
English
In this example we need to match a called number beginning with 00, but we also need to strip the leading digits. Assuming that FreeSWITCH receives the number 00123456789 and we need to strip the leading 00 digits, then we can use the following extension:
<extension name="Test3.1">
<condition field="destination_number"
expression="^00(\d+)$">
<action application="bridge"
data="sofia/profilename/$1@192.168.2.2"/>
</condition>
</extension>
On the other hand, if you anticipate receiving non-digits, or you want to match on more than just digits, use .+ instead of \d+, because \d+ matches numeric digits only, whereas a .+ will match all characters from the current position to the end of the string:
<extension ...
Read now
Unlock full access