Hello,
I have a few questions regarding running Freeswitch on Windows and some general questions.
Lets say I have the following Dialplan condition: <condition field="destination_number" expression="^([12]{1})([0-9]{1}[0-9]{1})([01]{1})(\d+)$" require-nested="true" break="never">
The idea is to assign a value conditionally based on the first three regex groups.
I tried the below, but for some reason it doesn’t work.
<condition field="destination_number" expression="^([12]{1})([0-9]{1}[0-9]{1})([01]{1})(\d+)$" require-nested="true" break="never">
<condition field="$1" expression="1">
<action application="set" data="x_direction=inbound" />
<anti-action application="set" data="x_direction=outbound" />
</condition>
<condition field="$2" expression="\d+">
<action application="set" data="x_trunkid=${x_direction}+$2+_gws" />
</condition>
<condition field="$3" expression="1">
<action application="set" data="origination_privacy=hide_name+hide_number+screen"/>
<action application="privacy" data="yes"/>
</condition>
…Some more actions…
</condition>
Regards,
|
Grant Bagdasarian |
|
Senior Developer |
|
|