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
_______________________________________________
App_rpt-users mailing list
App_rpt-users@lists.allstarlink.org
http://lists.allstarlink.org/cgi-bin/mailman/listinfo/app_ rpt-users
To unsubscribe from this list please visit http://lists.allstarlink.org/cgi-bin/mailman/listinfo/app_ and scroll down to the bottom of the page. Enter your email address and press the "Unsubscribe or edit options button"rpt-users
You do not need a password to unsubscribe, you can do it via email confirmation. If you have trouble unsubscribing, please send a message to the list detailing the problem.