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

Advanced Asterisk Features: IVR, Voicemail, and Call Recording

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

Asterisk PBX running, let’s configure IVR (Interactive Voice Response), Voicemail, and Call Recording.


1. Setting Up IVR (Interactive Voice Response)

IVR allows callers to navigate menus using DTMF (touch-tone) inputs.

Step 1: Create an IVR Context

Edit the extensions.conf file:

bash
sudo nano /etc/asterisk/extensions.conf

Step 2: Define the IVR Menu

Add an IVR context:

ini[ivr-menu]
exten => s,1,Answer()
same => n,Background(ivr-welcome) ; Play welcome message
same => n,WaitExten(5) ; Wait 5 seconds for input

; Press 1 for Sales
exten => 1,1,Playback(sales-message)
same => n,Dial(SIP/1001,20)
same => n,Hangup()

; Press 2 for Support
exten => 2,1,Playback(support-message)
same => n,Dial(SIP/1002,20)
same => n,Hangup()

; Press 0 for Operator
exten => 0,1,Dial(SIP/1003,20)
same => n,Hangup()

; Invalid or timeout
exten => i,1,Playback(invalid-option)
same => n,Goto(ivr-menu,s,1)

exten => t,1,Playback(timeout-message)
same => n,Goto(ivr-menu,s,1)

Step 3: Record Custom IVR Prompts

Use Asterisk to record custom prompts:

bash
sudo asterisk -rvvv

Run the following command:

asterisk
core set verbose 3
module load app_record.so

Then dial:

*777

Follow the prompts and record messages for “Welcome”, “Sales”, “Support”, etc.

Alternatively, place pre-recorded .wav files in:

swiftCopyEdit/var/lib/asterisk/sounds/en/

Step 4: Assign IVR as the Incoming Call Handler

Modify the [default] context in extensions.conf:

ini
[default]
exten => _X.,1,Goto(ivr-menu,s,1)

Restart Asterisk:

bash
sudo systemctl restart asterisk

Test by dialing into the PBX.


2. Setting Up Voicemail

Voicemail allows users to receive and retrieve voice messages.

Step 1: Edit Voicemail Configuration

bash
sudo nano /etc/asterisk/voicemail.conf

Add:

ini
[default]
1001 => 1234,User One,user1@example.com
1002 => 1234,User Two,user2@example.com

This means:

  • Extension 1001 has voicemail PIN 1234.
  • Messages are sent to the user’s email.

Step 2: Configure Voicemail in Dial Plan

Modify extensions.conf:

ini[internal]
exten => 1001,1,Dial(SIP/1001,20)
same => n,Voicemail(1001,u) ; u = unavailable, b = busy
same => n,Hangup()

exten => 1002,1,Dial(SIP/1002,20)
same => n,Voicemail(1002,u)
same => n,Hangup()

Step 3: Enable Voicemail in Asterisk

Restart Asterisk:

bashCopyEditsudo systemctl restart asterisk

Step 4: Access Voicemail

Users can check voicemail by dialing:

*97

or from another extension:

php-templateCopyEdit*98<extension_number>

3. Setting Up Call Recording

Call recording is useful for logging calls for quality control, training, or compliance.

Step 1: Enable Recording in Dial Plan

Edit extensions.conf:

ini[internal]
exten => 1001,1,MixMonitor(/var/spool/asterisk/monitor/${UNIQUEID}.wav)
same => n,Dial(SIP/1001,20)
same => n,Hangup()

This records calls to /var/spool/asterisk/monitor/.

Step 2: Configure Call Recording Settings

Edit features.conf:

bash
sudo nano /etc/asterisk/features.conf

Enable on-demand recording:

ini
automon => *1

Step 3: Set Up Storage & Permissions

Ensure the directory exists and has the right permissions:

bash
sudo mkdir -p /var/spool/asterisk/monitor/
sudo chown asterisk:asterisk /var/spool/asterisk/monitor/
sudo chmod 755 /var/spool/asterisk/monitor/

Step 4: Restart Asterisk

bash
sudo systemctl restart asterisk

Step 5: Test Call Recording

  1. Call from one extension to another.
  2. Verify recordings:
bash
ls /var/spool/asterisk/monitor/

Final Testing & Debugging

Monitor Asterisk for any issues:

bash
sudo asterisk -rvvv

Check logs:

bashCopyEdittail -f /var/log/asterisk/full

Next Steps

  • Configure CDR (Call Detail Records) logging.
  • Integrate with a CRM.
  • Add Failover & HA for redundancy.
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

Snipe-IT is an open-source IT asset management system

April 3, 2025April 3, 2025

Snipe-IT is an open-source IT asset management system that runs on a LAMP/LEMP stack. Below are the steps to install Snipe-IT on Ubuntu (22.04 or later). Step 1: Update and Install Dependencies bashsudo apt update && sudo apt upgrade -ysudo apt install -y apache2 mariadb-server php php-cli php-mbstring php-xml php-bcmath…

Read More

Configuring Zabbix step by step

March 30, 2025April 2, 2025

Configuring Zabbix step by step involves multiple stages, including installation, database setup, frontend configuration, and adding hosts. Below is a detailed guide: Step 1: Install Required Packages Before installing Zabbix, ensure your system is updated: bashsudo apt update && sudo apt upgrade -y # For Debian/Ubuntusudo yum update -y #…

Read More

ZFS and Partitions

March 31, 2025April 2, 2025

1. ZFS and Partitions 2. Using Partitions with ZFS 3. Why Whole Disks Are Preferred? Would you like help setting up ZFS with a specific partitioning scheme? 4o You said: setting up ZFS with a specific partitioning scheme ChatGPT said: If you want to set up ZFS with a specific…

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 }