Hi;
This has less to do with PHP but, has to do with the System command, so, if I put this into the wrong topic, i apologize.
I am trying to run a command from context, that, runs as is (as seen from the CLI) but, does not actually execute when invoked.
I added this to a custom context in extensions_custom.conf
exten => s,n(send),System(/bin/echo -e '@CALL${CALLERID(name)}~${CALLERID(num)}'| /bin/nc -w 1 172.20100.8 10629)
basically, I want to dump the callerId through NC (netcat) to another host.
When the call is placed,the context is invoked, i see this in my CLI
-- Executing [s@custom-callerID:9] System("Local/7890@from-internal-c1ff;2", "/bin/echo -e '@CALL410~410'| /bin/nc -w 1 172.20100.8 10629") in new stack
-- Auto fallthrough, channel 'Local/7890@from-internal-c1ff;2' status is 'UNKNOWN'
I suspect that auto fallthrough line is indicating that my command could not be run.
From the linux shell, i can successfully run the command
I wrote a TCP listener on the target machine that will dump the results of the request to the screen. So, when asterisk attempts to run the command, i see nothing, but, when i run the same command from the shell, i see the result (the contents of the quotes).
I ran chmod +x on my nc file, just in case this was a permissions issue.
Any help would be greatly appreciated.
Thank you