Controlling Astersik and Raspberry Pi with DTMF

Last Updated on

Controlling Astersik and Raspberry Pi with DTMF

Intro

Not long ago I got a call from fellow ham, he planed to travel far from home and wanted the ability to control his Allstar node in case of emergency situation.
When I say emergency, I mean if the node is stuck on transmit or someone is messing with the node.

For him it’s much more than a regular Allstar node since he created bridges between different networks and Allstar so if something goes wrong, it can affect many other networks and stations.

How to do it?

The DTMF Method

If you edit your RPT.conf located under /etc/asterisk
You can find the functions area [functionsXXXXX] where you can add special functions to control you node.

There, you’ll have to uncomment the desired command.

In my example, I decided to enable the option to halt the system, restart Asterisk or shutdown Asterisk.
Your node number should be there already, if not, change it to your node.
Security warning: Don’t forget to change the command to special numbers so others will not be able to use those commands and mess with your node remotely.

PLEASE BE AWARE that if you halt the system, you won’t be able to turn it back on until you disconnect the RPi from the power cord and connect it back on.
(If you have smart IOT socket you can control the RPi and do the power cycle if needed).

If you decide to turn off Asterisk service you will be able to get it back on only via SSH.

Restart your Asterisk to load the new config and now you can send the DTMF via Zoiper or IAXRPT on your phone (you’ll need to pres * before the command).

The SSH Method

This method is much safer and easier.
You’ll need to open the SSH port (usually 222) and use DDNS service.

After logging in you can type those commands:
In order to restart the Allstar node type: astres.sh
To shut down the Asterisk service type: astdn.sh
To start the Astersik service back type: astup.sh

Also, you can use the default Linux commands for rebooting and powering off: reboot and poweroff

That’s it!
73!

Did you like it?

Leave a Comment

Your email address will not be published. Required fields are marked *