api:pbx:extension:calleridnumbers
Table of Contents
API : PBX : Extension : Caller ID Numbers
Introduction
This request is used to get the phone numbers a user may select as caller ID when making outbound calls, besides the extension's own direct number: the numbers on PBX hovednumre (trunks) marked for sharing, the PBX default number, and the foreign numbers on the customer's hovednumre that the extension may present (see foreignNumbers on Trunk Update).
Request
| URL | https://api.telecomx.dk/pbx/extension/calleridnumbers | |
|---|---|---|
| Method | GET | |
| Access level | PERSONAL, VIEWER, MANAGER or OWNER if user belongs to the customer. RESELLER if customer belongs to the reseller. ADMIN. |
|
| Query | customer | [optional] Id of customer, defaults to users own customer. |
| extension | [optional] Id of the extension the list is for - its PBX group memberships decide which foreign numbers are included. Must be an extension of the customer; a PERSONAL user may only give their own (403 otherwise). Without it the requesting user's primary extension on the customer is used; with no extension at all only the foreign numbers of hovednumre without a group are included. |
|
| v2 | [optional] True for version 2 formatting with both number and name/username (if available). |
|
Query examples
https://api.telecomx.dk/pbx/extension/calleridnumbers?v2=true https://api.telecomx.dk/pbx/extension/calleridnumbers?customer=12345678901234567890ABCD https://api.telecomx.dk/pbx/extension/calleridnumbers?customer=12345678901234567890ABCD&extension=12345678901234567890DCBA&v2=true
Response
JSON Array of numbers.
Foreign numbers come last. In version 2 they carry type: 'FOREIGN' and are named by their description, else the name of the hovednummer they are listed on (other items have no type). A foreign number that is also a shared or default number is listed once, as the normal item.
Example - standard
[ '+4570305052', '+4570305050', '+4570305059' ]
Example - version 2
[ { number: '+4570305052', name: 'Finance department' }, { number: '+4570305050', name: 'Primary number' }, { number: '+4570305059', name: 'Support' }, { number: '+4722334455', name: 'Oslo office', type: 'FOREIGN' } ]
Errors
| Error code | Message | Description |
|---|---|---|
| 403 | access_denied | Insufficient access level |
| 404 | extension | Extension not found |
| 422 | extension | Invalid extension id |
| 500 | internal_error | <Unspecified> |
api/pbx/extension/calleridnumbers.txt · Last modified: by Telecom X AI