[Freeswitch-users] Run Bash script in Dialplan

Abel Monzon abelcubano at gmail.com
Fri Nov 15 22:36:18 UTC 2019


I am trying to run a bash script when dialplan is generate.

I have tested this bash script in CLI and is working as expected, but when
is called from dialplan I don't see any error and looks like the bash was
never runned.

api = freeswitch.API();
rotation = api:executeString("system sh
/opt/ASTPP/freeswitch/scripts/rotation.sh"); --> this rotate between 2x
gateway name and save the name to a file, but looks like never run.
gateway = api:executeString("system sh
/opt/ASTPP/freeswitch/scripts/random2.sh"); ---> this script read the name
of the gateway from the file, and works perfect.

table.insert(xml, [[<action application="bridge"

Here is the result on console:

EXECUTE sofia/default/14254358039 at

I don't any way to troubleshoot why 1x script run perfectly and the other
one is not running.

Thank You in advance.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20191115/f3f8b714/attachment-0001.html>

More information about the FreeSWITCH-users mailing list