Editing Custom Decode

The extremely powerful and easily customized custom_decode script allows the IRLP owner to modify the way the DTMF decoder reacts.

IRLP - Keeping the Radio in Amateur Radio

File Location:   /home/irlp/custom/custom_decode
Purpose of Script: Allows the operator to control the action of ANY DTMF sequence passed through the node.
Special Requirements: none
Submitted by David Cameron, VE7LTD (April 27, 2001)
    updated September 2004

The custom_decode script is located in /home/irlp/custom directory. It can be edited by user root or user repeater.   The custom_decode script allows the IRLP owner to modify the way the DTMF decoder works.

The script is called before the automatic determination of each DTMF string is interpreted. In other words, entries in the custom_decode script are compared FIRST, and therefore allows the operator to control the action of ANY DTMF sequence passed through the node.

Below is a sample custom_decode script, which shows a few additions that can be made.  NOTE: Reference to AUX1 thru AUX3 are only available to Version 3 board owners.

--- START SAMPLE SCRIPT ---

#!/bin/bash

# This is the custom decode file. Make sure all valid codes exit with "exit 1".
#This line disables the node with code " ABC1#3 " (note P=# S=*)
if [ "$1" = "ABC1P3" ] ; then "$SCRIPT"/disable ; exit 1 ; fi

#This line enables the node with code " ABC2#*" (note P=# S=*)
if [ "$1" = "ABC2PS" ] ; then "$SCRIPT"/enable ; exit 1 ; fi

#This line adds the DTMF sequence "73" to drop ANY active link
if [ "$1" = "73" ] ; then "$SCRIPT"/end ; exit 1 ; fi

# This line takes the code 12345 and "dumps it".
if [ "$1" = "12345" ] ; then exit 1 ; fi

# This line takes the code 23456 and causes it to become a new reflector 2 on code
if [ "$1" = "23456" ] ; then "$SCRIPT"/connect_to_reflector ref920 ; exit 1 ; fi

# The following code is a sample of turning ON and OFF AUX1 contacts
# NOTE: AUX1 - AUX3 are only present on V3 boards
if [ "$1" = "123" ] ; then "$BIN"/aux1on ; exit 1 ; fi
if [ "$1" = "321" ] ; then "$BIN"/aux1off ; exit 1 ; fi

#123 turns on the AUX1 N/O contact and 321 turns it off.

#This line is required so that the rest of the decoding will still take place


exit 0

--- END SAMPLE SCRIPT ---


Dave Cameron VE7LTD

 

Enjoy IRLP and please "Pass the Word"
If left menu bar is not visible, click here
   

last updated February 14, 2007
? 2005 IRLP.NET
Privacy Policy

               
Print this Page