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

edbathgate at zoominternet.net edbathgate at zoominternet.net
Wed Oct 24 11:44:45 UTC 2018



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 


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.keekles.org/pipermail/app_rpt-users/attachments/20181024/54112ec4/attachment.html>


More information about the App_rpt-users mailing list