Reloads the Communicator Desktop clients that run an older version of the web app than the one deployed on communicatordesktop.dk. A Communicator on a PC that is never switched off or put to sleep keeps the version it loaded weeks ago - this makes it pick up the new one. A scheduled job calls it every night at 03:30.
The deployed version is read from https://communicatordesktop.dk/version.json, which the CommunicatorDesktop4 build writes from its package.json (a development API reads test.communicatordesktop.dk). The version of each connected client is read from its clientApp in RealtimeClients, e.g. Communicator Desktop 4.9.0-2.1.4 on Windows in the app or Communicator Desktop 4.9.0 Chrome on macOS in a browser. Only clients on a lower version are touched - a client on the same or a newer version, the mobile apps and every other realtime client are left alone. A deploy only triggers reloads when the version in package.json was bumped.
The request answers at once with what it found. The reloads go on in the background for 15 minutes, in up to 30 batches, so the web servers, the realtime servers and SIP registration are not hit all at once. A client is only reloaded when it is idle:
CommunicatorGetStatus realtime request within 10 seconds, with no open softphone session.
A client that fails either check is left alone and tried again the following night. The client then gets a CommunicatorReload request and reloads itself - its softphone is unregistered for the few seconds that takes. When the run is done, a summary is written to syslog, e.g. Communicator reload to 4.9.1 done: 212 reloaded, 3 in a call, 5 did not answer, 2 gone or already updated, 0 failed.
Only one run can go on at a time, across all API servers.
| URL | https://api.telecomx.dk/tools/realtime/communicator/reloadoutdated | ||
|---|---|---|---|
| Method | POST | ||
| Access level | Admin | ||
| Field | Type | Required | Description |
|---|---|---|---|
| dryRun | Boolean | No | True to only list the outdated clients, without sending anything to them. Default false. |
POST https://api.telecomx.dk/tools/realtime/communicator/reloadoutdated
{ "dryRun": true }
| Field | Type | Description |
|---|---|---|
| dryRun | Boolean | True if nothing was sent to the clients. |
| serverVersion | String | The version in version.json, e.g. 4.9.1. |
| connected | Number | Number of connected Communicator Desktop clients, counted once per instanceId. |
| outdated | Number | Number of those that run an older version. |
| windowMinutes | Number | Minutes the reloads are spread over. |
| clients | Array | The outdated clients - dryRun only. |
| clients[].employee | Id | Id of the employee logged in on the client. |
| clients[].instanceId | String | The client's instanceId. |
| clients[].version | String | Version the client runs. |
{ "dryRun": true, "serverVersion": "4.9.1", "connected": 6, "outdated": 2, "windowMinutes": 15, "clients": [ { "employee": "6ad9d76b54a84dc10ce5bdc2", "instanceId": "ftwf73i6idjet3hdyr6457eyrhd64h43", "version": "4.8.0" }, { "employee": "6ad9d76b54a84dc10ce5bdc3", "instanceId": "a8c71e0f2b9d4e6a8c71e0f2b9d4e6a8", "version": "4.8.5" } ] }
| Error code | Message | Description |
|---|---|---|
| 400 | invalid_data | dryRun is not a boolean |
| 403 | access_denied | Insufficient access level |
| 409 | conflict | Outdated Communicators are already being reloaded |
| 500 | internal_error | version.json could not be read, or holds no version |
The nightly run is a scheduled job, created under Admin > System > Scheduled jobs by an Admin employee (the job runs as the employee who created it):
| Field | Value |
|---|---|
| Method | POST |
| URL | https://api.telecomx.dk/tools/realtime/communicator/reloadoutdated |
| Recurrence | Daily at 03:30 |
Pause the job to stop the nightly reloads.