api:pbx:dialplan:lookup
Table of Contents
API : PBX : Dialplan Lookup
Introduction
This request is used to lookup available type and name information about a list of numbers.
This can be used to find out if a number is valid for a certain purpose.
Request
| URL | https://api.telecomx.dk/pbx/dialplan/lookup | ||
|---|---|---|---|
| Method | GET, POST | ||
| Access level | VIEWER, MANAGER or OWNER if user belongs to the customer. RESELLER if customer belongs to the reseller. ADMIN. |
||
| Query/Body | customer | Id | Id of customer to make the lookup for (24 char hex). |
| numbers | Array | List of numbers to lookup. Can be local and/or public. Public numbers that are not following E.164 formatting will be reformatted. | |
| unique | Boolean | True to filter the result, so that if multiple numbers points to the same dialplan item, only the first is included. And if the same numbe occurs multiple times, only the first is included. | |
Query example - GET
https://api.telecomx.dk/pbx/dialplan/lookup?customer=12345678901234567890ABCD&numbers[]=592&numbers[]=7191998&numbers[]=352303040
Query example - POST
{ numbers: [ '592', '71919998', '35203040' ], customer: '1234567890123456780ABCD', unique: true }
Response
Array of JSON objects.
| JSON object | ||
|---|---|---|
| number | String | |
| _id | Id | Id of dialplan item - if found to be a dialplan item. |
| type | String | Type of item: INVALID - item does not hold a valid number EXTERNAL - number is an external number 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 | Name of the item - users name, items name or name from the phonebook. |
Example
[ { number: '200' _id: '12345678901234567890ABCD', type: 'EXTENSION', name: 'Donald Duck' }, { number: '+4571919998', type: 'EXTERNAL', name: 'Business and Co.' }, { number: '373ggg', type: 'INVALID' ]
Errors
| Error code | Message | Description |
|---|---|---|
| 400 | customer | Customer not found |
| 403 | access_denied | Insufficient access level |
| 500 | internal_error | <Unspecified> |
api/pbx/dialplan/lookup.txt · Last modified: 2019/05/23 06:21 by Per Møller