api:pbx:dial:get
Table of Contents
API : PBX : Dial item Get
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 will return a single dial item.
| URL | https://api.telecomx.dk/pbx/dial/DIAL_ID | |
|---|---|---|
| Method | GET | |
| Access level | VIEWER, MANAGER or OWNER if user belongs to the customer. RESELLER if customer belongs to the reseller. ADMIN. |
|
| Param | DIAL_ID | Id of the dial item (24 hex-char string) |
Query examples
https://api.telecomx.dk/pbx/dial/1234567890ABCDEF12345678
Response
| JSON object | ||
|---|---|---|
| _id | Id | Unique id of the dial item. |
| type | String | Always 'DIAL'. |
| customer | Id | Id of the customer the dial item belongs to. |
| 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 | ObjectID | 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
{ _id: '12345678901234567890ABCD', type: 'DIAL', customer: '1234567890123457890ADEF', 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 |
|---|---|---|
| 400 | bad_request | Id not found in requestURI |
| 404 | not_found | Dial not found |
| 403 | access_denied | Insufficient access level |
| 500 | internal_error | <Unspecified> |
api/pbx/dial/get.txt · Last modified: 2018/09/12 07:21 by Per Møller