• Categories
    Category
  • Categories
    Category
  • News
  • Tutorials
  • Forums
  • Tags
  • Users
Tutorial Comments FAQ Related Articles

How to Create an Asterisk Dialplan Context on Debian 12

  • 00:47 lsb_release -a
  • 01:03 cd /etc/asterisk
  • 01:17 vim extensions.conf
  • 04:51 asterisk -rvvvvvvvvvvvvvvvvvv
  • 05:03 dialplan reload
  • 05:13 pjsip show endpoints
  • 06:51 cd /var/lib/asterisk/sounds/en/
  • 08:01 vim /etc/asterisk/extensions.conf
  • 08:33 dialplan reload
7633

To Create An Asterisk Dialplan Context On Debian 12

The Dialplan is truly the heart of any Asterisk system, as it defines how Asterisk handles inbound and outbound calls. In a nutshell, it consists of a list of instructions or steps that Asterisk will follow. Unlike traditional phone systems, Asterisk’s Dialplan is fully customizable. To successfully set up your own Asterisk system, you will need to understand the Dialplan.

Creation Steps:

Step 1: Check the System OS version by using following command.

root@ linuxhelp:~# lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description:    Debian GNU/Linux 12 (bookworm)
Release:        12
Codename:       bookworm

Step 2: Go to the following Location by using following command.

root@ linuxhelp:~# cd /etc/asterisk/

Step 3: Edit the extensions.conf file for create dialplan context by using following command.

root@ linuxhelp:/etc/asterisk# vim extensions.conf

Step 4: Login to the Asterisk Console by using following command.

root@ linuxhelp:/etc/asterisk# sudo asterisk -rvvvvvvvvvvvvvvv
Asterisk 20.4.0, Copyright (C) 1999 - 2022, Sangoma Technologies Corporation and others.
Created by Mark Spencer <markster@digium.com>
Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details.
This is free software, with components licensed under the GNU General Public
License version 2 and other licenses; you are welcome to redistribute it under
certain conditions. Type 'core show license' for details.
=========================================================================
Connected to Asterisk 20.4.0 currently running on debian (pid = 930)
linuxhelp *CLI>

Step 5: Reload the Dialplan by using following command.

linuxhelp *CLI> dialplan reload
Dialplan reloaded.
  == Setting global variable 'CONSOLE' to 'Console/dsp'
  == Setting global variable 'IAXINFO' to 'guest'
  == Setting global variable 'TRUNK' to 'DAHDI/G2'
  == Setting global variable 'TRUNKMSD' to '1'
    -- Including switch 'DUNDi/e164' in context 'dundi-e164-switch'
    -- Including switch 'Lua/' in context 'local'
    -- Including switch 'Lua/' in context 'demo'
    -- Including switch 'Lua/' in context 'public'
    -- Including switch 'Lua/' in context 'default'
    -- Including switch 'DUNDi/e164' in context 'ael-dundi-e164-switch'
    -- Time to scan old dialplan and merge leftovers back into the new: 0.000536 sec
    -- Time to restore hints and swap in new dialplan: 0.000005 sec
    -- Time to delete the old dialplan: 0.000089 sec
    -- Total time merge_contexts_delete: 0.000630 sec
    -- pbx_config successfully loaded 51 contexts (enable debug for details).
[Sep  6 21:06:05] WARNING[2785]: pbx.c:8797 ast_context_verify_includes: Context 'local' tries to include nonexistent context 'iaxtel700'

Step 6: Make a call from one extension to another extension by using softphone softwares as shown in below image. snap1

Step 7: Able to see the dialplan context on asterisk console as shown in below image. snap 2

Step 8: Go to the asterisk default sound location by using following command.

root@ linuxhelp:/etc/asterisk# cd /var/lib/asterisk/sounds/en

Step 9: list the files and copy any one sound file name by using following command.

