Problem with EAGI bash script

when i run the shell script from the terminal it runs perfectly: I can visit the node server @ localhost:3333. Seems like nothing happens when the eagi app executes it.

I’ve tried…
chown asterisk:asterisk all files inside agi-bin along with chmod 777.
setting agi debugging on from asterisk cli and it shows no errors

so why isnt the node server starting?


[test-eagi] exten => s,1,Answer exten => s,n,EAGI(

[code]#start a node server (listen on port 3333)
node server.js;

#get audio stream from STDERR+1, pipe to converter
cat /dev/fd/3 | some-converter;[/code]