User Tools

Site Tools


api:pbx:queue:calls

API : PBX : Queue Calls

Introduction

A Queue item is a dialplan call distribution entity with advanced features for members and callers.

Request

This request returns a list of calls processed by a queue.

URL https://api.telecomx.dk/pbx/queue/QUEUE_ID/calls
Method GET
Access level PERSONAL if user has access to the queue
VIEWER, MANAGE, OWNER if queue items belongs to the customer
RESELLER if customer belongs to the reseller
ADMIN.
Params QUEUE_ID Id Id of queue to show callers in.
Query from Date From date/time, defaults to start of today.
to Date To date/time, defaults to end of today.
status String Optional status filter: NO_MEMBERS, ALL_BUSY, TIMEOUT, ANSWERED, CANCELLED. Can be negated by prefixing with !.
reverse Boolean True to list newest calls first.
offset Number Index of first item to return, default 0.
limit Number Max. number of items to return, min 1, max. 500, default 50.

Query examples

https://api.telecomx.dk/pbx/queue/123458789012457890ABCD/calls?status=!ANSWERED&reverse=true&limit=25

Response

JSON object
offset Number Index of first item returned.
limit Number Number of items returned at most.
total Number Max number of items that can be returned.
calls[]._id Id Unique id of the record.
calls[].queue Id Id of the queue.
calls[].pbxServer String IP address of the PBX server that handled the call.
calls[].callId String Call-ID of caller.
calls[].aNumber String Callers number.
calls[].aNumberName String Callers name - if available.
calls[].entered Date Date and time when the caller entered the queue.
calls[].answered Date Date and time when the caller was answered (or called back).
calls[].ended Date Date and time when the call ended.
calls[].status String How the call ended: NO_MEMBERS, ALL_BUSY, TIMEOUT, ANSWERED, CANCELLED.
calls[].answeredByExtension Id Extension id of member who answered the call.
calls[].answeredByExtensionName String Name of member, if extension answered the call.
calls[].answeredByNumber String Phone number of member who answered the call.

Example

{
  offset: 0,
  limit: 25,
  total: 130,
  calls: [
    {
      _id: '12345678901234567890ABCD',
      queue: '12345678901234567890AAAA',
      pbxServer: 'pbx2.telecomx.dk',
      callId: '38dg38eyu3gdbjx8ehic',
      aNumber: '+4570305050',
      aNumberName: 'Telecom X',
      entered: '2021-01-01T00:00:00.000Z',
      answered: '2021-01-01T00:00:00.000Z',
      ended: '2021-01-01T00:00:00.000Z',
      status: 'ANSWERED',
      answeredByExtension: '12345678901234567890BBBB',
      answeredByExtensionName: 'Hans Hansen',
      answeredByNumber: null
    }
  ]
}

Errors

Error code Message Description
404 id Queue not found
403 access_denied Insufficient access level
500 internal_error <Unspecified>
api/pbx/queue/calls.txt · Last modified: 2021/11/22 13:34 by Per Møller

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki