• 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 Oracle Linux 9.3

  • 00:37 cat /etc/os-release
  • 00:58 systemctl status asterisk.service
  • 01:11 cd /etc/asterisk/
  • 01:21 vim extensions.conf
  • 01:39 asterisk -rvvvvvvvvvvvvvvvvvvv
  • 01:49 dialplan reload
{{postValue.id}}

To Use Asterisk Dialplan Context Priority Label On Oracle Linux 9.3

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
NAME="Oracle Linux Server"
VERSION="9.3"
ID="ol"
ID_LIKE="fedora"
VARIANT="Server"
VARIANT_ID="server"
VERSION_ID="9.3"
PLATFORM_ID="platform:el9"
PRETTY_NAME="Oracle Linux Server 9.3"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:oracle:linux:9:3:server"
HOME_URL="https://linux.oracle.com/"
BUG_REPORT_URL="https://github.com/oracle/oracle-linux"
ORACLE_BUGZILLA_PRODUCT="Oracle Linux 9"
ORACLE_BUGZILLA_PRODUCT_VERSION=9.3
ORACLE_SUPPORT_PRODUCT="Oracle Linux"
ORACLE_SUPPORT_PRODUCT_VERSION=9.3

Step 2: Check the Asterisk status by using the below command.

[root@linuxhelp ~]# systemctl status asterisk.service
● asterisk.service - LSB: Asterisk PBX
     Loaded: loaded (/etc/rc.d/init.d/asterisk; generated)
     Active: active (running) since Sat 2024-03-23 13:09:47 IST; 15min ago
       Docs: man:systemd-sysv-generator(8)
    Process: 6279 ExecStart=/etc/rc.d/init.d/asterisk start (code=exited, status=0/SUCCESS)
   Main PID: 6308 (asterisk)
      Tasks: 40 (limit: 21739)
     Memory: 43.6M
        CPU: 9.344s
     CGroup: /system.slice/asterisk.service
             ├─6306 /bin/sh /usr/sbin/safe_asterisk
             └─6308 /usr/sbin/asterisk -f -vvvg -c
Mar 23 13:09:47 linuxhelp systemd[1]: Starting LSB: Asterisk PBX...
Mar 23 13:09:47 linuxhelp asterisk[6279]: Starting asterisk:
Mar 23 13:09:47 linuxhelp systemd[1]: asterisk.service: Can't open PID file /run/asterisk/asterisk.pid (yet?) after start: Operation not permitted
Mar 23 13:09:47 linuxhelp systemd[1]: asterisk.service: Supervising process 6308 which is not our child. We'll most likely not notice when it exits.
Mar 23 13:09:47 linuxhelp systemd[1]: Started LSB: Asterisk PBX.

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

[root@linuxhelp ~]# cd /etc/asterisk/
[root@linuxhelp asterisk]#

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

[root@linuxhelp asterisk]# vim extensions.conf
Add the following line
[internal]
exten => _XXX,1,NoOp(Call started for ${EXTEN})
exten => _XXX,n,Goto(skip)
exten => _XXX,n,Playback(hello)
exten => _XXX,n(skip),Dial(PJSIP/${EXTEN})

Step 5: Next login to the asterisk CLI Mode by using the below command.

[root@linuxhelp asterisk]# asterisk -rvvvvvvvvvvvvvvvvvvv
Asterisk 20.5.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.5.0 currently running on linuxhelp (pid = 6308)
linuxhelp*CLI>

Step 6: Reload the dialplan by using the below command.

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

Output 
-- Executing [167@internal:1] NoOp("PJSIP/168-00000006", "Call started for 167") in new stac
    -- Executing [167@internal:2] Goto("PJSIP/168-00000006", "skip") in new stack
    -- Goto (internal,167,4)
    -- Executing [167@internal:4] Dial("PJSIP/168-00000006", "PJSIP/167") in new stack
    -- Called PJSIP/167
    -- PJSIP/167-00000007 is ringing
  == Spawn extension (internal, 167, 4) exited non-zero on 'PJSIP/168-00000006'

Conclusion:

We have reached the end of this article. In this guide, we have walked you through the steps required how to use priority label on Asterisk dialplan context on Oracle Linux 9.3. Your feedback is much welcome.

Tags:
michael
Author: 

Comments ( 0 )

No comments available

Add a comment
{{postCtrl.cmtErrMsg}}

Frequently asked questions ( 5 )

Q

What is the use of the priority labels?

A

Labels make it easier to jump back to a particular location within the extension at a later time.

Q

How do you use priority labels?

A

exten => extension,priority(label),Application)

Q

Where will we use the priority label?

A

We are using the priority labels on the dialplan context

Q

How to reload the dialplan context?

A

Login to the asterisk CLI mode and run the dialplan reload command to reload.

Q

Where is the dialplan location on the Asterisk?

A

/etc/asterisk/extensions.conf

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 Luk Van De Looverbosch ?
How to create a root ?

Hello,
How to create root@linuxhelp in Linux Mint 20.1 64-bit ?
Thanks in advance for your reply.
Best regards.

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.