[arm-allstar] scheduler/COP was A Script to Change Courtesy tones

Doug Crompton doug at crompton.com
Tue Mar 22 22:11:04 EST 2016






Kevin,

Here is a repeat of a message I sent to the list several months ago regarding changing of courtesy tones which shows the procedure you describe. This could be extended to change other parameters. We agree that there are many things that should be more like a commercial repeater controller and we have that on our list of things to do. For now this somewhat convoluted but workable method will have to be used.

---------------------------------------------------------------------------------------------------------------



OK, here is a reasonable way to do it that seems to work well. There is a little setup but it should not take too long. Follow these steps -

Put the attached script in /etc/asterisk/local

Make it executable

chmod 750 change_telemetry.sh

Backup your rpt.conf file

Make a new directory if it does not already exist in /etc/asterisk called custom

Edit the primary rpt.conf file and copy (cut and paste or whatever) the telemetry section in entirety.

Save the telemetry section you copied out of rpt.conf to /etc/asterisk/custom/telemetry.conf

Also copy it to /etc/asterisk/custom/telemetry1    and   telemetry2 

This assumes you will have two telemetry changes. If you will have more copy to more telemetry files telemetry3, telemetry4, etc.

Go back to the rpt.conf file and either delete or comment (your choice) ALL lines in the telemetry section you just copied out. When you are done there should be no active telemetry section in rpt.conf

Go to the end of the rpt.conf file and change the last line to this -

#includeifexists custom/telemetry.conf

Go to the /etc/asterisk/custom directory and edit the files for the different telemetry settings you want. telemetry.conf and telemetry1 should not be edited - they will be the stock files. Edit telemetry2, 3, 4 etc. however many different tone groups you want to define. You can have as many as you want, just give them consecutive numbers and remember them by number.

Once the files are saved run the change_telemetry program. It is set at start to only accept  two files - telemetry1 and 2 - change the MAX_FILE parameter in the script to the number of definitions you have (telemetryx files in the custom directory.) 

You can run the script manually to see how it works. It does not effect Allstar operation. You can change at any time.

change_telemetry x        - where x equals the file number

Once this is all working you can call the script either directly from a function, via the autopatch, cron, etc.

function section example....

811=cmd,/etc/asterisk/local/change_telemetry 1
812=cmd,/etc/asterisk/local/change_telemetry 2
813=cmd,/etc/asterisk/local/change_telemetry 3
etc.

then DTMF 

*811  - default telemetry
*812  - Telemetry values 2
etc.

What this does.

 The telemetry section is removed from rpt.conf. rpt.conf is then setup to call telemetry.conf in the /etc/asterisk/custom directory. The change_telemetry.sh then copies different definition files to telemetry files to telemetry.conf based on a number. It then reloads rpt.conf and sends an audible message to the user.

Things to remember - 

if you run setup again the rpt.conf file will be overwritten. You will have to delete the telemetry section and add the last line again.

Always leave at least one file - preferably telemetry1 - as the default stock values.

The mapping in rpt.conf should not need to be changed. For instance if unlinkct=ct2  and you wanted to change it you would change the ct2 definition in the telemetry section in one of the files.

The change_telemetry script announces the change locally on the primary node given in the environment variable NODE1. If you want it to speak on a different node you need to change the node in the voice lines in the change_telemetry script.

I hope this helps or at least gives you ideas of how to do it. Let me know how it works for you and if you have any questions I would be glad to answer them.

73 Doug
WA3DSP
http://www.crompton.com/hamradio



 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.hamvoip.org/pipermail/arm-allstar/attachments/20160322/5831e2d6/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: change_telemetry.sh
Type: application/x-sh
Size: 668 bytes
Desc: not available
URL: <http://lists.hamvoip.org/pipermail/arm-allstar/attachments/20160322/5831e2d6/attachment.sh>


More information about the arm-allstar mailing list