root@ linuxhelp:/var/lib/asterisk/sounds/en# ls
1-for-am-2-for-pm.alaw
1-for-am-2-for-pm.g722
1-for-am-2-for-pm.g729
1-for-am-2-for-pm.gsm
1-for-am-2-for-pm.siren14
1-for-am-2-for-pm.siren7
1-for-am-2-for-pm.sln16
1-for-am-2-for-pm.ulaw
1-for-am-2-for-pm.wav
1-yes-2-no.alaw
1-yes-2-no.g722
1-yes-2-no.g729
1-yes-2-no.gsm
1-yes-2-no.siren14
1-yes-2-no.siren7
1-yes-2-no.sln16
1-yes-2-no.ulaw

Step 10: Edit the extensions.conf file for insert the sound file name inside of the playback application using following command.

root@ linuxhelp:/var/lib/asterisk/sounds/en# vim /etc/asterisk/extensions.conf

Step 11: Go to Asterisk console and Reload the Dialplan by using following command.

root@ linuxhelp:~# sudo asterisk -rvvvvvvvvvvvvvvv
Asterisk 20.4.0, Copyright (C) 1999 - 2022, Sangoma Technologies Corporation and others.
Created by Mark Spencer 
Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details.
This is free software, with components licensed under the GNU General Public
License version 2 and other licenses; you are welcome to redistribute it under
certain conditions. Type 'core show license' for details.
=========================================================================
Connected to Asterisk 20.4.0 currently running on debian (pid = 930)
linuxhelp *CLI>
linuxhelp*CLI> dialplan reload
Dialplan reloaded.
  == Setting global variable 'CONSOLE' to 'Console/dsp'
  == Setting global variable 'IAXINFO' to 'guest'
  == Setting global variable 'TRUNK' to 'DAHDI/G2'
  == Setting global variable 'TRUNKMSD' to '1'
    -- Including switch 'DUNDi/e164' in context 'dundi-e164-switch'
    -- Including switch 'DUNDi/e164' in context 'ael-dundi-e164-switch'
    -- Including switch 'Lua/' in context 'default'
    -- Including switch 'Lua/' in context 'public'
    -- Including switch 'Lua/' in context 'demo'
    -- Including switch 'Lua/' in context 'local'
    -- Time to scan old dialplan and merge leftovers back into the new: 0.000529 sec
    -- Time to restore hints and swap in new dialplan: 0.000004 sec
    -- Time to delete the old dialplan: 0.000088 sec
    -- Total time merge_contexts_delete: 0.000621 sec
    -- pbx_config successfully loaded 51 contexts (enable debug for details).
[Sep  6 21:07:33] WARNING[2792]: pbx.c:8797 ast_context_verify_includes: Context 'local' tries to include nonexistent context 'iaxtel700'

Step 12: Again Make a call from one extension to another extension by using softphone softwares as shown in below image. snap 3

Step 13: Able to hear the sound after the call automatically ended and Able to see the dialplan context on asterisk console as shown in below image. snap 4

Conclusion:

We have reached the end of this article. In this guide, we have walked you through the steps required to Create Dial plan Context on Debian 12. Your feedback is much welcome.

Tags:
gabriel
Author: 

Comments ( 0 )

No comments available

Add a comment

Frequently asked questions ( 5 )

Q

What is PJSIP in Asterisk?

A

pjsip. conf is a flat text file composed of sections like most configuration files used with Asterisk.

Q

What is the default port used by PJSIP?

A

Default UDP port 5160

Q

How to reload pjsip.conf ?

A

By running the following command pjsip reload

Q

What is AOR in PJSIP?

A

Address of Record (AOR): According to the official Asterisk documentation, an AOR tells Asterisk "where an endpoint can be contacted."

Q

What is Auth in PJSIP?

A

Address of Record (AOR): According to the official Asterisk documentation, an AOR tells Asterisk "where an endpoint can be contacted."

Related Tutorials in How to Create an Asterisk Dialplan Context on Debian 12

Related Tutorials in How to Create an Asterisk Dialplan Context on Debian 12

