Creating a DIALPLAN for Tuning DVSwitch

; After fudging a AP command in rpt.conf ; 97 = autopatchup,context=dvs-set,dialtime=90000,farenddisconnect=1,noct,quiet=1

; Use Format: (AP command prefix) + (dvs mode 1-5) + (dvs tg) ; Requires that you set dvs mode each time with the leading digit 1-5. ; So, a command here of *97 1 3100 would set dmr 3100 ; 2xxxx tunes dstar adhoc number only ; 2*1 tunes dstar REFxxx ; 2*2 tunes dstar DCSxxx ; 2*3 tunes dstar XLSxxx ; 2*4 tunes dstar XRFxxx ; 2*5 tunes dstar mem # or ## from file

; ** disconnects any mode

; The dialplan in extensions.conf

[dvs-set] ; this context needs to be unique in the system and match dialing context

exten = _1.,1,Wait,1 ; DMR exten = _1.,2,NoOp() ; room for you to insert a command without renumbering anything exten = _1.,3,SayAlpha(dmr,${EXTEN:1}) ; speak dmr tg before execution exten = _1.,4,Wait,4 ; wait with time to […]

Passing DTMF to Shell Scripts

Setting Up rpt.conf


So, somewhere in our dialplan, we need to create the context ‘pass2script’ and this is done in extentions.conf


[pass2script] ; this context needs to be unique in the system

exten = _X.,1,Wait,1

exten = _X.,n,SayAlpha(/var/lib/asterisk/sounds/activated,${EXTEN}) ; allison says something and then speaks the dtmf string {EXTEN}

exten = _X.,n,Wait,3 ; pause for a chance to cancel by hitting DTMF # (hangup)

exten = _X.,n,System(/source/of/ ${EXTEN}) ; here we pass the dtmf string to shell

exten = _X.,n,Hangup


So, *97 12345 in our example here, would pass 12345 to the shell for *97 is our executing command.

Outside of the ‘autopatch’ we used to capture and pass the dtmf, this dialplan is pure asterisk and you can use all asterisk dialplan functions for evaluating, reformatting and executing.

You will need your shell script to receive the ‘dtmf number string’ accordingly and help […]

System Time Set using Radio DTMF

A means to set system clock with DTMF RADIO COMMANDS.

First I want to point out several things. Read the warnings at the bottom. This is not a perfect thing, but a framework to meet a end need. You will likely need to make adjustments to it for your particular circumstance(s).

It was intended for Acid users who have no internet connection on their system but can be adapted to fit many situations. While there are more than a dozen ways to do the same thing, I chose this one to show to the group for the simplicity of implementation to those that are not as linux savvy, but have learned asterisk somewhat.

If you are in the US and have had the same system running for many years without updating the zoneinfo files, you should do that and copy the new timezone file to your /etc/localtime because the Daylight […]

Sync time with NTP for app_rpt

(internet connected systems only)

While this probably should be done by your OS, from cron

Here is a script to sync your time with NTP.

Give it a name ( , Apply ownership

Give it a command in rpt.conf, Run that command from the macro/sched late at night.

#!/bin/bash /usr/sbin/ntpdate > /etc/asterisk/log/timelog.txt Will also create a log file if you need to check that it has been running correctly. If not needed, delete all after and including “>” Hopefully these are more of a example of how to do other things for those that are learning.

Macro Delay Execution Timer

This script was created to execute a delay then a command.

Meaning that you issue a command as part of some other simple or complex function and have a delay before it executes a second part or a cancellation of the same.

It could have a multitude of applications once you understand what it is actually doing. But for our example here, it is a simple one.

Our example, we have a light that we use to light our way from the repeater site at night and often someone using it for access to or from the repeater site at night forgets to turn it off. So we need a auto-turn-off for this light-up function.


We are calling the script

If you are using this for many things or nodes, make each instance a unique name with node number and/or special function name.

Create a command for the […]

Script – Initial ID / Normal ID

Many of us that are use to the older premium “hard-wire” style repeater controller are also use to having a initial ID that would allow for a separate ID to be played when the repeater was keyed for the first time from a sleep state.

Then afterwards, would play a normal ID at “id-interval” timing that would be a short ID for in-use.

Most of us would use that Initial ID to play a long ID stating extended info about the repeater like location information so when someone stumbled on the repeater late at night or when nobody was around to ask, they would have the correct info about which repeater they were accessing and where it was.

While there was limited ways to accurately obtain this info and act on it in a way that was uncomplicated for a control-op to install correctly and use, I took it to […]