• 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 create Queues and Agents on Asterisk on Oracle Linux 9.3

  • 00:46 cat /etc/os-release
  • 01:05 systemctl status asterisk.service
  • 01:21 cd /etc/asterisk/
  • 01:32 vim pjsip.conf
  • 01:56 vim queues.conf
  • 02:20 vim extensions.conf
  • 02:41 asterisk -rvvvvvvvvv
  • 02:54 core reload
  • 03:04 dialplan reload
{{postValue.id}}

To Create Queues And Agents On Asterisk On Oracle Linux 9.3

Introduction:

Queues are organized systems designed to hold incoming calls and distribute them efficiently among available agents. They consist of essential components such as the queue name, distribution strategy, timeout settings, and agent assignments.

Agents are employees who are tasked with managing incoming calls in designated queues. They utilize SIP accounts to connect their devices, indicate their availability status, set specific wrap-up times between calls, and oversee call handling restrictions.

Procedure:

Step 1: First check the OS version by using the following 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 status of Asterisk by using the following 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 Wed 2024-06-05 23:28:49 IST; 13min ago
       Docs: man:systemd-sysv-generator(8)
    Process: 6316 ExecStart=/etc/rc.d/init.d/asterisk start (code=exited, status=0/SUCCESS)
   Main PID: 6345 (asterisk)
      Tasks: 38 (limit: 21739)
     Memory: 39.6M
        CPU: 6.022s
     CGroup: /system.slice/asterisk.service
             ├─6343 /bin/sh /usr/sbin/safe_asterisk
             └─6345 /usr/sbin/asterisk -f -vvvg -c
Jun 05 23:28:49 linuxhelp systemd[1]: Starting LSB: Asterisk PBX...
Jun 05 23:28:49 linuxhelp asterisk[6316]: Starting asterisk:
Jun 05 23:28:49 linuxhelp systemd[1]: asterisk.service: Can't open PID file /run/asterisk/asterisk.pid (yet?) after start: Operation not permitted
Jun 05 23:28:49 linuxhelp systemd[1]: asterisk.service: Supervising process 6345 which is not our child. We'll most likely not notice when it exits.
Jun 05 23:28:49 linuxhelp systemd[1]: Started LSB: Asterisk PBX.

Step 3: Move to the Asterisk Directory by using the following command

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

Step 4: Edit the Pjsip.conf file by using the following command

[root@linuxhelp asterisk]# vim pjsip.conf
Add those following lines
[tcp_transport]
type=transport ; Must be of type 'transport'
protocol=tcp
bind=0.0.0.0
tos=cs3
cos=3
allow_reload=false
[udp_transport]
type=transport ; Must be of type 'transport'
protocol=udp
bind=0.0.0.0
tos=cs3
cos=3
allow_reload=false
[167]
auth_type=userpass
type=auth
username=167
password=123456

[167]
type=aor
qualify_frequency=60
max_contacts=1
remove_existing=yes
qualify_timeout=3.0
authenticate_qualify=no

[167]
context=internal
language=en
deny=0.0.0.0/0.0.0.0
trust_id_inbound=yes
send_rpid=no
rtcp_mux=no
call_group=
pickup_group=
disallow=all
allow=ulaw,alaw,g722,gsm,vp9,vp8,h264,opus
;dtls_auto_generate_cert=yes
;webrtc=yes
permit=0.0.0.0/0.0.0.0
ice_support=no
use_avpf=no
dtls_cert_file=
dtls_private_key=
dtls_ca_file=
dtls_setup=actpass
dtls_verify=no
media_encryption=no
message_context=
subscribe_context=
allow_subscribe=yes
rtp_symmetric=yes
force_rport=yes
rewrite_contact=yes
direct_media=no
media_use_received_transport=no
auth=167
aors=167
type=endpoint
mailboxes=63121@63
callerid="User" <167>

[168]
auth_type=userpass
type=auth
username=168
password=123456

[168]
type=aor
qualify_frequency=60
max_contacts=1
remove_existing=yes
qualify_timeout=3.0
authenticate_qualify=no


[168]
context=internal
language=en
deny=0.0.0.0/0.0.0.0
trust_id_inbound=yes
send_rpid=no
rtcp_mux=no
call_group=
pickup_group=
disallow=all
allow=ulaw,alaw,g722,gsm,vp9,vp8,h264,opus
;dtls_auto_generate_cert=yes
;webrtc=yes
permit=0.0.0.0/0.0.0.0
ice_support=no
use_avpf=no
dtls_cert_file=
dtls_private_key=
dtls_ca_file=
dtls_setup=actpass
dtls_verify=no
media_encryption=no
message_context=
subscribe_context=
allow_subscribe=yes
rtp_symmetric=yes
force_rport=yes
rewrite_contact=yes
direct_media=no
media_use_received_transport=no
auth=168
aors=168
type=endpoint
mailboxes=63121@63
callerid="User" <168>

Step 5: Next edit the queues.conf by using the following command

[root@linuxhelp asterisk]# vim queues.conf
Add those following lines
[my_queue]
strategy = ringall
timeout = 15
member => SIP/167
member => SIP/168

Step 6: Edit the extensions.conf file by using the following command

[root@linuxhelp asterisk]# vim extensions.conf
Add those following Lines
[internal]
exten => 168,1,Answer()
same => n,Queue(my_queue) ;
same => n,Hangup()

Step 7: Login to the Asterisk CLI mode by using the following command

[root@linuxhelp asterisk]# asterisk -rvvvvvvvvv
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 = 6345)
linuxhelp*CLI>

Step 8: Reload the PJSIP by using the following command

linuxhelp*CLI> core reload
    -- Reloading module 'extconfig' (Configuration)
    -- Reloading module 'logger' (Logger)
 Asterisk Queue Logger restarted
    -- Reloading module 'cdr' (CDR Engine)
[Jun  6 01:17:51] NOTICE[7021]: cdr.c:4568 cdr_toggle_runtime_options: CDR simple logging enabled.
    -- Reloading module 'cel' (CEL Engine)
    -- CEL logging disabled.
    -- Reloading module 'dnsmgr' (DNS Manager)
    -- Reloading module 'dsp' (DSP)
    -- Reloading module 'enum' (ENUM Support)
    -- Reloading module 'features' (Call Features)
    -- Reloading module 'http' (Built-in HTTP Server)
    -- Reloading module 'indications' (Indication Tone Handling)
    -- Reloading module 'acl' (Named ACL system)
    -- Reloading module 'manager' (Asterisk Manager Interface)
    -- Reloading module 'plc' (PLC)
    -- Reloading module 'udptl' (UDPTL)
    -- Reloading module 'res_pjproject.so' (PJPROJECT Log and Utility Support)
    -- Reloading module 'res_pjsip.so' (Basic SIP resource)
