User Tools

Site Tools


api:pbx:app:queues

API : PBX : APP: Queues

Introduction

This request is used to return a list of all the queues the employee has access to.

Request

URL https://api.telecomx.dk/pbx/app/queues
Method GET
Access level PERSONAL, VIEWER, MANAGER, OWNER, RESELLER, ADMIN.
Query extension [optional] Id of employees extension. Used when employee may have more than 1 extension.
all [optional] True to return the list of callers and members, instead of the count.
queue [optional] Id of queue, if only a specific queue shall be returned.

Query examples

https://api.telecomx.dk/pbx/app/queues
https://api.telecomx.dk/pbx/app/queues?all=true
https://api.telecomx.dk/pbx/app/queues?extension=12345678901234567890ABCD
https://api.telecomx.dk/pbx/app/queues?queue=12345678901234567890ABCD

Response

Array of queues.

Queue (JSON object)
_id Id Id of queue.
name String Name of queue.
number String Local extension number of the queue.
dynamic Boolean True if employee may join/leave the queue.
member Boolean True if employee is a member of the queue.
members Number Number of members in the queue (all=false).
callers Number Number of calls in the queue (all=false).
serviceLevel Number Max seconds within a call must be answered to uphold the service level.
serviceLevelCritical Number Max seconds before a call is considered under critical service level.
priority Number Priority of the queue in relation to other queues. Higher priority means first access to available members.
members Array Members of the queue - only if all=true
members[]._id String Unique id of the member. Used when removing member from the queue.
members[].extension Id Id of a member extension, null if member is external.
members[].number String Phone number of external member. Null if member is extension.
members[].priority Number Priority of member in the queue, 1-20, lower gets calls first. Defaults to 1.
members[].calls Number Number of calls answered today by the member.
members[].seconds Number Number of seconds the member has been taking talking to queue calls today.
members[].lastCallEnded Date Date and time the member handled the last call.
members[].permanent Boolean If true, the member cannot leave the queue. It can only be done via API/Web by a MANAGER or higher.
callers Array List of callers currently in the queue - only if all=true
callers[]._id String Unique id of the call - <channel-id>-<hostname>.
callers[].state String State of caller:
QUEUED - waiting to be answered
CALLBACK - waiting to be answered but requires callback
VIP - VIP caller waiting to be answered, not included when calculating position in queue.
callers[].number String Callers number.
callers[].name String Callers name - if available.
callers[].privacy Boolean True if callers number is secret.
callers[].entered Date Date and time when the caller entered the queue.
callers[].answered Date Date and time when the caller was answered (or called back).
callers[].presentation String The number the caller called. Used as a-number when doing callback.
callers[].answeredByExtension Id Extension id of member who answered the call.
callers[].answeredByNumber String Phone number of member who answered the call.

Example - normal

[
  {
    "_id": "12034567890123457890ABCD",
    "name": "IT Support queue",
    "number": "380",
    "dynamic": true,
    "member": true,
    "members": 7,
    "callers": 3,
    "serviceLevel": 60,
    "serviceLevelCritical": 300,
    "priority": 1
  },
  {
    ...
  }
]

Example - all = true

[
  {
    "_id": "12034567890123457890ABCD",
    "name": "IT Support queue",
    "number": "380",
    "dynamic": true,
    "member": true,
    "serviceLevel": 60,
    "serviceLevelCritical": 300,
    "priority": 1,
    "members": [
      {
        "_id": "12345678901234567890DADA",
        "extension": "1234567890124567890DBDB",
        "number": null,
        "priority": 1,
        "calls": 0,
        "lastCallEnded": null,
        "permanent": false
      },
      {
        ...
      }
    ],
    "callers": [
      {
        "_id": "46265y784.234-pbx1.telecomx.dk",
        "state": "QUEUED",
        "number": "+4535203040",
        "name": "Bamse & Kylling",
        "privacy": false,
        "entered": "2018-01-01T00:00:00.000Z",
        "answered": "2018-01-01T00:00:00.000Z",
        "presentation": "+4570305050",
        "answeredByExtension": null,
        "answeredByNumber": null
      },
      {
        ...
      }
    ]
  },
  {
    ...
  }
]

Errors

Error code Message Description
403 access_denied Insufficient access level
500 internal_error <Unspecified>
api/pbx/app/queues.txt · Last modified: 2025/11/17 08:15 by Per Møller

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki