Nepton can send person's status information to Mitel Aastra and Telia Merex phone systems. Both integrations send data to Flexim which then provides the data for the phone systems.
Definitions
Defining persons identifier
Persons identifier can be set by editing persons information in Employees - Person's information - Identifiers - Aastra. Both Aastra and Merex integrations use the Aastra-identifier field set in the identifier settings.
Defining event types
Event type codes can be set in working community settings, Worktime - Administration - Working Community Settings - Integrations - Mitel Aastra for Mitel Aastra integration and Worktime - Administration - Working Community Settings - Integrations - Telia Merex for Telia Merex integration.
Event type codes
Event type codes can be set according to the table below.
Code | Information |
---|---|
1 | Meeting |
2 | In (equal to starting work) |
3 | Out (equal to ending work) |
5 | Travel work |
6 | Holiday / Work time shortening leave / Balance leave |
7 | Sick leave |
8 | Training |
9 | Work elsewhere |
0 | Out other reason (equal to ending work) |
a | Lunch |
Sending data
The Mitel Aastra host address and other settings can set in working community settings, Worktime - Administration - Working Community Settings - Integrations - Mitel Aastra - Configuration
The Merex host address and other settings can set in working community settings, Worktime - Administration - Working Community Settings - Integrations - Telia Merex - Configuration
For both integrations, the maximum amount of statuses sent per minute is 100 submissions by default. Delay between sent status rows in milliseconds is 500 milliseconds by default. These can be changed in their respective setting fields.
Limitations
- Employees with personnel number 0 are not included in the integration file
Technical operation of the integration
Statuses are sent to the specified server address as raw data, one status at a time. Information is sent via an opened TCP socket and the connection does not wait for a return message for the sent data.
Sent data
The integration is standardized and there is no need to make changes to the content. One status change is textual data separated by a tab character. Used character set is ASCII
. The sent information is described below.
Information | Description |
Start character | Start character is always an STX character (Start of Text), ASCII HEX 02 . |
Event type code | |
Tab character | |
Person's Aastra identifier / employee number | Up to 11 characters long. |
Tab character | |
Other reason code | Up to 3 characters long. Not used. |
Tab character | |
Event end date | If the event has a known end date, it will be included. Format DDMM , for example 3105 . |
Tab character | |
Event end time | If the event has a known end time, it will be included. Format HHMM , for example 1230 . |
Checksum character | Checksum is only calculated for Merex integration and won't be included with Mitel Aastra integration. |
End character | End character is always an CR character (carriage return), ASCII HEX 0D . |
Expected response
Integration does not expect any response for sent person statuses. As long as writing to the open TCP socket does not fail, person status is considered as successfully sent.
Checksum calculation formula
- The position of each character in the ASCII table is calculated and the integer value of all positions is added together. Only characters before checksum are checked.
- The integer value of lowest 7 bits of the sum from previous step is retrieved.
- If the integer value is less than 32, 32 is added to the value.
- The resulting integer value is the order number of the checsum character in ASCII table.
PHP example:
<?php
function getChecksum(string $string): string
{
$sum = array_sum(
array_map(
static function (string $chr): int {
return ord($chr);
},
str_split($string)
)
);
$sum &= hexdec('0x7f');
if ($sum < hexdec('0x20')) {
$sum += hexdec('0x20');
}
return chr($sum);
}
Example
STX
, TAB
, CHECKSUM
and CR
characters are visualized in the example.
STX
2TAB
5642TAB
TAB
1302TAB
1208CHECKSUM
CR