Queues Module
From Yate Documentation
This module implements queuing of incoming calls and distribution of these calls to operators using database queries.
Calls can also be explicitly picked up from the queue.
For database access you can use PostgreSQL or MySQL. Please see the requirements for the database module chosen.
Routing
The resources that can act as routing targets for this module are:
- queue/queuename - places the call in the queue named queuename
- pickup/queuename - picks up the most recent call from the queue queuename
- pickup/queuename/channelid - picks up call leg channelid from queue queuename
Configuration
The module is configured from the queues.conf file.
Queue parameters can be configured either from the configuration file or from a database query.
Operators of a queue are always returned by a database query.
[general] ; General settings of the queues module ; account: string: Name of the database account used in queries ;account= ; priority: int: Default priority of message handlers, 0 to disable them ;priority=45 ; rescan: int: Period of polling for available operators, in seconds ;rescan=5 ; mintime: int: Minimum time between queries, in milliseconds ;mintime=500 [priorities] ; Handler priorities for each message, override priority from [general] ; Each handler can be disabled by setting priority 0 ; call.execute: int: Priority of call.execute handler ;call.execute= ; call.answered: int: Priority of call.answered handler, do not set to 0 ;call.answered= ; chan.hangup: int: Priority of chan.hangup handler, do not set to 0 ;chan.hangup= ; call.drop: int: Priority of call.drop handler, 0 disables dropping queued calls ;call.drop= [queries] ; SQL queries that get data about the queue and operators ; queue: string: Query to pick queue parameters, returns zero or one row ; Relevant substitutions: ; ${queue}: string: Name of the queue as obtained from routing ; Relevant returned params: ; mintime: int: Minimum time between queries, in milliseconds ; length: int: Maximum queue length, will declare congestion if grows larger ; maxout: int: Maximum number of simultaneous outgoing calls to operators ; greeting: string: Resource to be played initially as greeting ; onhold: string: Resource to be played while waiting in queue ; maxcall: int: How much to call the operator, in milliseconds ; prompt: string: Resource to play to the operator when it answers ; notify: string: Target ID for notification messages about queue activity ; detail: bool: Notify when details change, including call position in queue ; single: bool: Make just a single delivery attempt for each queued call ;queue= ; avail: string: Query to fetch operators to which calls can be distributed ; Relevant substitutions: ; ${queue}: string: Name of this queue ; ${required}: int: Number of operators required to handle incoming calls ; ${current}: int: Number of calls to operators currently running ; ${waiting}: int: Total number of calls waiting in this queue (assigned or not) ; Mandatory returned params: ; location: string: Resource where the operator is located ; username: string: User name of the operator ; Relevant returned params: ; maxcall: int: How much to call the operator, in milliseconds ; prompt: string: Resource to play to the operator when it answers ;avail= [channels] ; Resources that will be used to handle incoming and outgoing calls ; incoming: string: Target that will handle incoming calls while queued ;incoming= ; outgoing: string: Target that will be called to make calls to operators ;outgoing= ;[queue PUT_NAME_HERE] ; Queues can be defined from config file sections - one per queue ; This overrides the "queue" query but not the "avail" query ; See the "queue" description in the [queries] section for possible settings ; enabled: bool: Enable or disable this queue definition ;enabled=true
See also