Freeswitch on Windows
Grant Bagdasarian
gb at cm.nl
Wed Aug 8 06:41:59 UTC 2018
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<tel:+31765727054>
cm.com<https://cm.com>
[cid:image001.png at 01D42EF3.BB2546E0]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20180808/88d79e9c/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 4987 bytes
Desc: image001.png
URL: <http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20180808/88d79e9c/attachment.png>
More information about the FreeSWITCH-users
mailing list