Quantcast
Channel: FreePBX Community Forums - Latest posts
Viewing all articles
Browse latest Browse all 227338

Running shell script from within the DialPlan

$
0
0

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.


Viewing all articles
Browse latest Browse all 227338

Trending Articles