I’ve been building a new repeater for a while and before installing it on the mountaintop upgraded the system to ASL 3. I’ve figured out most of the issues I was having with the permissions change. However, I’ve run into a little snag. The actual repeater in use is a Motorola MTR2000. I had GPIO commands setup so that if certain alarms were generated by the repeater, an AC power failure for example, the digital output would be sensed by ASL and a script file executed. The script would, amongst other things, send out a two-tone page to alert control operators and then play an audio announcement.
However, in ASL3 the commands from the script do not seem to be working as before.
What happens now is I get an unrecognizable basey-type tone that plays for a random amount of time. And then the audio file is not played at all. Certainly not what was intended.
I know the script was okay in the ASL2 software as I copied the file directly from that script. My only change was to address the permissions changes in ASL3.
Does anyone have any thoughts on this???
Tom, KI6GOA
PS, some additional info to add. This is what I get if I try to send the paging command directly from the command line:
sudo /usr/sbin/asterisk -rx “rpt cmd 499342 cop 48 !349.0/1500,!1989.0/3500,”
-bash: !349: event not found
Also, I am looking at the source code to see how the tone info is being parsed and it looks like the frequencies need to be whole numbers (i.e. no decimal points)
It produces a low basey siren. It didn’t seem to stop so I had to kill the asterisk process.
On my system, the !349 [ “rpt cmd 499342 cop 48 !349.0/1500,!1989.0/3500,”] had a very strange effect. It seemed to replace the sequence with a buffered historical command. I incremented/changed the numbers and sure enough, a list of previous commands typed into the terminal appeared. But only if double quotes were used.
pi@ASL3RPi4:~ $ sudo /usr/sbin/asterisk -rx “rpt cmd 47587 cop 48 !366/1000”
sudo /usr/sbin/asterisk -rx “rpt cmd 47587 cop 48 cd ~/1000”
Usage: rpt cmd
Send a command to a node.
i.e. rpt cmd 2000 ilink 3 2001
pi@ASL3RPi4:~ $ sudo /usr/sbin/asterisk -rx “rpt cmd 47587 cop 48 !39/1000”
sudo /usr/sbin/asterisk -rx “rpt cmd 47587 cop 48 cd sounds/1000”
Usage: rpt cmd
Send a command to a node.
i.e. rpt cmd 2000 ilink 3 2001
With single quotes I was able to get a tone played back on the node.
I looked back at the ASL2 sources and the (older) version of Asterisk did accept floating point frequencies. ASL3, that uses the much newer versions of Asterisk, only accepts integer values.
Thanks G0JSV and WA3WCO for the tips. None have been perfectly successful but taking a bit from all here’s what I’ve come up with so far.
If I enter the following in the Asterisk CLI (accessed from the ASL Menu) I get a successful tone set: rpt cmd 499342 cop 48 !399/1000,!339/2000
I can set the same up as a function in rpt.conf. However, when executed from the Linux command line, I have no success, regardless of the type of quotation marks.
For example, if I enter the following at the Linux command line:
sudo /usr/sbin/asterisk -rx ‘rpt cmd 499342 cop 48 !399/1000,!339/2000’
The result is: -bash: !399: event not found
I’ll try to add another reply shortly with a screenshot or two.
Just a thought. If you use !2 instead of !399 I wondered if you then get the same symptoms as I did. The !XXX was retrieving prior commands issued on the command line. So !1 is the last command and !10 was the command issued 10 lines ago. It might line up with the ‘event not found’ message.
As I wrote earlier, look very carefully at your quotation marks. In the text you pasted/entered here you have both “open” (‘) and “close” (’) single-quotes. Both the Linux and Asterisk CLI parsers treat these characters differently.
Q? are you entering these commands to a directly attached keyboard? via an SSH session? via the Cockpit web interface? If you are using SSH then what type of computer/application are you using to enter the commands (Win, Mac, Linux, putty, Terminal, etc)?
This is an annoying bash issue that hits lots of folks. Single quotes are supposed to prevent shell interpretation of special characters, but bash is stubborn about the ‘!’ character.