<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <div class="moz-cite-prefix">On 1/17/2018 6:41 PM, David Shaw wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:CAH4RvbKFyuUzZoQkc-0NLhuP7YVQUzE_X_XEYsFYbQ3sVxAqfw@mail.gmail.com">
      <div dir="ltr">Hello Everyone, Does anyone know how to use DTMF
        tones to run a command, to execute external script?<br
          clear="all">
        <div>
          <div class="gmail_signature">
            <div dir="ltr">
              <div>
                <div dir="ltr">
                  <div>
                    <div dir="ltr">
                      <div dir="ltr">
                        <div dir="ltr">
                          <div dir="ltr">
                            <div dir="ltr">
                              <div dir="ltr">
                                <div dir="ltr">
                                  <div><br>
                                  </div>
                                </div>
                              </div>
                            </div>
                          </div>
                        </div>
                      </div>
                    </div>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
    </blockquote>
    <br>
    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'.<br>
    2. Edit /etc/asterisk/rpt.conf.<br>
    3. Go to the [functionsxxxx] stanza for the node you're working
    with.  Of, if you have just one function stanza, go there.<br>
    4. Insert a line, for instance:<br>
    85=cmd,/fully/qualified/path/to/script<br>
    5. save rpt.conf, restart asterisk.<br>
    <br>
    Now, when you key up the node, and use *85,  that script will run.<br>
    <br>
    It should be noted that functions are decoded using the least number
    of digits.  So, if you have:<br>
    8=cmd,somescript<br>
    81=cmd,somescript<br>
    811=cmd,somescript<br>
    <br>
    which script gets executed is left as an exercise.  <br>
    <br>
    Really very simple and flexible.  <br>
    <br>
    BB<br>
    wb0yle/w2fuv<br>
    <br>
    <br>
  </body>
</html>