Skip to content
Tech Master Tech Master

OneStopTechnical Forum

  • Books
  • AI
  • Networking
  • Windows
  • Linux
  • Cloud
  • Mac
  • Active Directory
  • Azure
  • Cloud
  • Exchange
  • M365
  • Server 2025
  • Storage
  • Vsphere
  • Website
  • Database
  • Security
  • Knowledge Base
  • VPN
Tech Master
Tech Master

OneStopTechnical Forum

Install Asterisk EPABX-VOIP

blog.payperitem.com, March 31, 2025April 2, 2025

Configuring an Asterisk PBX (EPABX) system involves several steps, from installation to setting up extensions, trunks, and call routing. Below is a step-by-step guide to setting up Asterisk PBX on a Linux system (e.g., Ubuntu or CentOS).


Step 1: Install Asterisk

1. Update System Packages

bash
sudo apt update && sudo apt upgrade -y # For Debian/Ubuntu
sudo yum update -y # For CentOS/RHEL

2. Install Required Dependencies

bash
sudo apt install -y build-essential wget curl git subversion libjansson-dev \
libxml2-dev libsqlite3-dev uuid-dev

(For CentOS, use yum instead of apt.)

3. Download and Compile Asterisk

bashcd /usr/src/
sudo wget http://downloads.asterisk.org/pub/telephony/asterisk/asterisk-20-current.tar.gz
sudo tar -xvzf asterisk-20-current.tar.gz
cd asterisk-20.*

4. Install Required Modules

bash
sudo contrib/scripts/get_mp3_source.sh
sudo contrib/scripts/install_prereq install

5. Configure & Compile Asterisk

bash
sudo ./configure
sudo make menuselect
  • Enable the necessary modules (like chan_sip, res_config_mysql, app_macro, etc.).
  • Exit and save.
bashsudo make -j$(nproc)
sudo make install
sudo make samples
sudo make config
sudo ldconfig

Step 2: Configure Asterisk PBX

1. Configure SIP Extensions

Edit the SIP configuration file:

bashCopyEditsudo nano /etc/asterisk/sip.conf

Add the following sample configuration:

ini[general]
context=default
allowguest=no
srvlookup=yes
udpbindaddr=0.0.0.0
tcpenable=no

[1001]
type=friend
secret=yourpassword
host=dynamic
context=internal
nat=yes
canreinvite=no
disallow=all
allow=ulaw
allow=alaw
callerid="User 1001" <1001>

[1002]
type=friend
secret=yourpassword
host=dynamic
context=internal
nat=yes
canreinvite=no
disallow=all
allow=ulaw
allow=alaw
callerid="User 1002" <1002>

2. Configure Extensions (Dial Plan)

Edit the dial plan:

bash

sudo nano /etc/asterisk/extensions.conf

Add the following:

iniCopyEdit[internal]
exten => 1001,1,Dial(SIP/1001,20)
exten => 1002,1,Dial(SIP/1002,20)

exten => _X.,1,NoOp(Incoming call)
 same => n,Answer()
 same => n,Playback(hello-world)  ; Play a sample message
 same => n,Hangup()

3. Configure Trunks (Optional)

For a SIP trunk:

ini[voiptrunk]
type=peer
host=sip.provider.com
username=yourusername
secret=yourpassword
insecure=invite
nat=yes
canreinvite=no
context=from-trunk

Step 3: Start and Enable Asterisk

bash
sudo systemctl restart asterisk
sudo systemctl enable asterisk

Step 4: Test & Connect Softphones

  1. Install Zoiper or Linphone on your PC or mobile.
  2. Add an account:
    • SIP Server: IP_of_Asterisk_Server
    • Username: 1001
    • Password: yourpassword
  3. Try calling 1002 from 1001.

Step 5: Monitor & Debug

Run Asterisk CLI:

bash

sudo asterisk -rvvv


Check logs:
bashCopyEdittail -f /var/log/asterisk/full

Additional Features

  1. Voicemail – Configure /etc/asterisk/voicemail.conf
  2. IVR Menus – Configure extensions.conf
  3. Call Recording – Configure features.conf
  4. Call Queues – Configure queues.conf

Cloud Linux #Azure#BSOD#CentOS#CloudComputing#CloudHosting#Colocation#CyberSecurity#CyberSecurity #WindowsSecurity #PrivacyMatters #Firewall #EndpointSecurity#DataCenter#DDoSProtection#DebianServer#DedicatedServer#DirectX#ESXi#FibreChannel#Firewall#GameOptimization#HyperV#IntrusionDetection#iSCSI#ITInfrastructure#ITPro#KVM#LinuxServer#ManagedHosting#NASStorage#Networking#NVMe#PCGaming#PCIssues#PowerShell#Proxmox#RAID#RedHat#SANStorage#Server#ServerRoom#ServerSecurity#SIEM#SSDServers#SysAdmin#SysAdminLife#TaskScheduler#TechSupport#UbuntuServer#VMware#VPSHosting#vSAN#vSphere#WindowsAutomation#WindowsDebugging#WindowsFix#WindowsGaming#WindowsServerEnterprise & HostingSecurity & MonitoringStorage & PerformanceVirtualization & Hypervisors

Post navigation

Previous post
Next post

Related Posts

ZFS and Partitions

March 31, 2025April 2, 2025

1. ZFS and Partitions 2. Using Partitions with ZFS 3. Why Whole Disks Are Preferred?

Read More

1️⃣ General Web Server Security Best Practices

April 2, 2025April 2, 2025

✅ Keep the Server Updated ✅ Run as a Non-Root User ✅ Use TLS/SSL (HTTPS) ✅ Disable Unnecessary Modules ✅ Limit Server Signature Exposure ✅ Restrict File & Directory Access ✅ Enable Rate Limiting ✅ Enable Web Application Firewall (WAF) ✅ Enable Logging & Monitoring 2️⃣ Nginx Hardening Guide 🛡️…

Read More

Step-by-Step Guide to Configuring a JumpCloud Server

March 30, 2025April 2, 2025

JumpCloud is a cloud-based directory platform that enables centralized identity and access management. Below is a step-by-step guide to setting up a JumpCloud server: Step 1: Sign Up & Access JumpCloud Step 2: Add and Configure a Server Step 3: Configure Users & Groups Step 4: Set Up Policies &…

Read More

Recent Posts

  • List of AD Schema Versions
  • OldNewExplorer Free Download For Windows 11, 10, 8 and 7 [Latest Version]
  • How to Get the Classic (old) Context Menu on Windows 11
  • BitLocker Recovery Keys
  • Active Directory and Server hardening

Recent Comments

No comments to show.
June 2025
M T W T F S S
 1
2345678
9101112131415
16171819202122
23242526272829
30  
« May    
Log in
©2025 Tech Master | WordPress Theme by SuperbThemes
  • Login
  • Sign Up
Forgot Password?
Lost your password? Please enter your username or email address. You will receive a link to create a new password via email.
body::-webkit-scrollbar { width: 7px; } body::-webkit-scrollbar-track { border-radius: 10px; background: #f0f0f0; } body::-webkit-scrollbar-thumb { border-radius: 50px; background: #dfdbdb }