Phone Types Management¶
Listing available phone types¶
-
GET
/api/v1/configs_mngt/phone_types/
¶ Return the list of all the phone types supported.
Example request:
GET /api/v1/configs_mngt/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": [ { "technicalName": "Yealink-T0G", "displayName": "Yealink-T0G", "vendor": { "phoneVendor": None, "phonVendorModel": "", "targetUrl": "", "useRedirect": false, }, "capabilities": { "phoneDefinition": { "needMac": 2, "needLogin": 0, "needHost": 0, "needPort": 0, "needSerialNumber": 1, "isDECT": false, }, "phoneProperties": { "brandName": None, "imageUrl": None, "mainDevice": True, "extraDevice": True, }, }, "addData": {}, "phoneButtons": { "MANAGED_KEYS": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], "ACTIONS": [ "DIRECT_CALL", "BLF", "BLF_CP", "BLF_CALL", "BLF_CP_CALL", "DND_TOGGLE", "LINE", "CF_ACTIVATION_WITH_NUMBER", "CF_DEACTIVATION", "CALL_PICKUP" ], "TAGS": { "ACTION": "%FLEX_KEY_ACT_{}%", "PARAM": "%FLEX_KEY_ARG_{}%", "PARAM_2": "%FLEX_KEY_ARG2_{}%", "LABEL": "%FLEX_KEY_LABEL_{}%", "COMBINED": "%LINE_FUNCTION-{}%", "CALCULATED_1": "%PLK-{}%" }, "CONSTRAINTS": { "MAX_LABEL": 99, "MAX_ARG": 99, "MAX_PHONE_NUMB": 99, "ALLOWED_LINE_ID": [1, 2, 3, 4, 5, 6] }, "PHONE_NUMBER_REQUIRED": [ "DIRECT_CALL", "BLF", "BLF_CP", "BLF_CALL", "BLF_CP_CALL" ], "LINE_ID_REQUIRED": ["LINE"], "LABEL_REQUIRED": ["DIRECT_CALL"], "PARAMETER_2_DEFAULT": { "DIRECT_CALL": "1" }, "CALCULATED_1_MODE": "CISCO", "ACTIONS_NOT_FOR_FREE_KEYS": ["LINE"], "DIRECT_CALL_ACTION": "DIRECT_CALL", "APIO_ACTIONS_VALUES": { "CF_ACTIVATION_WITH_NUMBER": {"shortCode": "*72{}", "needNumber": True}, "CF_DEACTIVATION": {"shortCode": "*73", "needNumber": False}, "CALL_PICKUP": {"shortCode": "*98", "needNumber": False} }, "BLF": { "MANAGE": True, "BUILD": False }, "BLF_ACTIONS": [ "BLF", "BLF_CP", "BLF_CALL", "BLF_CP_CALL" ], "LINE_ACTIONS": ["LINE"], "FORCED_KEYS": {"1": ["LINE", "1", ""]}, "VENDOR_ACTIONS": { "DIRECT_CALL": "sd", "BLF": "blf", "BLF_CP": "blf+cp", "BLF_CALL": "blf+spd", "BLF_CP_CALL": "blf+cp+spd", "DND_TOGGLE":"dnd" }, "COMBINED_RULES": { "DIRECT_CALL": "fnc=%FLEX_KEY_ACT_{}%;ext=%FLEX_KEY_ARG_{}%@$PROXY;nme=%FLEX_KEY_LABEL_{}%", "BLF": ["fnc=%FLEX_KEY_ACT_{}%;sub=%BLF_URI%;usr=%BLF_USER%;nme=%FLEX_KEY_LABEL_{}%", "fnc=%FLEX_KEY_ACT_{}%;sub=%BLF_URI%;usr=%BLF_USER%"], "BLF_CP": ["fnc=%FLEX_KEY_ACT_{}%;sub=%BLF_URI%;usr=%BLF_USER%;nme=%FLEX_KEY_LABEL_{}%", "fnc=%FLEX_KEY_ACT_{}%;sub=%BLF_URI%;usr=%BLF_USER%"], "BLF_CALL": ["fnc=%FLEX_KEY_ACT_{}%;sub=%BLF_URI%;usr=%BLF_USER%;nme=%FLEX_KEY_LABEL_{}%", "fnc=%FLEX_KEY_ACT_{}%;sub=%BLF_URI%;usr=%BLF_USER%"], "BLF_CP_CALL": ["fnc=%FLEX_KEY_ACT_{}%;sub=%BLF_URI%;usr=%BLF_USER%;nme=%FLEX_KEY_LABEL_{}%", "fnc=%FLEX_KEY_ACT_{}%;sub=%BLF_URI%;usr=%BLF_USER%"], "DND_TOGGLE": ["fnc=%FLEX_KEY_ACT_{}%;nme=%FLEX_KEY_LABEL_{}%", "fnc=%FLEX_KEY_ACT_{}%"] } } } ] }
- Response JSON Object:
phoneTypes (array) – A list of phone types. See Phone Type Attributes.
technicalName (string) – It’s the technical name of the phone, it’s identifier.
displayName (string) – It’s a friendly name of the phone to be displayed.
vendor (object) – vendor detail of the phone type. See Phone Type - Phone Vendor.
addData – Additional data in JSON format. See Phone Type Extra Capabilities Concept.
phoneButtons – Phone Buttons data in JSON format. See Phone Type Phone Buttons.
- Status Codes:
200 OK – no error
Display phone type instance¶
-
GET
/api/v1/configs_mngt/phone_types/
(string: instance_name)/
¶ Retrieve information about the specified phone type instance.
Example request:
GET /api/v1/configs_mngt/phone_types/Yealink-T40G/ HTTP/1.1 Host: example.com
Example response:
HTTP/1.1 200 OK Content-Type: "application/json" { "technicalName": "Yealink-T40G", "displayName": "Yealink-T40G", "vendor": { "phoneVendor" : "Yealink", "phoneVendorModel": "edge 40", "targetUrl" : "http://myhome.it", "useRedirect" : false, }, "capabilities": { "phoneDefinition": { "needMac": 2, "needLogin": 0, "needHost": 0, "needPort": 0, "needSerialNumber": 1, "isDECT": false }, "phoneProperties": { "brandName": "Yealink", "imageUrl": "http://www.foourl.be/img.jpg", "mainDevice": true, "extraDevice": true, } } }
- Response JSON Object:
technicalName (string) – It’s the technical name of the phone, it’s identifier.
displayName (string) – It’s a friendly name of the phone to be displayed.
vendor (object) – vendor detail of the phone type. See Phone Type - Phone Vendor.
capabilities (object) – Definition and Properties of the phone type. See Phone Type: Phone Definition and See Phone Type: Properties.
addData – Additional data in JSON format. See Phone Type Extra Capabilities Concept.
phoneButtons – Phone Buttons data in JSON format. See Phone Type Phone Buttons.
- Status Codes:
200 OK – no error
404 Not Found – the phone type is not found.
Create a new phone type¶
-
POST
/api/v1/configs_mngt/phone_types/
¶ Creates a new phone type.
Authorization Right: System Admin.
Example request:
HTTP/1.1 200 OK Content-Type: "application/json" { "technicalName": "Yealink-T40G", "displayName": "Yealink-T40G", "vendor": { "phoneVendor" : "Yealink", "phoneVendorModel": "edge 40", "targetUrl" : "http://myhome.it", "useRedirect" : false, }, "capabilities": { "phoneDefinition": { "needMac": 2, "needLogin": 0, "needHost": 0, "needPort": 0, "needSerialNumber": 1, "isDECT": false }, "phoneProperties": { "brandName": "Yealink", "imageUrl": "http://www.foourl.be/img.jpg", "mainDevice": true, "extraDevice": true, }, }, "addData": { "hiddenParam": { "enabled": true, "type": "String", "hidden": true }, "TAGS": { "hiddenParam": "%HIDDEN_PARAM%" } }, "phoneButtons": { "MANAGED_KEYS": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], "ACTIONS": [ "DIRECT_CALL", "BLF", "BLF_CP", "BLF_CALL", "BLF_CP_CALL", "DND_TOGGLE", "LINE", "CF_ACTIVATION_WITH_NUMBER", "CF_DEACTIVATION", "CALL_PICKUP" ], "TAGS": { "ACTION": "%FLEX_KEY_ACT_{}%", "PARAM": "%FLEX_KEY_ARG_{}%", "PARAM_2": "%FLEX_KEY_ARG2_{}%", "LABEL": "%FLEX_KEY_LABEL_{}%", "COMBINED": "%LINE_FUNCTION-{}%", "CALCULATED_1": "%PLK-{}%" }, "CONSTRAINTS": { "MAX_LABEL": 99, "MAX_ARG": 99, "MAX_PHONE_NUMB": 99, "ALLOWED_LINE_ID": [1, 2, 3, 4, 5, 6] }, "PHONE_NUMBER_REQUIRED": [ "DIRECT_CALL", "BLF", "BLF_CP", "BLF_CALL", "BLF_CP_CALL" ], "LINE_ID_REQUIRED": ["LINE"], "LABEL_REQUIRED": ["DIRECT_CALL"], "PARAMETER_2_DEFAULT": { "DIRECT_CALL": "1" }, "CALCULATED_1_MODE": "CISCO", "ACTIONS_NOT_FOR_FREE_KEYS": ["LINE"], "DIRECT_CALL_ACTION": "DIRECT_CALL", "APIO_ACTIONS_VALUES": { "CF_ACTIVATION_WITH_NUMBER": {"shortCode": "*72{}", "needNumber": True}, "CF_DEACTIVATION": {"shortCode": "*73", "needNumber": False}, "CALL_PICKUP": {"shortCode": "*98", "needNumber": False} }, "BLF": { "MANAGE": True, "BUILD": False }, "BLF_ACTIONS": [ "BLF", "BLF_CP", "BLF_CALL", "BLF_CP_CALL" ], "LINE_ACTIONS": ["LINE"], "FORCED_KEYS": {"1": ["LINE", "1", ""]}, "VENDOR_ACTIONS": { "DIRECT_CALL": "sd", "BLF": "blf", "BLF_CP": "blf+cp", "BLF_CALL": "blf+spd", "BLF_CP_CALL": "blf+cp+spd", "DND_TOGGLE":"dnd" }, "COMBINED_RULES": { "DIRECT_CALL": "fnc=%FLEX_KEY_ACT_{}%;ext=%FLEX_KEY_ARG_{}%@$PROXY;nme=%FLEX_KEY_LABEL_{}%", "BLF": ["fnc=%FLEX_KEY_ACT_{}%;sub=%BLF_URI%;usr=%BLF_USER%;nme=%FLEX_KEY_LABEL_{}%", "fnc=%FLEX_KEY_ACT_{}%;sub=%BLF_URI%;usr=%BLF_USER%"], "BLF_CP": ["fnc=%FLEX_KEY_ACT_{}%;sub=%BLF_URI%;usr=%BLF_USER%;nme=%FLEX_KEY_LABEL_{}%", "fnc=%FLEX_KEY_ACT_{}%;sub=%BLF_URI%;usr=%BLF_USER%"], "BLF_CALL": ["fnc=%FLEX_KEY_ACT_{}%;sub=%BLF_URI%;usr=%BLF_USER%;nme=%FLEX_KEY_LABEL_{}%", "fnc=%FLEX_KEY_ACT_{}%;sub=%BLF_URI%;usr=%BLF_USER%"], "BLF_CP_CALL": ["fnc=%FLEX_KEY_ACT_{}%;sub=%BLF_URI%;usr=%BLF_USER%;nme=%FLEX_KEY_LABEL_{}%", "fnc=%FLEX_KEY_ACT_{}%;sub=%BLF_URI%;usr=%BLF_USER%"], "DND_TOGGLE": ["fnc=%FLEX_KEY_ACT_{}%;nme=%FLEX_KEY_LABEL_{}%", "fnc=%FLEX_KEY_ACT_{}%"] } } }
- Request JSON Object:
technicalName (string) – It’s the technical name of the phone, it’s identifier.
displayName (string) – It’s a friendly name of the phone to be displayed.
vendor (object) – vendor detail of the phone type. See Phone Type - Phone Vendor.
capabilities (object) – Definition and Properties of the phone type. See Phone Type: Phone Definition and See Phone Type: Properties.
addData – Additional data in JSON format. See Phone Type Extra Capabilities Concept.
phoneButtons – Phone Buttons data in JSON format. See Phone Type Phone Buttons.
Example response:
HTTP/1.1 200 OK Content-Type: "application/json" { "technical_name": "Yealink-T40G", "display_name": "Yealink-T40G", "vendor": { "phoneVendor" : "Yealink", "phoneVendorModel": "edge 40", "targetUrl" : "http://myhome.it", "useRedirect" : false, }, "capabilities": { "phoneDefinition": { "needMac": 2, "needLogin": 0, "needHost": 0, "needPort": 0, "needSerialNumber": 1, "isDECT": false }, "phoneProperties": { "brandName": "Yealink", "imageUrl": "http://www.foourl.be/img.jpg", "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.
vendor (object) – vendor detail of the phone type. See Phone Type - Phone Vendor.
capabilities (object) – Definition and Properties of the phone type. See Phone Type: Phone Definition and See Phone Type: Properties.
addData – Additional data in JSON format. See Phone Type Extra Capabilities Concept.
phoneButtons – Phone Buttons data in JSON format. See Phone Type Phone Buttons.
- Status Codes:
200 OK – no error.
400 Bad Request – format of the JSON input data not valid or phone type already exists.
Modify an existing phone type¶
-
PUT
/api/v1/configs_mngt/phone_types/
(string: phone_type)/
¶ Modifies an existing phone type.
Authorization Right: System Admin.
Example request:
PUT /api/v1/configs_mngt/phone_types/Yealink-T40G/ HTTP/1.1 Host: example.com Content-Type: "application/json" { "display_name": "Yealink-T40G", "vendor": { "phoneVendor" : "Snom", }, "capabilities": { "phoneDefinition": { "needMac": 2, "needLogin": 0, }, "phoneProperties": { "imageUrl": "http://www.foourl.be/img.jpg", }, }, "addData": { "hiddenParam": { "enabled": false, "type": "String", "hidden": true }, "TAGS": { "hiddenParam": "%HIDDEN_PARAM%" } }, "phoneButtons": { "MANAGED_KEYS": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], "ACTIONS": [ "DIRECT_CALL", "BLF", "BLF_CP", "BLF_CALL", "BLF_CP_CALL", "DND_TOGGLE", "LINE", "CF_ACTIVATION_WITH_NUMBER", "CF_DEACTIVATION", "CALL_PICKUP" ], "TAGS": { "ACTION": "%FLEX_KEY_ACT_{}%", "PARAM": "%FLEX_KEY_ARG_{}%", "PARAM_2": "%FLEX_KEY_ARG2_{}%", "LABEL": "%FLEX_KEY_LABEL_{}%", "COMBINED": "%LINE_FUNCTION-{}%", "CALCULATED_1": "%PLK-{}%" }, "CONSTRAINTS": { "MAX_LABEL": 99, "MAX_ARG": 99, "MAX_PHONE_NUMB": 99, "ALLOWED_LINE_ID": [1, 2, 3, 4, 5, 6] }, "PHONE_NUMBER_REQUIRED": [ "DIRECT_CALL", "BLF", "BLF_CP", "BLF_CALL", "BLF_CP_CALL" ], "LINE_ID_REQUIRED": ["LINE"], "LABEL_REQUIRED": ["DIRECT_CALL"], "PARAMETER_2_DEFAULT": { "DIRECT_CALL": "1" }, "CALCULATED_1_MODE": "CISCO", "ACTIONS_NOT_FOR_FREE_KEYS": ["LINE"], "DIRECT_CALL_ACTION": "DIRECT_CALL", "APIO_ACTIONS_VALUES": { "CF_ACTIVATION_WITH_NUMBER": {"shortCode": "*72{}", "needNumber": True}, "CF_DEACTIVATION": {"shortCode": "*73", "needNumber": False}, "CALL_PICKUP": {"shortCode": "*98", "needNumber": False} }, "BLF": { "MANAGE": True, "BUILD": False }, "BLF_ACTIONS": [ "BLF", "BLF_CP", "BLF_CALL", "BLF_CP_CALL" ], "LINE_ACTIONS": ["LINE"], "FORCED_KEYS": {"1": ["LINE", "1", ""]}, "VENDOR_ACTIONS": { "DIRECT_CALL": "sd", "BLF": "blf", "BLF_CP": "blf+cp", "BLF_CALL": "blf+spd", "BLF_CP_CALL": "blf+cp+spd", "DND_TOGGLE":"dnd" }, "COMBINED_RULES": { "DIRECT_CALL": "fnc=%FLEX_KEY_ACT_{}%;ext=%FLEX_KEY_ARG_{}%@$PROXY;nme=%FLEX_KEY_LABEL_{}%", "BLF": ["fnc=%FLEX_KEY_ACT_{}%;sub=%BLF_URI%;usr=%BLF_USER%;nme=%FLEX_KEY_LABEL_{}%", "fnc=%FLEX_KEY_ACT_{}%;sub=%BLF_URI%;usr=%BLF_USER%"], "BLF_CP": ["fnc=%FLEX_KEY_ACT_{}%;sub=%BLF_URI%;usr=%BLF_USER%;nme=%FLEX_KEY_LABEL_{}%", "fnc=%FLEX_KEY_ACT_{}%;sub=%BLF_URI%;usr=%BLF_USER%"], "BLF_CALL": ["fnc=%FLEX_KEY_ACT_{}%;sub=%BLF_URI%;usr=%BLF_USER%;nme=%FLEX_KEY_LABEL_{}%", "fnc=%FLEX_KEY_ACT_{}%;sub=%BLF_URI%;usr=%BLF_USER%"], "BLF_CP_CALL": ["fnc=%FLEX_KEY_ACT_{}%;sub=%BLF_URI%;usr=%BLF_USER%;nme=%FLEX_KEY_LABEL_{}%", "fnc=%FLEX_KEY_ACT_{}%;sub=%BLF_URI%;usr=%BLF_USER%"], "DND_TOGGLE": ["fnc=%FLEX_KEY_ACT_{}%;nme=%FLEX_KEY_LABEL_{}%", "fnc=%FLEX_KEY_ACT_{}%"] } } }
- Request JSON Object:
displayName (string) – It’s a friendly name of the phone to be displayed.
vendor (object) – vendor detail of the phone type. See Phone Type - Phone Vendor.
capabilities (object) – Definition and Properties of the phone type. See Phone Type: Phone Definition and See Phone Type: Properties.
addData – Additional data in JSON format. If the element “addData” is present it will full replace the existing values. No partial update. See Phone Type Extra Capabilities Concept. Set it to null (None) to remove the key entry.
phoneButtons – Phone Buttons data in JSON format. See Phone Type Phone Buttons. If the element “phoneButtons” is present it will full replace the existing values. No partial update.
Example response:
HTTP/1.1 200 OK Content-Type: "application/json" { "technical_name": "Yealink-T40G", "display_name": "Yealink-T40G", "vendor": { "phoneVendor" : "Yealink", "phoneVendorModel": "edge 40", "targetUrl" : "http://myhome.it", "useRedirect" : false, "deviceActivationCode": "" }, "capabilities": { "phoneDefinition": { "needMac": 2, "needLogin": 0, "needHost": 0, "needPort": 0, "needSerialNumber": 1, "isDECT": false }, "phoneProperties": { "brandName": "Yealink", "imageUrl": "http://www.foourl.be/img.jpg", "mainDevice": true, "extraDevice": true } }, "addData": { "hiddenParam": { "enabled": false, "type": "String", "hidden": true }, "TAGS": { "hiddenParam": "%HIDDEN_PARAM%" } } }
- Response JSON Object:
technicalName (string) – It’s the technical name of the phone, it’s identifier.
displayName (string) – It’s a friendly name of the phone to be displayed.
vendor (object) – vendor detail of the phone type. See Phone Type - Phone Vendor.
capabilities (object) – Definition and Properties of the phone type. See Phone Type: Phone Definition and See Phone Type: Properties.
addData – Additional data in JSON format. See Phone Type Extra Capabilities Concept.
phoneButtons – Phone Buttons data in JSON format. See Phone Type Phone Buttons.
- Status Codes:
200 OK – no error.
400 Bad Request – format of the JSON input data not valid.
404 Not Found – no matching phone type could be found.
Delete a phone type¶
-
DELETE
/api/v1/configs_mngt/phone_types/
(string: phone_type)/
¶ Delete an existing phone type.
Authorization Right: System Admin.
Example request:
DELETE /api/v1/configs_mngt/phone_types/Yealink-T40G/ HTTP/1.1 Host: example.com
Example response:
HTTP/1.1 200 OK Content-Type: "application/json" {}
- Status Codes:
200 OK – no error.
404 Not Found – no matching object could be found.
Phone Type - Phone Vendor¶
The information configurable here are more detailed than in Phone Type Vendor (Limited info) as it contains also the configuration information for the internal logic of the APIO.
Name |
Type |
Method |
Description |
||
---|---|---|---|---|---|
GET |
POST |
PUT |
|||
phoneVendor |
String / Null |
A |
O |
O |
Vendor of the phone type. Possible values: “Yealink, “Panasonic”, “Snom”, “Polycom”, “Grandstream” Set it to null (None) to remove the key entry. |
phoneVendorModel |
String |
A |
O |
O |
Model name of the phone type. Set it to “” (empty string) to remove the key entry. |
targetUrl |
String |
A |
O |
O |
DMS url or logical name representing it. Set it to “” (empty string) to remove the key entry. |
useRedirect |
Boolean |
A |
O |
O |
Insert also the Mac Address in the Redirect Server (legacy) |
deviceActivationCode |
String |
A |
O |
O |
Device Activation Code for this model (at Phone Vendor Server side) Set it to “” (empty string) to remove the key entry. |
Phone Type Extra Capabilities Concept¶
The APIO allows to define extra capabilities for a phone type that are managed in a generic way, meaning that there is no specific logic associated to it in APIO logic just a translation logic.
This allow to extend the capabilities of a specific phone type based on what it supports and what the operator would like to expose. This cna be configured for individual phones or for all the phones of a certain type in one specific Group.
In the AS it will be saved as Custom Tags and of course the phone type template configuration file must use these tags otherwise they will have no effect.
Some tags are standard from the phone vendor or from the AS, but most are proposals of Netaxis and are therefore not available by default in the template file of the phone in the AS..
The definition is split into 2 main parts:
the description of the field: name, type, level and some extra parameters
the mapping of a field to a Custom Tags
The key of the entry in the json dict data will be the name of the attributes.
The value ill be an object as defined below.
Name |
Type |
Method |
Description |
||
---|---|---|---|---|---|
POST |
GET |
PUT |
|||
enabled |
Boolean |
A |
A |
O |
If the property is enabled or not. |
type |
String |
A |
A |
O |
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 |
O |
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 |
A |
O |
This property should not be displayed. Default is False |
level |
String |
A |
A |
O |
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. |
Then there is a key with a fixed name “TAGS” that contains the mapping between the name of an attribute (the key) and the corresponding Custom Tag name (the value).