Cmd in rpt.conf to run a script

I cannot seem to get a cmd to run a script from the rpt.conf.

I have a script in the folder /etc/asterisk/local called hello.sh
The script works fine if I run it from the command line. However, I would like to attach it to a dtmf command.
I have tried multiple numbers in the functions stanza but none of them work.
eg.

819 = cmd,/etc/asterisk/local/hello

using *819 as a dtmf yields nothing at all.
Has anyone managed to get a dtmf code attached to a script file in ASL3?

Make sure your file is owned and executable by the asterisk user.

EDIT: - ok still permissions down the line - managed to get it working.

ok - have checked the permissions.
script is called saytime.sh in this case.
ls -l shows the following permissions.
-rwxr-xr-x 1 root asterisk 97 Oct 21 16:46 saytime.sh

Running the script at the command line works every time.
rpt.conf has the following line under the functions stanza
819 = cmd,/etc/asterisk/local/saytime

I still get nothing when I run *819 dtmf on the node.

If your file is saytime.sh on disk, then the file needs to be saytime.sh in rpt.conf. The “no file extension” thing is limited to sound files so Asterisk can pick the best format from a set of options.

Perfect. Thanks. All working now.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.