[App_rpt-users] Command to execute external script?

David Shaw shawpbx at gmail.com
Thu Jan 18 18:01:44 UTC 2018


Thanks to everyone for the help. All the inputs work great.

David



--
Thanks, David

"Laws that forbid the carrying of arms...disarm only those who are neither
inclined nor determined to commit crimes. Such laws make things worse for
the assaulted and better for the assailants; they serve rather to encourage
than prevent homicides, for an unarmed man may be attacked with greater
confidence than an armed one."
Thomas Jefferson

On Wed, Jan 17, 2018 at 5:27 PM, Bryan D. Boyle <bdboyle at bdboyle.com> wrote:

> 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 at 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_rpt-users and scroll down to the bottom of
> the page. Enter your email address and press the "Unsubscribe or edit
> options button"
> 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.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.keekles.org/pipermail/app_rpt-users/attachments/20180118/10b9ae72/attachment.html>


More information about the App_rpt-users mailing list