asterisk
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| asterisk [2025/07/12 09:36] – nicolas | asterisk [2025/07/21 10:56] (current) – [Oracle Cloud Infrastructure PBX Server Setup] nicolas | ||
|---|---|---|---|
| Line 20: | Line 20: | ||
| # Copy down private key, store and set security on it | # Copy down private key, store and set security on it | ||
| cd keys | cd keys | ||
| - | sudo chmod 60 ssh-key-2025-07-11.key | + | sudo chmod 60 ssh-key-2025-07-19.key |
| # ssh on to cloud instance | # ssh on to cloud instance | ||
| - | sudo ssh -i ./ | + | sudo ssh -i ./ |
| sudo apt update | sudo apt update | ||
| sudo apt full-upgrade | sudo apt full-upgrade | ||
| Line 31: | Line 31: | ||
| sudo systemctl start cron | sudo systemctl start cron | ||
| sudo systemctl enable cron | sudo systemctl enable cron | ||
| + | sudo apt install ufw | ||
| + | sudo apt install net-tools | ||
| </ | </ | ||
| - | https:// | + | ===UFW |
| - | + | ||
| - | after ./install -n | + | |
| - | messages about SIP missing | + | |
| - | fwconsole ma install pm2 | + | |
| - | Rerun ./install -n | + | |
| + | Revised to install UFW, use this instead of directly changing iptables | ||
| < | < | ||
| - | sudo apt update | + | sudo ufw status |
| - | sudo apt full-upgrade | + | sudo ufw allow http |
| - | sudo apt install apache2 -y | + | sudo ufw allow ssh |
| - | sudo usermod -G www-data -a ubuntu | + | sudo ufw allow 5060:5061/udp |
| - | sudo usermod -G www-data -a root | + | sudo ufw allow 10000:20000/udp |
| - | sudo chown -R www-data:www-data | + | sudo ufw enable |
| - | sudo chmod -R 775 /var/ | + | |
| - | sudo apt install php7.4-common php7.4-cgi php7.4 -y | + | |
| - | sudo apt install libapache2-mod-php7.4 -y | + | |
| </ | </ | ||
| - | < | + | ===Asterisk |
| - | sudo nano /etc/ | + | |
| - | < | + | https://www.atlantic.net/ |
| - | # The ServerName directive sets the request scheme, hostname and port that | + | |
| - | # the server uses to identify itself. This is used when creating | + | |
| - | # redirection URLs. In the context of virtual hosts, the ServerName | + | |
| - | # specifies what hostname must appear in the request' | + | |
| - | # match this virtual host. For the default virtual host (this file) this | + | |
| - | # value is not decisive as it is used as a last resort host regardless. | + | |
| - | # However, you must set it for any further virtual host explicitly. | + | |
| - | #ServerName www.example.com | + | |
| - | ServerAdmin webmaster@localhost | + | ===FreePBX Config=== |
| - | DocumentRoot / | + | |
| - | # Available loglevels: trace8, ..., trace1, debug, info, notice, warn, | + | Load User and other modules - Admin, Check Online, Select then process. |
| - | # error, crit, alert, emerg. | + | |
| - | # It is also possible to configure the loglevel for particular | + | |
| - | # modules, e.g. | + | |
| - | #LogLevel info ssl:warn | + | |
| - | ErrorLog ${APACHE_LOG_DIR}/ | + | if you need to Unlock the admin page |
| - | </ | + | sudo fwconsole unlock s231lcov0fbdsnhaiidchantu4 (highlighted PHP session text) |
| - | < | + | User Ext Setup |
| - | sudo nano / | + | |
| - | # If you just change | + | Had to change |
| - | # have to change the VirtualHost statement | + | sudo nano /etc/asterisk/sip_general_additional.conf |
| - | # /etc/apache2/sites-enabled/ | + | |
| - | Listen 80 | + | Revise |
| + | sudo nano / | ||
| + | ; Maximum amount of memory a script may consume | ||
| + | ; https:// | ||
| + | memory_limit = 256M | ||
| - | < | ||
| - | Listen 443 | ||
| - | </ | ||
| - | < | + | SIP TCP Port Min: 560 - 580 updated |
| - | | + | 5081 |
| - | </ | + | |
| - | # vim: syntax=apache ts=4 sw=4 sts=4 sr noet | + | ===Asterisk Security=== |
| - | </ | + | |
| - | < | + | https:// |
| - | sudo systemctl restart apache2 | + | |
| - | </code> | + | |
| - | Update firewall rules 42002 Reflector and 80 Web Dashboard | ||
| - | |||
| - | < | ||
| - | sudo iptables -I INPUT 6 -m state --state NEW -p tcp --dport 80 -j ACCEPT | ||
| - | sudo iptables -I INPUT 6 -m state --state NEW -p tcp --dport 42002 -j ACCEPT | ||
| - | sudo iptables -I INPUT 6 -m state --state NEW -p udp --dport 42002 -j ACCEPT | ||
| - | sudo netfilter-persistent save | ||
| - | </ | ||
| - | |||
| - | Check firewall rules | ||
| - | |||
| - | < | ||
| - | sudo iptables -S | ||
| - | </ | ||
| + | ---- | ||
| ====Hams Over IP install==== | ====Hams Over IP install==== | ||
| Line 143: | Line 104: | ||
| ===Connect Ext 2 to Local Asterisk PBX=== | ===Connect Ext 2 to Local Asterisk PBX=== | ||
| - | TCP must be enabled. PBX on different IP so can use default port. | + | UDP must be enabled. PBX on different IP so can use default port. |
| - | Ext 2 tab - line enable AND Phone tab - Line key 2 enabled. | + | Ext 2 tab - Line enable AND Phone tab - Line key 2 enabled. |
| + | |||
| + | ===Connect using a different SIP port=== | ||
| + | |||
| + | In EXT change the SIP port and add the port number to the proxy address 141.147.xx.xx: | ||
| ===Change background image on phone=== | ===Change background image on phone=== | ||
| Line 153: | Line 118: | ||
| https:// | https:// | ||
| + | https:// | ||
| ===Reboot=== | ===Reboot=== | ||
asterisk.1752309410.txt.gz · Last modified: by nicolas
