Two Tone Paging in ASL3

Hi Everyone,

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.

sudo -u asterisk /usr/sbin/asterisk -rx “rpt cmd 499342 cop 48 !0.0/500,”
sudo -u asterisk /usr/sbin/asterisk -rx “rpt cmd 499342 cop 48 !349.0/1500,!1989.0/3500,”

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

Does it work when enclosed in single quotes?

sudo /usr/sbin/asterisk -rx ‘rpt cmd 499342 cop 48 !349.0/1500,!1989.0/3500,’

Then try with the sudo -u asterisk option.

You may hit a permission error with -u asterisk.

Look very carefully at your quotation marks. At least in the text you entered here you have both “open” (“) and “close” (”) quotes.

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)

Nope, single quotations don’t make any difference. Still get the bash error.

I just tried the command with both regular (from the Linux CLI) single and double quotation marks. No joy.

The way I built the original script, which did work as written in ASL2, was based on the instructions found here: Transmitting Tone Sequences - AllStarLink Wiki

I did try removing the decimal points and their following zeros. I also tried the same will removing the exclamation point. But again, no joy.

I had the same behaviour as you first described with this command. (Node number reverted)

sudo /usr/sbin/asterisk -rx “rpt cmd 499342 cop 48 (1,2)”

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.

sudo /usr/sbin/asterisk -rx ‘rpt cmd 499342 cop 48 !600/100’

The following plays back a 3 note sequence. (Node number reverted to yours)

sudo /usr/sbin/asterisk -rx ‘rpt cmd 499342 cop 48 !500/300,!1000/200,!1500/300’

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.

I have updated the Wiki page :slight_smile:

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.

This works:

This does NOT work. Look at the output.

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.

Try this test with both double and single quotes. In the example below, I used !3 and !4.

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)?

I even got the torch out following your first post to locate the ` and ’ on the keyboard but it hasn’t made a difference in this case.

Entered on my laptop via SSH through puTTY. I’ll try it from my Linux laptop later this evening.

You need to escape the ‘!’ character.

sudo /usr/sbin/asterisk -rx ‘rpt cmd 499342 cop 48 \!399/1000, \!339/2000’

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.

1 Like