After a few weeks of reorganization in my Homelab, I finally have my Allstarlink node running on a clean, dedicated Debian 13 Linux server. Allstarlink is a a software technology package which allows a HAM radio operator to connect a ham radio to the internet and communicate with other configured radio nodes. The system works off an opensource PBX system called asterisk. My node configuration relies on an DMX URIx USB radio interface. One really annoying issues that I have, is that my URIx USB interface to the Allstar node radio consistently changes its hardware address then the computer is rebooted. In effect, makes the Allstar node unreliable following a system reboot and requires me to follow a short procedure to bring the node online again.
The file used to control this interface in my circumstance is the file simpleusb.conf which is found in the directory /etc/asterisk. According the this file, the entry devstr should be left blank. However, the good people at asterisk provide a utility asl-find-sound. The asl-find-program is used to display app_rpt-compatible sound device and it works perfectly. However, on my node, when the computer is rebooted, the USB device is not found the the sound interface for the code will fail. In order to correct, each time I reboot the computer, I need to manually run the asl-find-program and then update the value of devstr in the simpleusb.conf file. Once this is done, I then need restart the asterisk daemon and only then will my allstar node be available.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;; Configure your nodes here ;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;
; Note: there is no need to duplicate entire settings. Only
; place settings that are different than the template.
;
; Note: the device string is automatically found when the
; USB setting "devstr=" is empty.
;
; Note: the interface "tune" settings will be added to the
; per-node settings (below).
[42527](node-main)
ctcssfrom = usb
rxondelay = 0
;;;;; Tune settings ;;;;;
devstr = 3-5:1.0
rxmixerset = 800
txmixbset = 950
txmixaset = 950
Needless to say that this is annoying. I have read many articles and theories, but they have not helped me solve the issue. I know that the utility the Allstarlink team works, so my assumption is that there is something else going on. So, I opted to see if I could work around something into a solution, which hopefully would not break when I do an update.
As general overview, I wanted to write a script which would run once on system start and update the simpleusb.conf file before the asterisk daemon is started.
To create my new service, I created a file asterisk-devstr.service which is placed in /etc/systemd/system/. The contents of this file are as follows.
[Unit]
Description=Asterisk devstr
After=network.target
Before=asterisk.service
[Service]
Type=oneshot
User=root
Group=root
ExecStart=/etc/asterisk/scripts/config_simpleusb_devstr.sh
[Install]
WantedBy=multi-user.target
This new service is set to start before the asterisk service is launched and executes the command “/etc/asterisk/scripts/config_simpleusb_devstr.sh”. This action will write the correct value for devstr into the file devstr.conf, which is then read correctly when the asterisk service is started. Once you add/edit the service file, you need to setup autostart with the command.
sudo systemctl enable asterisk-devstr.service
Since I installed this new little service, my Allstar Node Radio works perfectly everytime I restart the computer.