• Categories
    Category
    {{ postCtrl.tags }}
    • {{ category.tag_type }}

      • {{tag.tag_name}}
      • View more
  • Categories
    Category
    {{ postCtrl.tags }}
    • {{ category.tag_type }}

      • {{tag.tag_name}}
      • View more
  • News
  • Tutorials
  • Forums
  • Tags
  • Users
Tutorial News Comments FAQ Related Articles

How to use Asterisk Dialplan Context Priority Label on Debian 12

  • 00:43 cat /etc/os-release
  • 00:52 asterisk -V
  • 01:01 cd /etc/asterisk/
  • 01:33 vim extensions.conf
  • 02:41 asterisk -rvvvvvvvvvvvvvvvvvvvvv
  • 02:49 dialplan reload
{{postValue.id}}

To Use Asterisk Dialplan Context Priority Label On Debian 12

Introduction

Asterisk's common practice is to assign text labels to priorities. This is to ensure that you can refer to a priority by something other than its number, which probably isn’t known, given that dialplans now generally use unnumbered priorities. To assign a text label to a priority, simply add the label inside parentheses after the priority.

Procedure:

Step 1: Check the OS version by using the below command.

root@linuxhelp:~#cat /etc/os-release
PRETTY_NAME="Debian GNU/Linux 12 (bookworm)"
NAME="Debian GNU/Linux"
VERSION_ID="12"
VERSION="12 (bookworm)"
VERSION_CODENAME=bookworm
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL=https://bugs.debian.org/

Step 2: Check the asterisk version by using the below command.

root@linuxhelp:~#asterisk -V
Asterisk 20.4.0

Step 3: Go to the following location by using the below command.

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

Step 4: Edit extension.conf file for making dialplan using priority label by using the below command.

root@linuxhelp:/etc/asterisk#vim extensions.conf
[internal]
exten => 110,1,NoOp(Print the context)
same => n,Goto(111,test)
same => n,Dial(PJSIP/110, 20)
same => n,Playback(sorry_didnt_get)
same => n,Hangup()

exten => 111,1,NoOp(Print the context)
same => n,Dial(PJSIP/111, 20)
same => n(test),Playback(sorry_didnt_get)
same => n,Hangup()

exten => 112,1,NoOp(Print the context)
same => n,Dial(PJSIP/112, 20)
same => n,Playback(sorry_didnt_get)
same => n,Hangup()

Step 5: Login to the asterisk console by using the below command.

ot@linuxhelp:/etc/asterisk#asterisk -rvvvvvvvvvvvvvvvvvvvvv
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 linuxhelp (pid = 946)
linuxhelp*CLI>

Step 6: Reload the dialplan by using following command.

nuxhelp*CLI> dialplan reload
Dialplan reloaded.
    -- Time to scan old dialplan and merge leftovers back into the new: 0.000007 sec
    -- Time to restore hints and swap in new dialplan: 0.000007 sec
    -- Time to delete the old dialplan: 0.000006 sec
    -- Total time merge_contexts_delete: 0.000020 sec
    -- pbx_config successfully loaded 1 contexts (enable debug for details).

Step 7: Make the call to check the priority label by using microsip application. snap 1

-- Executing [110@internal:1] NoOp("PJSIP/112-00000006", "Print the context") in new stack
-- Executing [110@internal:2] Goto("PJSIP/112-00000006", "111,test") in new stack
-- Goto (internal,111,3)
-- Executing [111@internal:3] Playback("PJSIP/112-00000006", "sorry_didnt_get") in new stack
   > 0x7effb0013680 -- Strict RTP learning after remote address set to: 192.168.6.102:4000
-- <PJSIP/112-00000006> Playing 'sorry_didnt_get.ulaw' (language 'en')
   > 0x7effb0013680 -- Strict RTP switching to RTP target address 192.168.6.102:4000 as source
-- Executing [111@internal:4] Hangup("PJSIP/112-00000006", "") in new stack

== Spawn extension (internal, 111, 4) exited non-zero on 'PJSIP/112-00000006'

Conclusion:

We have reached the end of this article. In this guide, we have walked you through the steps required to use Asterisk Dialplan Context Priority Label on Debian 12. Your feedback is much welcome.

Tags:
matthew
Author: 

Comments ( 0 )

No comments available

Add a comment
{{postCtrl.cmtErrMsg}}

Frequently asked questions ( 5 )

Q

What are Asterisk dialplan priority labels?

A

Asterisk dialplan priority labels are markers used to identify specific sections or steps in the dialplan configuration. They allow you to organize and control the call flow within your Asterisk system.

Q

Can I use multiple priority labels in the same dialplan?

A

Yes, you can use multiple priority labels in the same dialplan. Each label should have a unique name to avoid any conflicts.

Q

How can priority labels be helpful?

A

Priority labels can help you structure and organize your dialplan configuration. They allow for easier navigation within the dialplan and can be used to control the call flow based on specific conditions or requirements.

Q

Are there any best practices for using dialplan priority labels?

A

It is recommended to use meaningful and descriptive labels to improve clarity and maintainability of the dialplan. Additionally, ensure that the label names do not conflict with any reserved keywords or commands used by Asterisk.

Q

Can I use non-alphanumeric characters in priority labels?

A

No, only numbers (0-9) and lowercase letters (a-z) are valid label characters. Using other characters will result in a syntax error.

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.