Phone Types¶
Listing available phone types¶
-
GET
/api/v1/configs/phone_types/
¶ Return the list of all the phone types supported.
Example request:
GET /api/v1/configs/phone_types/ HTTP/1.1 Host: example.com Content-Type: "application/json" { "addCapabilities": true, "forMainDevice": true }
- Request JSON Object:
addCapabilities (boolean) – if set it will return also the capabilities (see Phone Type Capabilities) for each phone type.
_include_hidden (boolean) – if set it will return also the phone types that are supposed to not be exposed. It is an “_” attribute to indicate that this attribute should not be used in nomral circumstancies but only there for exceptional or APIO internal usage.
forMainDevice (boolean) – if set it will filter the response with devices that can be used as main devices. Mutual exclusive with forExtraDevice. Only value true has a meaning.
forExtraDevice (boolean) – if set it will filter the response with devices that can be used as extra devices. Mutual exclusive with forMainDevice. Only value true has a meaning.
Example response:
HTTP/1.1 200 OK Content-Type: "application/json" { "phoneTypes": [ { "technical_name": "Yealink-T40G", "display_name": "Yealink-T40G", "capabilities": { "phoneDefinition": { "needMac": 2, "needLogin": 0, "needHost": 0, "needPort": 0, "needSerialNumber": 1, "ports": 2, "isDECT": false }, "generic": { "disableLedVm": { "enabled": true, "type": "Boolean", "default": false, "level": "All" }, "disableLedMissed": { "enabled": false, "type": "Boolean", "default": false, "hidden": true, "level": "Device" } }, "groupGeneric": { "disableLedVm": { "enabled": true, "type": "Boolean", "level": "All" }, "sharedPassword": { "enabled": true, "type": "Password", "level": "Group" } }, "fastkeys": { "available_types": [ { "name": "DIRECT_CALL", "parameterType": "PhoneNumber", "labelRequired": true, "labelIgnored": false, }, { "name": "LINE", "parameterType": "Line" "labelRequired": false, "labelIgnored": false, }, { "name": "PHONEBOOK", "parameterType": null "labelRequired": false, "labelIgnored": true, }, { "name": "DND_ACTIVATION", "parameterType": null } ], "available_keys": [ { "id": "1", "fixed": true, "action": "LINE", "parameterType": "line", "parameter": "1", "label": "Line 1" }, { "id": "2", "fixed": true, "action": "DND_ACTIVATION", "parameterType": null, "parameter": "", "label": "DND Activation" }, { "id": "3", "fixed": false } ] }, "phoneProperties": { "brandName": "Yealink", "imageUrl": "www.foourl.be", "mainDevice": true, "extraDevice": true, } } } ] }
- Response JSON Object:
phoneTypes (array) – A list of phone types. See Phone Type Attributes.
- Status Codes:
200 OK – no error
Display phone type instance¶
-
GET
/api/v1/configs/phone_types/
(string: instance_name)/
¶ Retrieve information about the specified phone type instance.
Example request:
GET /api/v1/configs/phone_types/Yealink-T40G/ HTTP/1.1 Host: example.com
Example response:
HTTP/1.1 200 OK Content-Type: "application/json" { "technical_name": "Yealink-T40G", "display_name": "Yealink-T40G", "capabilities": { "phoneDefinition": { "needMac": 2, "needLogin": 0, "needHost": 0, "needPort": 0, "needSerialNumber": 1, "isDECT": false }, "generic": { "disableLedVm": { "enabled": true, "type": "Boolean", "default": false, "level": "All" }, "disableLedMissed": { "enabled": false, "type": "Boolean", "default": false, "hidden": true, "level": "Device" } }, "groupGeneric": { "disableLedVm": { "enabled": true, "type": "Boolean", "level": "All" }, "sharedPassword": { "enabled": true, "type": "Password", "level": "Group" } }, "fastkeys": { "available_types": [ { "name": "DIRECT_CALL", "parameterType": "PhoneNumber" }, { "name": "LINE", "parameterType": "Line" }, { "name": "PHONEBOOK", "parameterType": null }, { "name": "DND_ACTIVATION", "parameterType": null } ], "available_keys": [ { "id": "1", "fixed": true, "action": "LINE", "parameterType": "line", "parameter": "1", "label": "Line 1" }, { "id": "2", "fixed": true, "action": "DND_ACTIVATION", "parameterType": null, "parameter": "", "label": "DND Activation" }, { "id": "3", "fixed": false } ] }, "phoneProperties": { "brandName": "Yealink", "imageUrl": "www.foourl.be", "mainDevice": true, "extraDevice": true, } } }
- Response JSON Object:
technical_name (string) – It’s the technical name of the phone, it’s identifier.
display_name (string) – It’s a friendly name of the phone to be displayed.
capabilities (object) – Capabilities of the phone type. See Phone Type Capabilities.
vendor (object) – Phone Vendor Integration status for the phone type. See Phone Type Vendor (Limited info).
- Status Codes:
200 OK – no error
404 Not Found – the phone type is not found.
Listing available access gateway types¶
-
GET
/api/v1/configs/access_gateway_types/
¶ Return the list of all the access gateway types supported.
Example request:
GET /api/v1/configs/access_gateway_types/ HTTP/1.1 Host: example.com Content-Type: "application/json" { "addCapabilities": true }
- Request JSON Object:
addCapabilities (boolean) – if set it will return also the capabilities (see Phone Type Capabilities) for each access gateway type.
_include_hidden (boolean) – if set it will return also the access gateway types that are supposed to not be exposed. It is an “_” attribute to indicate that this attribute should not be used in nomral circumstancies but only there for exceptional or APIO internal usage.
Example response:
HTTP/1.1 200 OK Content-Type: "application/json" { "accessGatewayTypes": [ { "technical_name": "AudioCodes Mediant 1000-Trunk", "display_name": "AudioCodes Mediant 1000-Trunk", "capabilities": { "phoneDefinition": { "needMac": 2, "needLogin": 0, "needHost": 0, "needPort": 0, "needSerialNumber": 1, "isDECT": false } } } ] }
- Response JSON Object:
phoneTypes (array) – A list of access gateway types. See Phone Type Attributes.
- Status Codes:
200 OK – no error
Display access gateway type instance¶
-
GET
/api/v1/configs/access_gateway_types/
(string: instance_name)/
¶ Retrieve information about the specified access gateway type instance.
Example request:
GET /api/v1/configs/access_gateway_types/AudioCodes%20Mediant%201000-Trunk/ HTTP/1.1 Host: example.com
Example response:
HTTP/1.1 200 OK Content-Type: "application/json" { "technical_name": "AudioCodes Mediant 1000-Trunk", "display_name": "AudioCodes Mediant 1000-Trunk", "capabilities": { "phoneDefinition": { "needMac": 2, "needLogin": 0, "needHost": 0, "needPort": 0, "needSerialNumber": 1, "isDECT": false } } }
- Response JSON Object:
technical_name (string) – It’s the technical name of the access gateway, it’s identifier.
display_name (string) – It’s a friendly name of the access gateway to be displayed.
capabilities (object) – Capabilities of the access gateway type. See Phone Type Capabilities.
- Status Codes:
200 OK – no error
404 Not Found – the access gateway type is not found.
Phone Type Attributes¶
Name |
Type |
Method |
Description |
---|---|---|---|
GET |
|||
technicalName |
String |
A |
Name as in the Application Server of the phone type. |
displayName |
String |
A |
User friendly display name of the phone type. |
capabilities |
Object |
C |
Capabilities of the phone type. See Phone Type Capabilities. |
phoneProperties |
Object |
C |
Properties of the phone type. See Phone Type: Properties. |
vendor |
Object |
A |
Phone Vendor Provisioning information. See Phone Type Vendor (Limited info). |
Phone Type Vendor (Limited info)¶
This limited info is exposed in the the basic Phone Types APIs.
Name |
Type |
Method |
Description |
---|---|---|---|
GET |
|||
phoneVendor |
String / Null |
A |
Vendor of the phone type. Possible values: “Yealink, “Panasonic”, “Snom”, “Polycom”, “Grandstream”, “Cisco” |
deviceActivationCode |
String |
A |
Device Activation Code for this model (at Phone Vendor Server side) |
Phone Type Capabilities¶
Name |
Type |
Method |
Description |
---|---|---|---|
GET |
|||
phoneDefinition |
Object |
A |
Basic info about the phone type. See Phone Type: Phone Definition. |
generic |
Object |
A |
The generic capabilities of the phone. See Phone Type: Generic. |
groupGeneric |
Object |
A |
The generic capabilities of the phone type. See Phone Type: Group Generic. |
fastkeys |
Object |
A |
The definition of the fastkeys (phone buttons). See Phone Type: Fast keys. |
phoneProperties |
Object |
A |
The definition of the phoneProperties. See Phone Type: Properties. |
Phone Type: Properties¶
Name |
Type |
Method |
Description |
||
---|---|---|---|---|---|
GET |
POST |
PUT |
|||
brandName |
String |
A |
O |
O |
The name of the brand of the device. Set it to null (None) to remove the key entry. |
imageUrl |
String |
A |
O |
O |
The url for the device image. Set it to null (None) to remove the key entry. |
mainDevice |
String |
A |
O |
O |
Specify if the device can be used as main device. |
extraDevice |
String |
A |
O |
O |
Specify if the device can be used as extra device. |
Phone Type: Phone Definition¶
Name |
Type |
Method |
Description |
||
---|---|---|---|---|---|
GET |
POST |
PUT |
|||
needMac |
Integer |
A |
O |
O |
If needs a MAC address to be configured. Possible values 0:Forbidden, 1:Optional, 2:Mandatory. |
needLogin |
Integer |
A |
O |
O |
If needs username/password to be configured. Possible values 0:Forbidden, 1:Optional, 2:Mandatory. |
needHost |
Integer |
A |
O |
O |
If needs an host & port to be configured. Possible values 0:Forbidden, 1:Optional, 2:Mandatory. |
needPort |
Integer |
A |
O |
O |
If needs a device port/line to be configured. Possible values 0:Forbidden, 1:Optional, 2:Mandatory. |
needSerialNumber |
Integer |
A |
O |
O |
If needs a device serial number to be configured. Possible values 0:Forbidden, 1:Optional, 2:Mandatory. |
ports |
Integer |
A |
O |
O |
The number of ports of the device, provided only if defined. |
isDECT |
Boolean |
A |
O |
O |
Whether or not it is a DECT phone. |
Phone Type: Generic¶
The following generic capabilities are just examples to illustrate different usages.
The capabilities are fully project specific even if the ones presented below are quite common for IP phones.
Name |
Type |
Method |
Description |
---|---|---|---|
GET |
|||
disableLedVm |
Object |
O |
It’s a property of the phone. See Phone Type: Generic Attributes. |
disableLedMissed |
Object |
O |
It’s a property of the phone. See Phone Type: Generic Attributes. |
webPassword |
Object |
O |
It’s a property of the phone. See Phone Type: Generic Attributes. |
If you have the disableLedVm capability here are the data to provide as input:
{
"disableLedVm": true
}
If you have the disableLedMissed capability here are the data to provide as input:
{
"disableLedMissed": true
}
If you have the webPassword capability here are the data to provide as input:
{
"webPassword": "ChangeMe"
}
Phone Type: Generic Attributes¶
Name |
Type |
Method |
Description |
---|---|---|---|
GET |
|||
enabled |
Boolean |
A |
If the property is enabled or not. |
type |
String |
A |
The type of the property. Possible values “Boolean”, “String”, “Integer”, “Password”. If “Password” an empty string will be returned if the Tag is present. |
default |
Boolean |
O |
It’s the default value of that property. During creation if the property is not provided in the data and the enabled flag is True, than the default value is used. It is only relevant for Boolean fields at Device level . |
hidden |
Boolean |
O |
This property shoud not be displayed. Default is False |
level |
String |
A |
The level(s) where the attribute is exposed. “Device”, “Group”, “All”. It allows knowing if the attribute is for one level only or for all levels. |
Phone Type: Group Generic¶
The Group Generic attributes are attributes that are defined for a Phone Type at Group level. Meaning that they will be available for all Devices of that Type in that Group.
Except for that it is exactly the same principle as the Generic ones (at Device level) therefore it is not explained a second time.
Phone Type: Fast keys¶
Name |
Type |
Method |
Description |
---|---|---|---|
GET |
|||
available_types |
Array |
A |
List of all available types for the actions supported by the phone. See Phone Type: Fast keys - Available Types. |
available_keys |
Array |
A |
List of all the available keys for the phone. See Phone Type: Fast keys - Available Keys. |
Phone Type: Fast keys - Available Types¶
Name |
Type |
Method |
Description |
---|---|---|---|
GET |
|||
name |
String |
A |
The name of the action. |
parameterType |
String |
A |
The type of the parameter for the action. Possible values “PhoneNumber”, “Line”, null. If null, no parameter must be provided. If “PhoneNumber, a phone number or an extension must be provided. If “Line, a line id (integer value) must be provided. |
labelRequired |
Boolean |
A |
If true it is mandatory to provide a label when configuring a key with that action |
labelIgnored |
Boolean |
A |
If true, a label can be provided but it is not guaranteed that the phone will display it. |
Phone Type: Fast keys - Available Keys¶
Name |
Type |
Method |
Description |
---|---|---|---|
GET |
|||
id |
String |
A |
It’s the phone key to be configured. |
fixed |
Boolean |
A |
Defines if the phone key can be configured or not. |
action |
String |
C |
The name of the action. This field is only present if the phone key is fixed. |
parameterType |
String |
C |
The type of the parameter for the action. Possible values “phone_number”, “line”, null. This field is only present if the phone key is fixed. |
parameter |
String |
C |
The parameter associated to the action. This field is only present if the phone key is fixed. |
label |
String |
C |
The label to display on the phone. This field is only present if the phone key is fixed. |