Install Asterisk 18 on CentOS 8

sachin
edited September 30 in asterisk

Asterisk-installation

A little house keeping before installation.

yum update
yum groupinstall "Development Tools"
sed -i 's/\(^SELINUX=\).*/\SELINUX=disabled/' /etc/sysconfig/selinux
sed -i 's/\(^SELINUX=\).*/\SELINUX=disabled/' /etc/selinux/config
sestatus
reboot
sestatus
sudo yum install httpd
firewall-cmd --zone=public --add-port=80/tcp --permanent
firewall-cmd --zone=public --permanent --add-service=http
firewall-cmd --zone=public --permanent --add-service=https
firewall-cmd --reload
sudo systemctl enable httpd.service
sudo systemctl start httpd.service

Installing DependenciesPermalink

yum install -y epel-release dmidecode gcc-c++ ncurses-devel libxml2-devel make wget openssl-devel newt-devel kernel-devel sqlite-devel libuuid-devel gtk2-devel jansson-devel binutils-devel
dnf --enablerepo=PowerTools install libedit-devel
dnf --enablerepo=PowerTools install libsrtp
dnf --enablerepo=PowerTools install libsrtp-devel
yum install -y libedit-devel libsrtp libsrtp-devel

Install Asterisk 18

cd /usr/src/
wget http://downloads.asterisk.org/pub/telephony/asterisk/asterisk-18-current.tar.gz
tar -zxvf asterisk-18-current.tar.gz
mv asterisk-18.3.0/ asterisk/
cd asterisk
contrib/scripts/install_prereq install
./configure --libdir=/usr/lib64 --with-pjproject-bundled --with-crypto --with-ssl=ssl --with-srtp --with-jansson-bundled
make menuselect
make
make install
make install-headers (optional if requires. Development headers are only installed if the “install-headers” target of make is done.)
make samples
make config

Start at server restart

ldconfig
sudo systemctl start asterisk

Entering into command line of asterisk

asterisk -rvv
core show help
exit

Configure extensions.conf and pjsip.conf

cd /etc/asterisk
mv extensions.conf extensions.sample
mv sip.conf sip.sample
mv pjsip.conf pjsip.sample

Creating a basic Dial Plan by editing extensions.conf

vi extensions.conf
[public]
exten = 100,1,Goto(hello-world,s,1)
[default]
[hello-world]
exten = s,1,Answer()
same = n,Wait(1)
same = n,Playback(hello-world)
same = n,Hangup()

Create SIP members in pjsip.conf

vi pjsip.conf
[transport-udp]
type=transport
protocol=udp
bind=0.0.0.0

[7000]
type=endpoint
context=public
disallow=all
allow=ulaw
auth=7000
aors=7000

[7000]
type=auth
auth_type=userpass
password=7000
username=7000

[7000]
type=aor
max_contacts=1
asterisk -rx "core restart now"
asterisk -rvvvvv
Tagged:

Comments

  • sachin
    edited July 9

    for CentOS 9

    New dependencies installations

    yum install chkconfig
    yum install initscripts
    
    systemctl daemon-reload
    

    powertools are called crb(CodeReady Linux Builder, or epel 9) now. To enable it, run

    dnf config-manager --set-enabled crb
    dnf --enablerepo=crb install libedit-devel
    dnf --enablerepo=crb install libsrtp
    dnf --enablerepo=crb install libsrtp-devel
    dnf --enablerepo=crb install jansson-devel
    


  • sachin
    edited July 9

    for xinetd

    https://rhel.pkgs.org/9/okey-x86_64/xinetd-2.3.15.4-4.el9.x86_64.rpm.html

    wget http://repo.okay.com.mx/centos/9/x86_64/release/xinetd-2.3.15.4-4.el9.x86_64.rpm
    yum install xinetd-2.3.15.4-4.el9.x86_64.rpm
    
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!