How to install Gparted on Debian 9.0
How to install Gparted on Debian 9.0
Sep 13, 2017
Installation SSL Certificate on Ubuntu/Linuxmint/Debian to Secure Apache
Installation SSL Certificate on Ubuntu/Linuxmint/Debian to Secure Apache
Sep 19, 2018
How to install and update OpenSSL on Debian 11.3
How to install and update OpenSSL on Debian 11.3
Oct 21, 2022
How to install qBittorrent on Debian 9.0
How to install qBittorrent on Debian 9.0
Sep 8, 2017
How to Install FileZilla in Debian
How to Install FileZilla in Debian
Nov 29, 2016
How to install Nmap on Debian 9.0
How to install Nmap on Debian 9.0
Sep 9, 2017
How to Install Laravel in Debian
How to Install Laravel in Debian
Dec 7, 2016
How to install and configure Asterisk in CentOS
How to install and configure Asterisk in CentOS
Jul 19, 2016

Related Forums in How to Create an Asterisk Dialplan Context on Debian 12

Related Forums in How to Create an Asterisk Dialplan Context on Debian 12

MariaDB
ryan class=
E: Unable to locate package mariadb-server
Sep 18, 2017
Linux
AadrikaAnshu class=
How to add timestamps to history On Any Linux Machine
Jun 18, 2019
vim
jacob class=
Change true vi-compatible editor from Debian Vim-compatible
Nov 8, 2021
debian
anandaamatya class=
RedNotebook on Debian buster
Jun 30, 2020
Ubuntu
Kirin class=
Videos Always Micro-Shutter
Mar 8, 2019
debian
luke class=
workbench for debian
May 26, 2017
debian
teddybarax class=
Softwae installation problem
Aug 24, 2020
debian
colbyvance class=
Trouble Installing Debian 10.8.0 (Gnome)
Feb 28, 2021

Related News in How to Create an Asterisk Dialplan Context on Debian 12

Related News in How to Create an Asterisk Dialplan Context on Debian 12

Debian IceDove kicks the bucket after Thunderbird revisits Debian Repositories
Debian IceDove kicks the bucket after Thunderbird revisits Debian Repositories
Feb 28, 2017
Mass update of Jessie - A better alternative to new version?
Mass update of Jessie - A better alternative to new version?
May 8, 2017
Debian 9.2 ‘Stretch’ OS is here, download distro now
Debian 9.2 ‘Stretch’ OS is here, download distro now
Oct 9, 2017
Back To Top!
Rank
User
Points

Top Contributers

userNamenaveelansari
135850

Top Contributers

userNameayanbhatti
92510

Top Contributers

userNamehamzaahmed
32150

Top Contributers

1
userNamelinuxhelp
31040

Top Contributers

userNamemuhammadali
24500
Can you help Lucas ?
Various options in Top command

Am using Top command only to view the load average, what are the various options in Top command..??

Networking
  • Routing
  • trunk
  • Netmask
  • Packet Capture
  • domain
  • HTTP Proxy
Server Setup
  • NFS
  • KVM
  • Memory
  • Sendmail
  • WebDAV
  • LXC
Shell Commands
  • Cloud commander
  • Command line archive tools
  • last command
  • Shell
  • terminal
  • Throttle
Desktop Application
  • Linux app
  • Pithos
  • Retrospect
  • Scribe
  • TortoiseHg
  • 4Images
Monitoring Tool
  • Monit
  • Apache Server Monitoring
  • EtherApe 
  • Arpwatch Tool
  • Auditd
  • Barman
Web Application
  • Nutch
  • Amazon VPC
  • FarmWarDeployer
  • Rukovoditel
  • Mirror site
  • Chef
Contact Us | Terms of Use| Privacy Policy| Disclaimer
© 2025 LinuxHelp.com All rights reserved. Linux™ is the registered trademark of Linus Torvalds. This site is not affiliated with linus torvalds in any way.