[arm-allstar] Scripts Update
Doug Crompton
wa3dsp at gmail.com
Mon Jul 9 17:11:45 EST 2018
Two new scripts have been added to hamvoip allstar. These allow voice
responses for checking registration and DNS node lookups. These voice
responses will be particularly useful when using DTMF in mobile or portable
operations where no screen feedback is available. This would also be
immensely useful to our sight impaired Allstar users.
To get these scripts update your server using item 1 in the ADMIN menu.
sayreg.sh <play-node> - returns your registration state. If you are
registered at multiple sites or you have multiple nodes on a server
registered it will give the status information of all registrations.
saydns.sh <queried-node> <play-node> - this returns the IP address and
port of a node from the database or "Number not found in our database" if
the node is not in the database.
Both scripts will output to the first defined node - $NODE1 - unless given
the node number (play-node) to play the voice information.
While these scripts could be called directly from the command line you
would typically use a function statement in rpt.conf to allow them to be
called by a DTMF code. Note that because you have to enter a node number
the saydns.sh script requires using a special call in rpt.conf and a
context added to extensions.conf. Here are the examples on how to add
functions for these scripts -
In the functions stanza in /etc/asterisk/rpt.conf -
(find the A1 to B6 functions, Add A5 and A7 as shown below A3)
A5=cmd,/usr/local/sbin/sayreg.sh
A7=autopatchup,context=saydns,noct=1,farenddisconnect=1,dialtime=15000,quiet=1
In /etc/asterisk/extensions.conf before the last line in the file
(#includeifexists custom/extensions.conf) add -
[saydns]
exten => _xxx.,1,System(/usr/local/sbin/saydns.sh ${EXTEN})
exten => _xxx.,n,Hangup()
It is best to cut and paste these lines for accuracy. You must restart
Allstar - astres.sh for this to take effect.
Afterwards the DTMF commands are -
*A5 - will say your registration status
*A7xxxxx - will say the IP and port of the node. the xxxxx can be any 4 or
5 digit Allstar node number entered in DTMF consecutively after the *A7
You do not have to use these function codes. You could substitute others if
you desire as long as they are unique. Typically the 83 to 89 range is
available.
*73 Doug*
*WA3DSP*
*http://www.crompton.com/hamradio <http://www.crompton.com/hamradio>*
More information about the arm-allstar
mailing list