This plugin enables automatic uploading of received audio from AllStarLink nodes to a Rdio-Scanner instance, allowing you to build a complete radio scanner system with web-based playback.
- Automatic audio capture from AllStarLink nodes
- Real-time upload to rdio-scanner via API
- Configurable recording (duration, format, sample rate)
- Multiple implementation options (Bash script, Python AGI, or Asterisk dialplan)
- Metadata support (system, talkgroup, frequency, timestamps)
- Debug logging for troubleshooting
- AllStarLink 3.x (or ASL 2.x with Asterisk)
- Rdio-Scanner (version 6.x or later) installed and running
- System tools:
curl(for HTTP uploads)sox(for audio file manipulation)- Python 3.6+ with
requestsmodule (for Python version)
# Install required packages (Debian/Ubuntu)
sudo apt-get update
sudo apt-get install curl sox python3 python3-pip
# Install Python dependencies (for Python version)
sudo pip3 install requests- Download and install the script:
sudo wget -O /usr/local/bin/asl-rdio-uploader.sh \
https://your-server/asl-rdio-uploader.sh
sudo chmod +x /usr/local/bin/asl-rdio-uploader.sh- Configure the script:
Edit /usr/local/bin/asl-rdio-uploader.sh and update the configuration section:
# Rdio-Scanner API Configuration
RDIO_URL="http://192.168.1.100:3000/api/call-upload"
RDIO_API_KEY="your-api-key-here"
# System Configuration
SYSTEM_ID="1"
SYSTEM_LABEL="AllStarLink"
# Node Configuration
NODE_NUMBER="1999" # Your node number
TALKGROUP_ID="1"
TALKGROUP_LABEL="Repeater"
TALKGROUP_GROUP="Amateur Radio"
FREQUENCY=146520000 # 146.520 MHz in Hz- Test the configuration:
/usr/local/bin/asl-rdio-uploader.sh test- Install the Python script:
sudo wget -O /usr/local/bin/asl-rdio-agi.py \
https://your-server/asl-rdio-agi.py
sudo chmod +x /usr/local/bin/asl-rdio-agi.py- Configure the script:
Edit /usr/local/bin/asl-rdio-agi.py and update the CONFIG dictionary.
- Test:
/usr/local/bin/asl-rdio-agi.py test- Access rdio-scanner admin interface:
http://your-rdio-scanner:3000/admin - Default password:
rdio-scanner - Go to Config → Systems → Add System
- Configure:
- ID: 1 (or your chosen ID)
- Label: AllStarLink
- Talkgroups: Add your node(s)
- In rdio-scanner admin: Config → API Keys
- Click New API Key
- Set Ident (e.g., "AllStarLink")
- Copy the generated key
- Update your plugin configuration with this key
Add to /etc/asterisk/rpt.conf in your [functions] section:
[1999] ; Your node number
; ... existing config ...
[functions1999]
; Start recording - dial *991
991=cmd,/usr/local/bin/asl-rdio-uploader.sh start 1999
; Stop recording and upload - dial *992
992=cmd,/usr/local/bin/asl-rdio-uploader.sh stop 1999
; Test - dial *993
993=cmd,/usr/local/bin/asl-rdio-uploader.sh testAdd to /etc/asterisk/extensions.conf:
[rdio-scanner-monitor]
; Called when transmission starts
exten => start,1,NoOp(Starting rdio-scanner recording for node ${NODE})
same => n,System(/usr/local/bin/asl-rdio-uploader.sh start ${NODE})
same => n,Return()
; Called when transmission ends
exten => stop,1,NoOp(Stopping rdio-scanner recording for node ${NODE})
same => n,System(/usr/local/bin/asl-rdio-uploader.sh stop ${NODE})
same => n,Return()Then modify your node's context to call these on transmit events.
Add to your /etc/asterisk/extensions.conf:
[rdio-auto-record]
; Automatically start MixMonitor when channel is up
exten => s,1,NoOp(Auto-recording for rdio-scanner)
same => n,Set(RECFILE=/tmp/asl-rdio-recordings/node_${NODE}_${EPOCH}.wav)
same => n,MixMonitor(${RECFILE},b)
same => n,Set(GLOBAL(RDIO_RECFILE_${NODE})=${RECFILE})
same => n,Goto(${CONTEXT},${EXTEN},1)
; On hangup
exten => h,1,NoOp(Upload recording on hangup)
same => n,StopMixMonitor()
same => n,Wait(1)
same => n,System(/usr/local/bin/asl-rdio-uploader.sh upload ${GLOBAL(RDIO_RECFILE_${NODE})})Start recording:
/usr/local/bin/asl-rdio-uploader.sh start 1999Stop and upload:
/usr/local/bin/asl-rdio-uploader.sh stop 1999Upload specific file:
/usr/local/bin/asl-rdio-uploader.sh upload /path/to/audio.wav- Dial
*991to start recording - Dial
*992to stop and upload - Dial
*993to test
Recordings happen automatically when:
- Someone keys up on your repeater/node
- Transmission ends and audio is uploaded
Bash script log:
tail -f /tmp/asl-rdio-recordings/asl-rdio-uploader.logPython script log:
tail -f /var/log/asl-rdio-uploader.logAsterisk logs:
tail -f /var/log/asterisk/messagesProblem: "Cannot reach Rdio-Scanner server"
- Check rdio-scanner is running:
systemctl status rdio-scanner - Verify URL is correct
- Check firewall rules
Problem: "Audio file is empty"
- Check audio routing in AllStarLink
- Verify MixMonitor is working:
asterisk -rx "core show channels" - Check disk space:
df -h
Problem: "Upload failed (HTTP 401)"
- Invalid API key - regenerate in rdio-scanner admin
- Update plugin configuration with new key
Problem: "Audio too short, skipping"
- Adjust
MIN_AUDIO_LENGTHin configuration - Check actual transmission duration
Enable debug logging by editing the script:
Bash script:
DEBUG=1 # Change from 0 to 1Python script:
'debug': True # Change from False to TrueTo monitor multiple AllStarLink nodes:
- Create separate configurations for each node
- Use different
NODE_NUMBERandTALKGROUP_IDvalues - Set up rdio-scanner with corresponding talkgroups
You can add audio processing before upload:
# Example: Normalize audio before upload
upload_to_rdio() {
local audio_file=$1
local processed_file="${audio_file%.wav}_processed.wav"
# Normalize audio with sox
sox "$audio_file" "$processed_file" gain -n -3
# Upload processed file
curl -F "audio=@${processed_file}" ...
rm -f "$processed_file"
}The plugin can be extended to upload to multiple destinations:
- Broadcastify Calls
- OpenMHz
- Custom logging systems
- Archive storage
-
Disk Space: Audio files accumulate in
/tmp/asl-rdio-recordings/- Successfully uploaded files are automatically deleted
- Failed uploads remain for retry/debugging
- Consider adding a cleanup cron job
-
Network Bandwidth: Each transmission upload uses bandwidth
- 8kHz audio ≈ 64 kbps
- 30-second transmission ≈ 240 KB
-
CPU Usage: Minimal impact
- Audio recording: negligible
- Upload: brief spike during HTTP POST
- API Key: Keep your rdio-scanner API key secure
- File Permissions: Recording directory should be writable only by asterisk user
- Network: Use HTTPS for rdio-scanner if exposed to internet
- Firewall: Restrict rdio-scanner API access to trusted IPs
# Set proper permissions
sudo chown asterisk:asterisk /tmp/asl-rdio-recordings
sudo chmod 755 /tmp/asl-rdio-recordings# Remove scripts
sudo rm /usr/local/bin/asl-rdio-uploader.sh
sudo rm /usr/local/bin/asl-rdio-agi.py
# Remove audio directory
sudo rm -rf /tmp/asl-rdio-recordings
# Remove configuration from Asterisk
# Edit /etc/asterisk/extensions.conf and /etc/asterisk/rpt.conf
# Remove rdio-scanner related sections
# Reload Asterisk
sudo asterisk -rx "dialplan reload"
sudo asterisk -rx "module reload"For issues, questions, or contributions:
- Check rdio-scanner documentation: https://github.com/chuot/rdio-scanner
- Check AllStarLink documentation: https://allstarlink.github.io
- Review logs for error messages
- Test configuration with built-in test command
This plugin is provided as-is for integration between AllStarLink and Rdio-Scanner. Both AllStarLink and Rdio-Scanner are open source projects with their own licenses.
- AllStarLink: https://www.allstarlink.org/
- Rdio-Scanner: https://github.com/chuot/rdio-scanner
- This integration created to help amateur radio operators build scanner systems