apt update
apt install curl gpg

cd /tmp
wget http://apt.allstarlink.org/repos/asl_builds/install-allstarlink-repository
chmod +x install-allstarlink-repository

Install ASL
Next as root (or with sudo) run the following commands to install ASL.
apt -y install linux-headers-$(uname -r)
apt -y install asl-asterisk
apt -y install allstar-helpers
apt -y install asl-dahdi-linux
apt -y install asl-update-node-list

If you are installing on a Raspberry Pi add:
apt -y install asl-raspberrypi-kernel
apt -y install asl-raspberrypi-kernel-headers