User Tools

Site Tools


api:pbx:dialplan:list

API : PBX : Dialplan list

Introduction

Dialplans are built up of different types of dialplan items such as extensions, queues, trunks etc.

Request

This request returns a list of dialplan items regardless of their type.

URL https://api.telecomx.dk/pbx/dialplan
Method GET
Access level VIEWER, MANAGE, OWNER if item belongs to the customer, RESELLER if customer belongs to the reseller or ADMIN.
Query offset [optional] Index of the first item to return, default 0.
limit [optional] The number of items to return, default 50, min 1, max 100.
filter [optional] Search query that will match against searchable fields.
type [optional] Type of dialplan items to return: EXTENSION, TRUNK, CONFERENCE, DIAL, DISA, PLAYBACK, QUEUE, SET_VALUE, MENU_ROUTER, TIME_ROUTER, URL_ROUTER, VALUE_ROUTER, GROUP.
customer [optional] Id of customer to show items for. Defaults to the users own customer if not specified.
excludeNoNumber [optional] True to exclude items which has no number.
full [optional] True to include full data for each item.

Query examples

https://api.telecomx.dk/pbx/dialplan
https://api.telecomx.dk/pbx/dialplan?customer=123458789012457890ABCD
https://api.telecomx.dk/pbx/dialplan?filter=supporters
https://api.telecomx.dk/pbx/dialplan?full=true&limit=5000

Response

JSON object
offset Index of the first item returned.
limit Number of items to return. Note that the actual number of returned items may be lower.
total Number of items that can be returned when offset and limit is not considered. This is to be used for paging through the data.
dialplanItems Array of dialplan items, see definition below.
Dialplan object (normal)
_id Id Unique id of the dialplan item.
type String Type of item:
EXTENSION - a local extension
TRUNK - entry point for inbound calls
CONFERENCE - a conference room where multiple parties can talk
DIAL - dial a destination
DISA - callback/dialtone
PLAYBACK - play an audio file
QUEUE - queue
SET_VALUE - sets a value
MENU_ROUTER - route based on menu selection
TIME_ROUTER - route based on date/time
URL_ROUTER - route based on URL call reply
VALUE_ROUTER - route based on a value
GROUP - a group of extensions that can be controlled and called.
name String Item name.
number String The phone number to dial to reach this item, null if it is not dial-able.
redirect String Number to redirect to when execution starts. Used to quickly circumvent the item, e.g. redirect to a mobile.
notes String Notes about the item.
product ObjectID Id of product. Only given for extensions.
employee ObjectID Id of who the extension belongs to. Only given for extensions

Example - normal

{
  offset: 0,
  limit: 50,
  total: 25,
  dialplanItems: [
    {
      _id: '1234567890123457890ABCD',
      type: 'QUEUE',
      name: 'VIP Support',
      number: '888',
      redirect: null,
      notes: 'Primary support queue'
    },
    {
      ...
    }
  ]

Errors

Error code Message Description
403 access_denied Insufficient access level
500 internal_error <Unspecified>
api/pbx/dialplan/list.txt · Last modified: 2024/11/25 13:06 by Joakim Andersen

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki