[App_rpt-users] How to 'flip' RF nodes via DTMF
K&R Yoksh
yokshs at gmail.com
Fri Jul 13 05:16:52 UTC 2012
Here's a feature I haven't heard anything about yet..
Do you have multiple RF nodes connected to Asterisk, and ever wanted to
'flip' them? For example, you have a VHF and UHF node, and occasionally
would like to put the VHF traffic on UHF and vice-versa?
I've actually wanted to have this capability before, and it occurred to me
tonight how to easily achieve this. Here are the DTMF commands for rpt.conf:
950=cmd,/home/kyle/astflip 0 ; unflip nodes - normal
951=cmd,/home/kyle/astflip 1 ; flipVHF and UHF nodes
What needs to happen to completely 'flip' two nodes is incredibly simple,
the more I thought about it.
Here's a normal node stanza:
[2211]
rxchannel=SimpleUSB/usb2211
and here's a 'flipped' node stanza:
[2211]
rxchannel=SimpleUSB/usb2212
All I had to do was to automate the process! There are two copies of
rpt.conf. One is the normal setup, and the other has the rxchannels flipped
as above.
Here is my script:
#!/bin/bash
#
# Script to flip Allstar Nodes, by K0KN 7/2012
#
# Usage = astflip [1] [0] 0=normal 1=flipped
#
ASTERISK=/etc/asterisk
NORMAL=/etc/asterisk/rpt.normal
FLIPPED=/etc/asterisk/rpt.flipped
if [ "$1" == "" ] ; then
echo "Missing Argument(s)" ; exit
fi
# Flip configs
if [ $1 == 1 ] ; then
cp "$FLIPPED" "$ASTERISK/rpt.conf"
fi
if [ $1 == 0 ] ; then
cp "$NORMAL" "$ASTERISK/rpt.conf"
fi
# Restart Asterisk
asterisk -rx "restart now"
# done
exit 0
fi
More information about the App_rpt-users
mailing list