# This was greatly improved 2021/08/28 # see https://kwynn.com/t/21/07/asterisk/asterisk_build_improved_2021_0828.txt # 2021/07/26 12:41AM EDT America/New_York # web v2 sudo timedatectl set-timezone America/New_York wget https://downloads.asterisk.org/pub/telephony/asterisk/asterisk-18-current.tar.gz wget https://downloads.asterisk.org/pub/telephony/libpri/libpri-current.tar.gz tar -zxvf libpri-current.tar.gz tar -zxvf asterisk-*.tar.gz sudo apt update sudo apt dist-upgrade sudo reboot sudo apt install make sudo apt install gcc mkdir dadhi2 cd dadhi2 git clone -b next git://git.asterisk.org/dahdi/linux dahdi-linux make sudo make install cd .. mkdir dtools cd dtools git clone https://github.com/asterisk/dahdi-tools.git # not sure if these were necessary as opposed to further below sudo apt install autoconf sudo apt install libtool sudo apt install libnewt-dev sudo apt install usb-1.0-0-dev sudo apt install libusb-1.0-0-dev sudo apt-get install libglib2.0-dev sudo apt install libgusb2 sudo apt install ipp-usb sudo apt install libusbmuxd6 sudo apt install usb-modeswitch sudo apt install usb.ids sudo apt install usbmuxd sudo apt install usbutils cd ~ cd asterisk-18.5.0 cd contrib cd scripts # The following probably takes care of most of the above, if not all sudo ./install_prereq sudo ./install_prereq install cd ~ cd dtools sudo make config cd .. cd dahdi-linux-complete-3.1.0+3.1.0 sudo make install cd dadhi2 cd d* sudo make install sudo make config cd build_tools cd ~ ls cd libpri-1.6.0 make cd .. cd dtools cd d* autoreconf -i ./configure make sudo make install sudo make install-config cd .. cd libpri-1.6.0 make sudo make install cd .. ls cd asterisk-18.5.0 ls ./configure make sudo make install sudo make samples sudo make basic-pbx sudo make config sudo systemctl restart asterisk sudo systemctl status asterisk sudo apt install net-tools telnet localhost 5060 sudo netstat -tunlp | grep asterisk cd /etc/asterisk more logger.conf # more later sudo nano logger.conf sudo systemctl restart asterisk cd /var/log/asterisk tail -n 200 -f full ps -Af | grep asterisk sudo kill -9 [that PID] sudo systemctl stop asterisk sudo systemctl disable asterisk sudo asterisk -cvvvvvvv