User Tools

Site Tools


api:pbx:dial:list

API : PBX : Dial items list

Introduction

A Dial item is a dialplan terminator that end with dialing a phone number. The number can be the number the originating caller called, it can be a fixed predefined number or it can be a number stored in a variable.

Request

This request returns a list of all of the customers dial items.

URL https://api.telecomx.dk/pbx/dial
Method GET
Access level VIEWER, MANAGE, OWNER if dial items 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.
full [optional] True to include all settings.
customer [optional] Id of customer to show dial items for. Defaults to the users own customer if not specified.
sort [optional] Which property to sort result by: number (default), name, redirect.

Query examples

https://api.telecomx.dk/pbx/dial
https://api.telecomx.dk/pbx/dial?customer=123458789012457890ABCD
https://api.telecomx.dk/pbx/dial?customer=123458789012457890ABCD&limit=20&offset=100
https://api.telecomx.dk/pbx/dial?filter=donald
https://api.telecomx.dk/pbx/dial?customer=12345678901234567890ABCD&full=true

Response

JSON object
offset Index of the first dial item returned.
limit Number of dial item to return. Note that the actual number of returned items may be lower.
total Number of dial items that can be returned when offset and limit is not considered. This is to be used for paging through the data.
dials Array of dial items, see definition below.
Dial object (normal)
_id Id Unique id of the dial item.
name String Name/description of the dial item.
number String The phone number to dial to reach this dial item, null if it is not dial-able.
redirect String Number to redirect to when execution starts. Used to quickly circumvent the dial item.
notes String Notes about the dial item.
method String Method used to dial:
CALLED - the called number.
PREDEFINED - a fixed predefined number.
CALL_VARIABLE - the number stored in the named call variable.
VARIABLE - the number stored in the named system variable.
Dial object (full=true)
_id Id Unique id of the dial item.
type String Always 'DIAL'.
name String Name/description of the dial item.
number String The phone number to dial to reach this dial item locally, null if it is not dial-able.
startAudio Id A sound item to playback when the dial item is entered, null if not used.
redirect String Number to redirect to when execution starts. Used to quickly circumvent the dial item.
notes String Notes about the dial item.
method String Method used to dial:
CALLED - the called number.
PREDEFINED - A fixed predefined number.
CALL_VARIABLE - number stored in given call variable.
VARIABLE - number stored in PBX wide variable.
value String Number data when method is PREDEFINED, CALL_VARIABLE or VARIABLE.
PREDEFINED - this is the phone number to dial, in E.164 format.
CALL_VARIABLE - this is the name of the call variable that holds the phone number to dial.
VARIABLE - this is the name of the system variable that holds the phone number to dial.
callerId String What caller number (a-number) to present:
ASIS - no change (default).
NUMBER - the number specified in callerId.
SECRET - no number, call is marked at secret.
callerIdNumber String Number to present if callerId is NUMBER).
ringtone Id If music on hold is to be played to the caller instead of a standard ringtone, this is the id of the PbxMusicOnHold item, otherwise null to use regular ringtone.

Example - normal

{
  offset: 0,
  limit: 50,
  total: 25,
  dials: [
    {
      _id: '12345678901234567890ABCD',
      name: 'Room service staff dial out',
      number: '800',
      redirect: null,
      notes: 'Used when staff dials out to ensure correct presentation',
      method: 'CALLED'
    },
    {
      ...
    }
  ]

Example - full=true

{
  offset: 0,
  limit: 50,
  total: 25,
  dials: [
    {
      _id: '12345678901234567890ABCD',
      type: 'DIAL',
      name: 'Support night mode dial out',
      number: '800',
      startAudio: null,
      redirect: null,
      notes: 'Used to call support staff during night based on external lookup result',
      method: 'CALL_VARIABLE',
      value: 'on_duty_support_number',
      callerId: 'NUMBER',
      callerIdNumber: '+4570305050',
      ringtone: '12345678901234567890ABCD'
    },
    {
      ...
    }
  ]

Errors

Error code Message Description
403 access_denied Insufficient access level
500 internal_error <Unspecified>
api/pbx/dial/list.txt · Last modified: 2019/05/23 12:52 by Per Møller

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki