Hi,
The script is running, but you have permissions problems on the device itself to my opinion. Write a dial plan and integrate it with the sudoers file like that:
[from-internal-custom]
exten => 111,1,Answer()
same => n,TrySystem(/usr/local/bin/tdtool --on 1)
same => n,NoOp(Status of TrySystem is: ${SYSTEMSTATUS})
same => n,Hangup
After adding this to your extensions_custom.conf file please reload the Asterisk dial plan (asterisk -rx'dialplan reload').
Do not forget to add these lines to the end of the sudoers file (visudo):
#Allow asterisk user to run tdtool command
Cmnd_Alias TDTOOL = /usr/local/bin/tdtool
asterisk ALL = NOPASSWD: TDTOOL
Thank you,
Daniel Friedman
Trixton LTD.