[Jun  6 01:17:51] NOTICE[6964]: sorcery.c:1348 sorcery_object_load: Type 'system' is not reloadable, maintaining previous values
    -- Reloading module 'res_pjsip_authenticator_digest.so' (PJSIP authentication resource)
    -- Reloading module 'res_pjsip_endpoint_identifier_ip.so' (PJSIP IP endpoint identifier)
    -- Reloading module 'res_musiconhold.so' (Music On Hold Resource)
    -- Reloading module 'res_rtp_asterisk.so' (Asterisk RTP Stack)
    -- Reloading module 'res_pjsip_outbound_publish.so' (PJSIP Outbound Publish Support)
    -- Reloading module 'res_pjsip_mwi.so' (PJSIP MWI resource)
    -- Reloading module 'res_pjsip_publish_asterisk.so' (PJSIP Asterisk Event PUBLISH Support)
    -- Reloading module 'res_pjsip_notify.so' (CLI/AMI PJSIP NOTIFY Support)
    -- Reloading module 'res_pjsip_outbound_registration.so' (PJSIP Outbound Registration Support)
    -- Reloading module 'app_confbridge.so' (Conference Bridge Application)
    -- Reloading module 'cdr_custom.so' (Customizable Comma Separated Values CDR Backend)
    -- Reloading module 'app_playback.so' (Sound File Playback Application)
    -- Reloading module 'app_voicemail.so' (Comedian Mail (Voicemail System))
    -- Reloading module 'pbx_config.so' (Text Extension Configuration)
    -- Time to scan old dialplan and merge leftovers back into the new: 0.000004 sec
    -- Time to restore hints and swap in new dialplan: 0.000003 sec
    -- Time to delete the old dialplan: 0.000004 sec
    -- Total time merge_contexts_delete: 0.000011 sec
    -- pbx_config successfully loaded 1 contexts (enable debug for details).
    -- Reloading module 'app_queue.so' (True Call Queueing)
[Jun  6 01:17:51] NOTICE[7021]: app_queue.c:9576 reload_queue_rules: queuerules.conf has not changed since it was last loaded. Not taking any action.

Step 7: Reload the dialplan by using the following command

linuxhelp*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.000009 sec
    -- Time to delete the old dialplan: 0.000006 sec
    -- Total time merge_contexts_delete: 0.000022 sec
    -- pbx_config successfully loaded 1 contexts (enable debug for details).

Step 8: Make a call from 167 to 168 by using the Zoiper and Microsip Software as shown in the below image Snap1

Output:

linuxhelp*CLI>
    -- Executing [168@internal:1] Answer("PJSIP/167-00000001", "") in new stack
       > 0x7f3714040cd0 -- Strict RTP learning after remote address set to: 192.168.6.101:8000
       > 0x7f3714040cd0 -- Strict RTP switching to RTP target address 192.168.6.101:8000 as source
    -- Executing [168@internal:2] Queue("PJSIP/167-00000001", "my_queue") in new stack
    -- Started music on hold, class 'default', on channel 'PJSIP/167-00000001'
       > 0x7f3714040cd0 -- Strict RTP learning complete - Locking on source address 192.168.6.101:8000
    -- Stopped music on hold on PJSIP/167-00000001
  == Spawn extension (internal, 168, 2) exited non-zero on 'PJSIP/167-00000001'

Conclusion:

We have reached the end of this article. In this guide, we have walked you through the steps to create Queues and Agents on Asterisk 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 are queues in Asterisk?

A

Queues are logical entities that hold incoming calls until they can be answered by available agents. They facilitate organized call distribution and management.

Q

How do I configure a queue in Asterisk?

A

To configure a queue, you define its name, strategy for call distribution (e.g., round-robin, ring-all), timeout settings, and assign agents who will receive calls from the queue.

Q

What are agents in Asterisk?

A

Agents are individuals responsible for handling calls within queues. They are assigned to specific queues and receive incoming calls based on queue configuration and their availability.

Q

How do I set up agents in Asterisk?

A

Agents are typically configured using SIP accounts to register their devices with the Asterisk server. Their availability status, wrap-up time between calls, and maximum concurrent call limits can be defined.

Q

What is a dial plan, and why is it important for queues and agents?

A

A dial plan in Asterisk defines call routing logic. It's crucial for queues and agents as it determines how incoming calls are directed to the appropriate queues and subsequently distributed among available agents.

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 David Lopez Guillen ?
Ayuda urgente instale SSL para servidor Opensuse y ahora no funciona tengo servicio web

hola segui este tutorial para tener un certificado ssl y ahora no se ve mi app en la red, espero alguien pueda ayudarme, tengo M9oodle en3.5 en un servidor open suse y ahora no funciona por favor ayuda.

https://www.linuxhelp.com/how-to-create-ssl-certificate-in-opensuse

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.