How to Install Asterisk on Ubuntu 20.04
Install all required packages and dependencies
apt update && sudo apt -y upgrade
apt-get install apache2
apt-get install php php-curl php-xml libapache2-mod-php php-mysql php-mbstring php-fpm
apt-get install mysql-server mysql-client
https://thishosting.rocks/install-php-on-ubuntu/
## For version check= mysql -V
mysql_secure_installation
Secure MySQL
—
Once the MySQL server has started, the service will then need to be secured. The mysql_secure_installation script will assist with this process by presenting several questions. It is recommended to accept the default action for all questions which is yes.
sudo /usr/bin/mysql_secure_installation
- Set root password? [Y/n] Y
- Remove anonymous users? [Y/n] Y
- Disallow root login remotely? [Y/n] Y
- Remove test database and access to it? [Y/n] Y
- Reload privilege tables now? [Y/n] Y
SHOW VARIABLES LIKE 'validate_password.%'; ### it should be Yes
SET GLOBAL validate_password.policy=LOW; ###
mysql> SELECT user,authentication_string,plugin,host FROM mysql.user; +——————+————————————————————————+———————–+———–+
user | authentication_string | plugin | host |
+——————+————————————————————————+———————–+———–+ p#reLtk)kO8oVa97.hmCgdkp4sEatFT6qE.P.VHbUsfEgU9dGAD | caching_sha2_password | localhost |
mysql.infoschema | $A$005$THISISACOMBINATIONOFINVALIDSALTANDPASSWORDTHATMUSTNEVERBRBEUSED | caching_sha2_password | localhost |
mysql.session | $A$005$THISISACOMBINATIONOFINVALIDSALTANDPASSWORDTHATMUSTNEVERBRBEUSED | caching_sha2_password | localhost |
mysql.sys | $A$005$THISISACOMBINATIONOFINVALIDSALTANDPASSWORDTHATMUSTNEVERBRBEUSED | caching_sha2_password | localhost |
root | *6C3C43BC0F2FBB65AADEE64ED450F2AF06536B83 | mysql_native_password | localhost |
+——————+————————————————————————+———————–+———–+ 5 rows in set (0.00 sec)
SELECT user,authentication_string,plugin,host FROM mysql.user;
ALTER USER 'root'@'localhost' IDENTIFIED WITH caching_sha2_password BY 'rajshahi360';
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'rajshahi360';
FLUSH PRIVILEGES;
apt-get install phpmyadmin
add-apt-repository universe
apt -y install git zip unzip curl wget libnewt-dev libssl-dev libncurses5-dev subversion libsqlite3-dev build-essential libjansson-dev libxml2-dev uuid-dev
##Old for Asterisk 16##apt -y install git curl wget libnewt-dev libssl-dev libncurses5-dev subversion libsqlite3-dev build-essential libjansson-dev libxml2-dev uuid-dev
cd /usr/src/
curl -O http://downloads.asterisk.org/pub/telephony/asterisk/asterisk-16-current.tar.gz
tar -xavf asterisk-certified-16.3-current.tar.gz
tar xvf asterisk-16.16.2.tar.gz
cd asterisk-16*/
contrib/scripts/get_mp3_source.sh
contrib/scripts/install_prereq install
## install completed successfully##
./configure
make menuselect
make
make install
make samples
- cp rc.debian.asterisk /etc/init.d/asterisk
- cd /etc/init.d/
- vi asterisk
- /etc/init.d/asterisk restart
- unzip backup_interspeed_2021-06-08.zip
- cp -r /usr/src/2021-06-08/www/ /var/www/
- ls
- mv www html
- cd /var/lib/asterisk/
- ls
- rm -rf agi-bin/
- cp -r /usr/src/2021-06-08/agi-bin/ .
- rm -rf crontab
- rm -rf asterisk/
- cp -r /usr/src/2021-06-08/crontab .
- cp -r /usr/src/2021-06-08/asterisk/ .
- cd /usr/src/2021-06-08/
- cp -r /usr/src/2021-06-08/bdcom/ .
- cd /
- cp -r /usr/src/2021-06-08/bdcom/ .
- mysql -u root -p asterisk < asterisk.sql
- vi /etc/apache2/apache2.conf
- a2enmod rewrite
- a2enmod headers
- 145 chmod 777 -R bdcom
- 146 chmod 777 -R data/
- 147 chmod 777 -R data
- 148 cd
- 149 chmod 777 -R /etc/asterisk
- 150 chmod 644 /etc/crontab
- 151 chmod 777 -R /var/lib/asterisk/sounds/en/
- 152 ln -s /var/www/html/assets/uploads/sounds/ sounds
- 153 mkdir /data/recordings
- 154 hmod 755 -R /data/recordings
- 155 chmod 755 -R /data/recordings
- 156 chmod 777 -R /var/www/html/assets/uploads/
- 157 cd /var/www/html/assets/uploads
- 158 chmod -R 777 ivr ivr_item
- 159 ls
- 160 cd sounds/
- 161 ls
- 162 chmod -R 777 ivr ivr_item
- 163 hown -R www-data:www-data /var/www/
- 164 chown -R www-data:www-data /var/www/
- 165 chmod 755 -R /var/www/
Minimal SIP users/peers configuration
http://downloads.asterisk.org/pub/telephony/asterisk/
https://www.voip-info.org/asterisk-config-queuesconf/?__cf_chl_jschl_tk__=pmd_08fb43cf783e144b743b1547d3872ee2bb3beec1-1628752820-0-gqNtZGzNArijcnBszQqi
new pbx pass
iptsp@xxx.xxx.com
Asdf12345 –root
K0th@iptsp
sanjoy@xxx.xxx.com
$$vi45seiDe*sf
old pbx pass
abir@xxx.xxx.com
123456
call center pass
iptsp@xxx.xxx.com
dHaka987$
- # Full path to asterisk binary
- DAEMON=/usr/sbin/asterisk
- ASTVARRUNDIR=/var/run/asterisk
- ASTETCDIR=/etcasterisk * TRUE=/bin/true *