api:tce:cprcreate
Table of Contents
API : TCE : PC client Create
Introduction
This request will create a new PC client.
Request
| URL | https://api.telecomx.dk/tce/TCE_ID/cpr | ||
|---|---|---|---|
| Method | POST | ||
| Access level | VIEWER, MANAGER, OWNER, RESELLER or ADMIN | ||
| Param | TCE_ID | MAC address of TCE box the PC client shall be used on. | |
| Body | box | String | MAC address of TCE box the PC client belongs to. |
| extension | String | Extension number of the phone that the PC client is paired with. | |
| usePublic | Boolean | True to use public IP address of TCE box instead of local IP address. | |
| portOverride | Number | Port number to use instead of default port 80 (only available if usePublic is true). | |
| copyToClipboard | Boolean | True to copy digits to clipboard when call is answered. | |
| popup | Boolean | True to popup the application when call is answered. | |
| alwaysOnTop | Boolean | True to keep PC client on top. | |
| autoStart | Boolean | True to launch PC client on Windows login. | |
| sendKeys | Object | Settings for send keystrokes - if used, null if not. | |
| sendKeys.enable | Boolean | True to send keystrokes to 3'rd party application. | |
| sendKeys.mode | String | ANSWER - send keystrokes when call is answered. RING - send keystrokes when phone rings. |
|
| sendKeys.toActiveWindow | Boolean | True to send keystrokes to the active window (mutually exclusive with appName). | |
| sendKeys.appName | String | Processname of application to send keystrokes to, with/without lastname. | |
| sendKeys.autoIT | Boolean | True to send keystrokes using autoIT instead of native method. | |
| sendKeys.delay | Number | Number of milliseconds to wait before keystrokes are sent. | |
| sendKeys.maxWindow | Boolean | True to maximize, false for normal. | |
| sendKeys.strokes | String | Keystrokes to send. | |
| execute | Object | Settings for executing an application, null if not used. | |
| execute.enable | Boolean | True to execute command. | |
| execute.mode | String | ANSWER - execute when call is answered. RING - execute when phone rings. |
|
| execute.delay | Number | Number of milliseconds to wait before execution starts. | |
| execute.command | String | Command to execute, special tags are: {CPR}, {NUMBER} and {ANUMBER}. | |
| execute.silent | Boolean | True execute command in the background. | |
Query examples
{
box: '12345789012',
extension: '299',
usePublic: true,
portOverride: null,
copyToClipboard: true,
popup: false,
alwaysOnTop: false,
autoStart: true,
sendKeys: {
enable: true,
mode: 'ANSWER',
toActiveWindow: false,
appName: 'xmo',
autoIT: false,
delay: 500,
maxWindow: false,
strokes: '{F10}{CPR}{ENTER}'
},
execute: {
enable: true,
mode: 'RING',
delay: 0,
command: 'C:\scripts\callnotify.bat {NUMBER}',
silent: true
}
}
Response
The created CPR logger.
| JSON object | ||
|---|---|---|
| _id | String | Configuration ID. |
| box | String | MAC address of TCE box the PC client belongs to. |
| extension | String | Extension number of the phone that the PC client is paired with. |
| usePublic | Boolean | True to use public IP address of TCE box instead of local IP address. |
| portOverride | Number | Port number to use instead of default port 80 (only available if usePublic is true). |
| copyToClipboard | Boolean | True to copy digits to clipboard when call is answered. |
| popup | Boolean | True to popup the application when call is answered. |
| alwaysOnTop | Boolean | True to keep PC client on top. |
| autoStart | Boolean | True to launch PC client on Windows login. |
| sendKeys | Object | Settings for send keystrokes - if used, null if not. |
| sendKeys.enable | Boolean | True to send keystrokes to 3'rd party application. |
| sendKeys.mode | String | ANSWER - send keystrokes when call is answered. RING - send keystrokes when phone rings. |
| sendKeys.toActiveWindow | Boolean | True to send keystrokes to the active window (mutually exclusive with appName). |
| sendKeys.appName | String | Processname of application to send keystrokes to, with/without lastname. |
| sendKeys.autoIT | Boolean | True to send keystrokes using autoIT instead of native method. |
| sendKeys.delay | Number | Number of milliseconds to wait before keystrokes are sent. |
| sendKeys.maxWindow | Boolean | True to maximize, false for normal. |
| sendKeys.strokes | String | Keystrokes to send. |
| execute | Object | Settings for executing an application, null if not used. |
| execute.enable | Boolean | True to execute command. |
| execute.mode | String | ANSWER - execute when call is answered. RING - execute when phone rings. |
| execute.delay | Number | Number of milliseconds to wait before execution starts. |
| execute.command | String | Command to execute, special tags are: {CPR}, {NUMBER} and {ANUMBER}. |
| execute.silent | Boolean | True execute command in the background. |
| lastSeen | Date | Time and date when the CPR logger last fetched it's configuration. |
Note that properties holding no value may be omitted from the object.
Example
{ _id: 'd4G5Ey', box: '12345789012', extension: '299', usePublic: true, portOverride: null, copyToClipboard: true, popup: false, alwaysOnTop: false, autoStart: true, sendKeys: { enable: true, mode: 'ANSWER', toActiveWindow: false, appName: 'xmo', autoIT: false, delay: 500, maxWindow: false, strokes: '{F10}{CPR}{ENTER}' }, execute: { enable: true, mode: 'RING', delay: 0, command: 'C:\scripts\callnotify.bat {NUMBER}', silent: true }, lastSeen: null }
Errors
| Error code | Message | Description |
|---|---|---|
| 403 | access_denied | Insufficient access level |
| 404 | tce | TCE box not found |
| 422 | portOverride | Invalid port number |
| 404 | extension | Extension is missing |
| 404 | sendKeys.appName | App name is missing |
| 422 | sendKeys.delay | Delay is invalid |
| 404 | sendKeys.strokes | Keystrokes are missing |
| 500 | internal_error | <Unspecified> |
api/tce/cprcreate.txt · Last modified: 2016/10/30 14:32 by Per Møller