[App_rpt-users] dtmf to script not working for me.

Nate Hardman nhardman1428 at gmail.com
Wed Oct 24 23:37:11 UTC 2018


check the file and group permissions of the script and make sure Asterisk
has the OS permissions to run and modify the file.

$ ls -l filename.sh-rwxr-xr--  1 owner  group

quick try sudo chmod 777 <filename>  on each file and see if it works
for asterisk CLI


On Wed, Oct 24, 2018 at 7:44 AM <edbathgate at zoominternet.net> wrote:

> Issuses with running bash scripts from within allstar by DTMF. Host is X86
> type,  I'm logged in as root, file permissions set to 777 for both ab.sh
> and asd.dat. it works from linux cli, partially works from asterisk cli,
> !/path/script, and does not work from within rpt.conf.
> 713=cmd,/path/script.   Running asterisk version 0.327 installed about a
> month ago from iso file.   So story begins...
>
>
> This simple script prints 1234, prints the time/date and appends the time
> and date onto file asd.dat.
>
> /etc/asterisk$ cat script: ab.sh
>
> #!/bin/bash
> echo 1234
> date
> date >> asd.dat
>
>
> Script runs as it should from the command line of a linux console window
> /etc/asterisk$ ./ab.sh
> 1234
> Mon Oct 22 22:05:22 EDT 2018
> * Note the time ^^^
>
>
> Now to check the file and find 05:22:  cat asd.dat
>
> Mon Oct 22 22:05:05 EDT 2018
> Mon Oct 22 22:05:22 EDT 2018  <yay it worked
>
>
> But from within Asterisk CLI it only works 1/2 way:
> *CLI> !/etc/asterisk/ab.sh
> 1234
> Mon Oct 22 22:11:44 EDT 2018
> * Note the time ^^^ 6 minutes later, It printed within the asterisk CLI,
> but did not append to the file.
>
> cat asd.dat
> Mon Oct 22 22:05:05 EDT 2018
> Mon Oct 22 22:05:22 EDT 2018 < still the old time in the file. not 11:44,
> so run from asterisk CLI does not let script update the file??
>
> And even worse when I try to do this via the rpt.conf file:
>
>
> <snip> of rpt.conf
> 713 = !/etc/asterisk/ab.sh
> 714 = cmd,/etc/asterisk/ab.sh
> 715 = cmd,/etc/asterisk/nothere.sh
>
>
> command 713 does nothing, wrong syntax for rpt.conf but tried as a test
> anyway.,  714 tries to do something, but does not work., 715 should fail or
> report error as there is no file by that name but behaves same as 714.
> n3sdorpt2*CLI> rpt fun 29019 *713
> n3sdorpt2*CLI> rpt fun 29019 *714
> [Oct 22 23:32:28] NOTICE[20572]: app_rpt.c:4084 function_cmd: cmd param =
> /etc/asterisk/ab.sh, digitbuf =
> n3sdorpt2*CLI> rpt fun 29019 *715
> [Oct 22 23:33:55] NOTICE[20572]: app_rpt.c:4084 function_cmd: cmd param =
> /etc/asterisk/nothere.sh, digitbuf =
>
>
> I am doing something wrong or have things set wrong in the OS, or is this
> function been disabled?
>
> Please advise.  N3SDO
>
>
> _______________________________________________
> 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.
>


-- 

Nathan Hardman
nhardman1428 at gmail.com
N8THN at ARRL.NET
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.keekles.org/pipermail/app_rpt-users/attachments/20181024/c30e6bb9/attachment.html>


More information about the App_rpt-users mailing list