Installing Asterisk Server

Document the full procces for install and configuration of the Asterisk Server

Asterisk

TODO:

  • Prepare the Platform (Linux)

  • Compile the source code

  • Configure the Server

  • Test Terminal (Sip Phone)

  • Test SofPhone

  • Release

Set Up Platform

Setting the platform be on a virtual machine with Linux Debian 11/12 OS

Process for settin-up …

Branches of Asterisk

Download Locations

Asterisk

https://downloads.asterisk.org/pub/telephony/asterisk/asterisk-14-current.tar.gz

libpri

https://downloads.asterisk.org/pub/telephony/libpri/libpri-current.tar.gz

dahdi-linux

https://downloads.asterisk.org/pub/telephony/dahdi-linux/dahdi-linux-current.tar.gz

dahdi-tools

https://downloads.asterisk.org/pub/telephony/dahdi-tools/dahdi-tools-current.tar.gz

dahdi-complete

https://downloads.asterisk.org/pub/telephony/dahdi-linux-complete/dahdi-linux-complete-current.tar.gz

Download Asterisk from source

wget http://downloads.asterisk.org/pub/telephony/asterisk/asterisk-20-current.tar.gz

Compile Asterisk

After downlaod the release change to download dir extract and compile

  • Install some additional software

sudo apt install build-essential wget libssl-dev libncurses5-dev libnewt-dev libxml2-dev linux-headers-$(uname -r) libsqlite3-dev uuid-dev

we can run the prerequisites script from asterisk code

./contrib/scripts/install_prereq install

Using install_prereq

The install_prereq script is included with every release of Asterisk in the contrib/scripts subdirectory. The script has the following options:

  • test - print only the libraries to be installed.

  • install - install package dependencies only. Depending on your distribution of Linux, version of Asterisk, and capabilities you wish to use, this may be sufficient.

  • install-unpacakged - install dependencies that don’t have packages but only have tarballs. You may need these dependencies for certain capabilities in Asterisk.

prerequisites
1
2
3
4
5
[root@server asterisk-14.X.Y]# cd contrib/scripts

[root@server asterisk-14.X.Y/contrib/scripts]# ./install_prereq install

[root@server asterisk-14.X.Y/contrib/scripts]# ./install_prereq install-unpackaged

Now start with the compilation:

Compilation Proccess
1
2
3
make distclean
./configure
make
Install
sudo make install

Setup init.d

Copy init script for start ,stop , restart control of asterisk

sudo cp asterisk/contrib/init.d/rc.debian.asterisk /etc/init.d/asterisk

Or

sudo make config

prepare exec

Edit in /etc/init.d/asterisk
1
2
3
4
# Full path to asterisk binary
DAEMON=/usr/sbin/asterisk
ASTVARRUNDIR=/etc/var/run/asterisk
ASTETCDIR=/etc/asterisk

Directory Permissions

set Dir permissions

sudo chown -R asterisk /var/spool/asterisk /var/lib/asterisk /var/run/asterisk
sudo cp contrib/init.d/etc_default_asterisk /etc/default/asterisk
Edit /etc/default/asterisk
#uncomment
AST_USER="asterisk"
AST_GROUP="asterisk"
verify
ambagasdowa@kukulkan:/etc/asterisk$ ps aux | grep asterisk
asterisk 2506501  100  0.6  73484 24880 ?        Rs   17:15   0:01 /usr/sbin/asterisk -U asterisk -G asterisk
Edit /etc/asterisk/asterisk.conf
live_dangerously = no
Update Initialization Scripts
update-rc.d asterisk defaults

Hardening the setup

Testing Sip Phone

Testing mac address
CC:EF:48:59:F5:E9

AVAYA

Ok, i have wasted a lot of time for that and seems no one knows how to actually do it so :

  1. Only 1603SW-I can be used

  2. Logoff, reset phone to factory (mute73738#)

  3. Download configuration file from ftp://ftp.avaya.com/incoming/Up1cku9/tsoweb/46xxsettings/08302015/46xxsettings.txt

  4. Edit it :

Edit 44xxsettings.txt
1
2
3
4
5
6
SET ENABLE_AVAYA_ENVIRONMENT 0
SET SIPSIGNAL 0
SET CONFIG_SERVER_SECURE_MODE 0
SET SIP_CONTROLLER_LIST {your server ip}:5060;transport=udp
SET SIPDOMAIN {your server FQDN}
SET DNSSRVR {your dns server IP}
  1. Download SIP firmware https://support.avaya.com/downloads/download-details.action?contentId=C2010882049141200_6&productId=P0468

  2. Copy config file to firmware files

  3. Update firmware by HTTP ( i’ve used IIS, just paste all firmware contents to www root and enable anon read access )

This also should work with any SIP-based PBX.


Last update: Nov 20, 2024