intro
Installing Asterisk:
sudo apt update
sudo apt install asterisk asterisk-dahdi
sudo systemctl status asterisk
If in any case, the asterisk service is not running, you can start the asterisk service with the following command:
$ sudo systemctl start asterisk
If you want to stop the asterisk service for some reason, then run the following command:
$ sudo systemctl stop asterisk
If you have changed the asterisk configuration files, then you can restart asterisk for the changes to take effect with the following command
sudo systemctl restart asterisk
ls /etc/asterisk
cd /etc/asterisk
cd /etc/asterisk
sudo cp extensions.conf extensions.conf.backup
echo | sudo tee sip.conf
Now run the following command to open sip.conf file with nano text editor:
sudo nano sip.conf
[general]
context=default
allowoverlap=no
udpbindaddr=0.0.0.0
tcpenable=no
tcpbindaddr=0.0.0.0
transport=tcp
srvlookup=yes
[9001]
type=friend
host=dynamic
secret=9001
[9002]
type=friend
host=dynamic
secret=9002