[Freeswitch-users] output script as variable

thomas peterseil thomas.peterseil at mine-project.eu
Wed Sep 9 18:38:19 UTC 2020


dear freeswitch-users,
i have a very simple bash script and i would like to use the output of
this script as a variable in the dialplan, but it doesn´t work. can
somebody give me a hint why it doesn´t work. here is the script:

hello.sh
---------
#!/bin/bash
echo "red.wav"
----

here is the relevant part of my dialplan:
----
<extension name="inbound_uri_test">
    <condition field="destination_number" expression="^test$">
      <action application="answer"/>
        <action application="set" data="col=${system /root/hello.sh}"/>
        <action application="log" data="INFO The value of the variable
is '${col}'"/>
        <action application="playback" data="/root/audio/${col}"/>
    </condition>
  </extension>
------

i followed the documentation from this page:
https://freeswitch.org/confluence/display/FREESWITCH/mod_dptools%3A+system

thank you very much!
best regards,
thomas



More information about the FreeSWITCH-users mailing list