<div dir="ltr">Hello.<div><br></div><div><br></div><div>I am trying to run a bash script when dialplan is generate.</div><div><br></div><div>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.</div><div><br></div><div><br></div><div>api = freeswitch.API();<br>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.</div><div>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.<br></div><div><br></div><div>table.insert(xml, [[<action application="bridge" data="[]]..chan_var..[[]sofia/gateway/]]..<b>gateway</b>..[[/]]..destination_number..[["/>]]);</div><div><br></div><div><br></div><div><br></div><div><br></div><div>Here is the result on console:</div><div><br></div><div><br></div><div>EXECUTE sofia/default/<a href="mailto:14254358039@198.50.167.93">14254358039@198.50.167.93</a> bridge([leg_timeout=0,absolute_codec_string=^^:PCMA:PCMU:G729]sofia/gateway/GATEWAY-01/38227043)<br></div><div><br></div><div><br></div><div><br></div><div>I don't any way to troubleshoot why 1x script run perfectly and the other one is not running.</div><div><br></div><div><br></div><div>Thank You in advance.</div><div>Abel</div></div>