Internal account registration states (sipuser_states)

Overview

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

It also allows subscribing to change events (event: "modelevents.data_changed", classpath: "/rest/v1/uc/sipuser_states"). Events arrive on registration of the account’s first contact, on deregistration or registration timeout of the last contact, or on deletion of all account contacts. On storage clearing and on service restart.

Object fields

Name Description

id

sipuser account identifier

username

Username (also the main login) of the sipuser account

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>

Getting the account registration state

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 and sorting are 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 output.

limit

int

Maximum number of resources in the list.

order

array<object|str>

Sorting order of resources in the list.

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

Response

Example response
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"
  }
]

Getting the account registration state

Returns the registration state of one specific account by identifier.

Example request
GET /rest/v1/uc/sipuser_states/57278625-5fa4-eb0c-fb53-f6fa26881f25 HTTP/1.1

Response

Example response
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 registration records of "registration-free" accounts will also be deleted. Without registration, a device cannot be called, but a call from the device can still proceed.

During the corresponding re-registration period all devices will restore registration when renewing, and automatic registrations will also be restored.

Request

Example request
DELETE /rest/v1/uc/sipuser_states/abcdabcd-abcd-abcd-abcd-abcdabcdabcd HTTP/1.1

Response

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