Registration statuses of internal accounts (sipuser_states)

Overview

Provides information about the registration status - whether the device is registered or not. The identifier of the entity is the account identifier sipuser.

Also allows you to subscribe to change events (event: "modelevents.data_changed", classpath: "/rest/v1/uc/sipuser_states"). Events are received when the first contact in the account is registered, when the last contact is unregistered or times out, or when all contacts in the account are deleted. When the storage is cleared, when the service is restarted.

Object fields

Name Description

id

Account ID sipuser

username

Username (a.k.a. primary login) of the account sipuser

status

Registration status: "online" or "offline"

Requests

HTTP verb Endpoint Description

GET

/rest/v1/uc/sipuser_states

Getting the list of accounts with registration states

GET

/rest/v1/uc/sipuser_states/<id>

Obtaining the registration status of an account

DELETE

/rest/v1/uc/sipuser_states/<id>

Clearing the account registration list


Getting the list of accounts with registration states

Returns all accounts, both registered and unregistered.

Filtering, sorting is supported.

Request

Table 1. Request parameters
Name Type Description

filter

object

Filter by field values.

mask

str

List of fields to output. Available fields for output: id, username, status.

offset

int

Offset in the list of resources to be issued.

limit

int

The maximum number of resources in the list.

order

array<object|str>

The sort order of the resources in the list.

Request example
GET /rest/v1/uc/sipuser_states?filter=["==",["property","status"],"online"]&limit=2 HTTP/1.1

Response

Response example
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8

[
  {
    "id":"57278625-5fa4-eb0c-fb53-f6fa26881f25",
    "status":"online",
    "username":"sip1"
  },
  {
    "id":"9e455549-017c-cb23-16b3-7cd30a921f58",
    "status":"online",
    "username":"sip2"
  }
]

Obtaining the registration status of an account

Returns the registration status of one specific account by identifier.

Request example
GET /rest/v1/uc/sipuser_states/57278625-5fa4-eb0c-fb53-f6fa26881f25 HTTP/1.1

Response

Response example
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8

{
"id":"57278625-5fa4-eb0c-fb53-f6fa26881f25",
"status":"online",
"username":"sip1"
}

Clearing the account registration list

Automatic registrations of "no registration" accounts will also be deleted. If there is no registration, it is not possible to call the device, but a call from the device may well go through.

During the appropriate re-registration period, all devices during the renewal will re-register, automatic registrations will also be reinstated.

Request

Request example
DELETE /rest/v1/uc/sipuser_states/abcdabcd-abcd-abcd-abcd-abcdabcdabcd HTTP/1.1

Response

Example of a successful response
HTTP/1.1 204 No Content
Content-Type: application/json; charset=utf-8