Hello,

 

I have a few questions regarding running Freeswitch on Windows and some general questions.

  1. How do I get mod_python installed as a module on Freeswitch?
  2. Does V8 need to be installed on the Windows machine before Javascript scripts can be executed?

 

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.

  1. When I log the variables after the last condition, they’re empty. Why?
  2. How does variable concatenation work in Dialplan XML?
  3. Is there a better way to conditionally assign values to variables and use them in later step in the Dialplan XML? Doing this with Python or Javascript would be easy, but mod_python is not installed, and V8 doesn’t execute the script.

 

<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

+31765727054

cm.com