Previous posts on this topic:
While I wait for parts to try to interface an Alinco EMS-57 hand microphone to AllStar node 58841 on the tiny PC, I spent some time connecting the node to my SIP phone on my desk.
For those who have been following along, I’ve already connected my Cisco SPA525G voice-over-IP phone to my “cloud node” running on a Vultr.com server in Seattle, Washington. Information about that is in the I/O: Hamshack Hotline Connects to AllStarLink Node post.
Why? Why not?
The first question that probably arises is: why would I want to replicate the functionality I already enjoy with the Hamshack Hotline link to my cloud node? Well, why not? There may be some folks who don’t want to depend on Hamshack Hotline for that service. My goal is to build a standalone radio-free node I can take with me when I travel.
Node to phone is working, but…
I have some configuration issues to clean up. First, AllScan is supposed to disconnect from one node before connecting to another node. That didn’t happen. This morning, I accidentally cross-connected two remote nodes. That’s a recipe for losing friends.
Second, when connected to a remote node, every other node that connects or disconnects is announced on my audio. That’s pretty intrusive.
Edit: I fixed this. Read on for how!
Research on microphone interface
As I looked for information on connecting a microphone to a local node instance, I ran across quite a few interesting links, including these:
https://learn.adafruit.com/usb-audio-cards-with-a-raspberry-pi/cm109-type
http://km6uso.net/index.php/2021/02/13/building-a-radio-less-allstar-hub/
https://allstarsetup.com/build-your-own-radioless-allstar-node/
http://www.masterscommunications.com/products/radio-adapter/rl/pdf/RF-Less-Node.pdf
Clearly, I’m not doing something that hasn’t been done before. I’m glad that so many others have provided pathways for me to follow.
But I don’t have the parts I need to take this next step, so in the meantime, I worked on connecting my local node to my Cisco 525 phone. After some hiccups, this succeeded.
Configuring Asterisk on the Tiny PC
As I looked at how to connect the local node to my phone, one of the most helpful documents I found is AllStar SIP Phone Configuration.
Other helpful links:
https://www.asteriskguru.com/tutorials/asterisk_voip_ipphone.html
https://kb.smartvox.co.uk/asterisk/configuring-ip-phones-asterisk-pbx-extensions/
https://anders.fongen.no/adding-sip-phones-to-an-allstarlink-node/
I’ve already been through some of this from the end-user perspective when the Hamshack Hotline folks worked with me to connect my HH number to my cloud node. That means my cloud node has configuration files I was able to refer to as I tried to get my local node configured.
There are only three Asterisk configuration files that need to be modified:
/etc/asterisk/modules.conf
/etc/asterisk/sip.conf
/etc/asterisk/extensions.conf
Edit: I also ended up changing rpt.conf as explained below.
modules.conf
The modules.conf file is where the Session Initiation Protocol (SIP) channel is loaded. The ASL Debian Beta image has SIP disabled. The AllStar SIP Phone Configuration information shows how to change this so that SIP is enabled. What I did was change
noload => chan_sip.so
to
load => chan_sip.so
Pro tip: you need to restart Asterisk or reboot your node before your changes become active. You can wait to restart Asterisk until you have changed all three .conf files.
Since I am working in the terminal, I can restart Asterisk without having to reboot the entire PC by issuing this command:
sudo astres.sh
That only takes a few seconds to complete so it is much faster than rebooting the computer.
sip.conf
I followed the general structure used by Hamshack Hotline as outlined in their wiki page on RF linking HH to AllStar, with some modifications. The “radio-control” context is set for the extension in sip.conf. I set the extension to be the same number as the node (58841).
[58841]
udpbindaddr = 192.168.1.163:5062
username = KJ7T
secret = XYXYXYXY
type = friend
host = dynamic
dtmfmode = rfc2833
canreinvite = no
context = radio-control
trustrpid = yes
sendrpid = no
port = 5062
qualify = yes
qualifyfreq = 60
transport = udp
encryption = no
callgroup =
pickupgroup =
dial = SIP/58841
mailbox = 58841@device
callerid = "KJ7T-58841"
So to be clear: you specify the context for your instance in sip.conf, and as you’ll see below, that context is described in extensions.conf.
extensions.conf
My extensions.conf settings for a context labeled “radio-control” for node 58841 are:
[radio-control]
exten => 58841,1,Answer()
exten => 58841,n,Playback(rpt/node)
exten => 58841,n,Playback(digits/5) ;say node digits one at a time
exten => 58841,n,Playback(digits/8)
exten => 58841,n,Playback(digits/8)
exten => 58841,n,Playback(digits/4)
exten => 58841,n,Playback(digits/1)
exten => 58841,n,Playback(rpt/connected)
exten => 58841,n,Rpt,58841|P
rpt.conf
I was hearing notifications as each remote node connected and disconnected from a net. As you might imagine, this can become very disturbing with a large, busy net. Googling revealed a discussion about this but I found a solution by comparing the settings in rpt.conf for my cloud node (the cloud node doesn’t announce every connect and disconnect).
I set these values in rpt.conf to suppress almost all notifications:
duplex = 1
holdofftelem = 1
telemdefault = 0
With telemdefault set to 2, I hear my own ID when connecting. Setting it to 0 suppresses all identifications (except I do faintly hear my callsign in CW in the background after connecting). Suppressing all connect/disconnect notices makes listening much more pleasant!
Backing up the files
The AllStarLink image is running Debian 10 (Buster). I installed rdiff-backup and created a backup target called Backups. (Examples of running rdiff-backup are available here and here.)
The backup command is simple:
sudo rdiff-backup /etc/asterisk/ ~/Backups/
The backup only takes a second or two. It is very fast.
Configuring the Cisco SPA525G Phone
Changing settings for the Cisco phone happens through a web interface served up by the phone. First, you have to find the IP address of your phone. You can find the IP address on the phone or by using a network scanner.
Find the IP address of your phone
To find the IP address on the phone, press the Settings key (looks like a sheet of paper with a corner turned down), scroll to item 10 Status, press the Select key, and select 2 Network Status. On the fifth line down on that screen you’ll see the IP address of your phone. My phone is at 192.168.1.163.
I do occasionally use a network scanner. One that works well for me is Advanced IP Scanner.
Open the Cisco management interface
Substitute your phone’s IP address for the <phone IP> notation in the URL (note that HTTP is used, not HTTPS):
http://<phone IP>
The resulting screen will look like this:
Then click the “Admin Login” link, and then the “advanced” link. Once you are in the advanced screens, you may only need to click the extension tab you wish to use. I am using extension 2.
What follows are the settings that are working for me. Your mileage may vary.
NAT Settings
NAT Mapping Enable: yes
NAT Keep Alive Enable: yes
SIP Settings
SIP Transport: UDP
SIP Port: 5062 (I chose 5062 because I already have other services running on the usual default port 5060)
Proxy and Registration
Proxy: IP address of your local node. If you don’t remember the IP address of your local node, try running a network scanner program.
Outbound proxy: IP address of your local node
User Outbound Proxy: no
Register: yes
Make Call Without Reg: no
Subscriber Information
Display Name: I put my call sign here, but you can put any arbitrary label here.
User ID: 58841 is my phone extension. (Yes, I set the phone extension in sip.conf to my node number. I could have set it to anything but I chose to simply use the node number as the extension.) My username in sip.conf is KJ7T and this is what messed me up for several hours. I had previously set the User ID for the Cisco phone as KJ7T but Asterisk wouldn’t register the phone. I kept seeing a message that registration had failed. In a WTH moment, I replaced KJ7T with my 58841 extension and the phone immediately registered with Asterisk.
Password: This is the secret you saved in the sip.conf file.
User Auth ID: yes
Auth ID: same as the User ID a few lines above this setting
At the bottom of the page, click the Submit All Changes button.
I suggest restarting Asterisk on the local node at this time to make sure it is in sync with your phone.
Connecting: phone to node to remote node
With luck, the extension button on your Cisco phone is now green.
In the above image, my Hamshack Hotline number is on line 1 (the top green button). My phone connection to my local node is line 2. And a voip.ms phone number is on line 3. All lines are green.
If you’d like to try voip.ms, consider using my signup code as a favor to me: https://voip.ms/en/invite/MzU4MTQz
If your button is not green, something is wrong. For me, it was a problem with registering the phone to Asterisk.
Dial your node
Press the phone button that corresponds to your local node connection. If you hear a dial tone: good! Enter your local node number (for me: 58841) and press the Dial button. My connection sounds like this:
Then connect to a remote node
After your phone is connected to your local node, you can connect to a remote node. One way to do this is through AllStarLink DTMF commands. To connect in transceive mode, the command is *3 followed by the node number. For example, to connect to node 2462 (WW7PSR in Seattle), you would enter *32462.
Disconnect with a *1<node number> command. To transmit, press *99. To stop transmitting, press the # key.
I prefer to use AllScan
I prefer the simplicity of using AllScan on my computer. I can run it directly on the node computer, of course. What I generally do, though, is run it at the IP address of the node with /allscan appended. I have a bit of information about AllScan in my Intro to AllScan post.
Here is what AllScan looks like with my phone connected to local node 58841, and 58841 is connected to node 51018:
Test your audio
It’s a good idea to test your audio before you join a net. For that, you can connect to node 55553, an enhanced parrot mode located in Dallas, Texas. That node will respond with helpful information about your audio level and then play back what it heard from your node.
Asterisk command line interface (CLI)
I did find the Asterisk CLI useful as I diagnosed why my phone wouldn’t register with my AllStar node. To run the CLI, open the asl-menu from a terminal on the local node. You can connect that node to a keyboard and display, but what I did was use PuTTY to open a terminal window remotely.
Once logged in, run asl-menu as root:
sudo asl-menu
In the resulting screen, select the Asterisk CLI option. Once the CLI prompt appears, execute this command:
sip show peers
If your phone is registered, the screen will look something like this:
As I struggled with this, the screen kept showing blanks for the host IP address and said there were zero sip peers. That, and the information available in the Cisco management screens, told me my phone had not successfully registered with Asterisk.
I'm really pleased with the audio quality of this node. I used node 55553 (parrot) to test. Next up is probably making a complete image of the install so that I can replicate it if the physical node dies (this is, after all, older tech that was first manufactured in 2015).