Folks, trying to get newsline setup for a friend’s node. I have a script that when executed from command prompt runs fine. I need to run it from a DTMF command. Trying *999. I set in rpt.conf:
999=cmd,/etc/asterisk/newsline
newsline is my bash script (runs fine from: /etc/asterisk/newsline)
From searching here this looks like it should work, based on some advice from B WB0YLE.
but
It doesn’t work. I get (when running 999 from CLI) repeaterCLI> rpt cmd 2360 fun 999 Usage: rpt cmd
Send a command to a node.*
i.e. rpt cmd 2000 ilink 3 2001*
repeaterCLI>*
Maybe I have stared at this for too long but I just can’t find any documentation about executing a command from within asterisk
Anybody able to point me toward documentation?
Thanks
GeorgeC W2DB 2360 28599
On Unix files are files the extension is not used in determining file type. So newsline and newsline.sh are both valid file names for a shell script. The shell script should have the magic incantation #!/path/to/interpreter at the top (first text in the file) and needs to be set as executable. Check the permissions on your script, if the eXicute bit is not set it won’t run.
Eric
Af6ep
Sent using SMTP.
···
On May 19, 2020, at 9:42 AM, Jon Welfringer via AllStarLink Discussion Groups [email protected] wrote:
Folks, trying to get newsline setup for a friend’s node. I have a script that when executed from command prompt runs fine. I need to run it from a DTMF command. Trying *999. I set in rpt.conf:
999=cmd,/etc/asterisk/newsline
newsline is my bash script (runs fine from: /etc/asterisk/newsline)
From searching here this looks like it should work, based on some advice from B WB0YLE.
but
It doesn’t work. I get (when running 999 from CLI) repeaterCLI> rpt cmd 2360 fun 999 Usage: rpt cmd
Send a command to a node.*
i.e. rpt cmd 2000 ilink 3 2001*
repeaterCLI>*
Maybe I have stared at this for too long but I just can’t find any documentation about executing a command from within asterisk
Anybody able to point me toward documentation?
Thanks
GeorgeC W2DB 2360 28599