[App_rpt-users] Command to execute external script?
Bryan D. Boyle
bdboyle at bdboyle.com
Thu Jan 18 01:27:50 UTC 2018
On 1/17/2018 6:41 PM, David Shaw wrote:
> Hello Everyone, Does anyone know how to use DTMF tones to run a
> command, to execute external script?
>
1. write the bash script or program (you can execute programs too; I
suggest creating a subdirectory in the /etc/asterisk directory...doug
calls it 'local', I usually call it 'scripts'), debug it, make sure to
'chmod 755 scriptname'.
2. Edit /etc/asterisk/rpt.conf.
3. Go to the [functionsxxxx] stanza for the node you're working with.
Of, if you have just one function stanza, go there.
4. Insert a line, for instance:
85=cmd,/fully/qualified/path/to/script
5. save rpt.conf, restart asterisk.
Now, when you key up the node, and use *85, that script will run.
It should be noted that functions are decoded using the least number of
digits. So, if you have:
8=cmd,somescript
81=cmd,somescript
811=cmd,somescript
which script gets executed is left as an exercise.
Really very simple and flexible.
BB
wb0yle/w2fuv
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.keekles.org/pipermail/app_rpt-users/attachments/20180117/06fdab20/attachment.html>
More information about the App_rpt-users
mailing list