esg dashboards

Overview

Provides information from instances of the esg role.

Requests

HTTP verb Endpoint Description

GET

/rest/v1/master/logicalroles/esg/dashboards

Getting the list of available dashboards

GET

/rest/v1/master/logicalroles/esg/dashboards/info

Getting complete information about esg roles

GET

/rest/v1/master/logicalroles/esg/dashboards/count

Getting aggregate quantitative metrics from esg roles

GET

/rest/v1/master/logicalroles/esg/dashboards/sites

Getting aggregate quantitative metrics from esg roles by sites

Common request scope parameters

The parameters below are used in the URL (?param=value) to limit the request application scope (the set of role instances to which the request applies). All are optional and may be absent. It makes sense to specify no more than one of them, or none at all.

Table 1. Possible parameters
Name Type Description

site

str

Site name from the configuration.

For example SITE8.

sites

array<str>

Comma-separated list of site names.

For example SITE1,SITE3.

server

str

Server alias. Can be an IP address, a number, or a full server name from the configuration.

For example 192.168.0.12 or 372.

servers

array<str>

Comma-separated list of server aliases.

For example 192.168.0.12,372,server05.


Getting the list of available dashboards

Request

Example request
GET /rest/v1/master/logicalroles/esg/dashboards HTTP/1.1

Response

Returns the list of esg role dashboards and relative URLs for obtaining them.

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

[
  {
    "name": "info",
    "_links": {
      "self": {
        "href": "/rest/v1/master/logicalroles/esg/dashboards/info",
        "params": []
      }
    }
  },
  {
    "name": "count",
    "_links": {
      "self": {
        "href": "/rest/v1/master/logicalroles/esg/dashboards/count",
        "params": []
      }
    }
  },
  {
    "name": "sites",
    "_links": {
      "self": {
        "href": "/rest/v1/master/logicalroles/esg/dashboards/sites",
        "params": []
      }
    }
  }
]

Getting complete information about esg roles

Provides information about all instances of the esg role within the request scope specified by URL scope parameters.

Request

The URL may contain additional scope parameters.

Table 2. Request parameters
Name Type Description

regs

bool

Show active provider accounts and their registration states.

code

str

Provider code. Used together with regs. Limits account output. Provides information only about the provider account with the specified code.

Example request
GET /rest/v1/master/logicalroles/esg/dashboards/info HTTP/1.1

Response

Returns an object with information about the composition of sites, each containing a composition of servers/nodes, each containing an esg role instance.

Table 3. Result object structure
Level Field Description

root

dlgcount

Number of dialogs served by all esg role instances within the request scope.

root

callcount

Number of dialog legs served by esg role instances within the request scope.

root

sites

List of sites containing esg role instances according to the configuration.

site

site

Site name.

site

dlgcount

Number of dialogs served by esg role instances within the request scope on this site.

site

callcount

Number of dialog legs served by esg role instances within the request scope on this site.

server

srvidx

Numeric identifier of this node (roleid from the configuration).

server

node

Name of this node.

server

online

Availability flag of this node from the web server executing the API request.

server

addr

IP address of the esg role on this node. Specified only if the node is available.

server

dlgcount

Number of dialogs served by the esg role instance on this node. Specified for available nodes.

server

callcount

Number of dialog legs served by the esg role instance on this node. Specified for available nodes.

server

regs

List of accounts served by the esg role instance on this node. Applies to the reg=true request parameter. Specified for available nodes.

reg

code

Provider account code.

reg

d

Internal cluster domain to which this provider account belongs.

reg

user

Username of the provider account.

reg

domain

Domain of the provider account sent outside.

reg

port

SIP server port to which the provider account connects.

reg

proto

Protocol used by the provider account. Possible values: "udp", "tcp", “tls”.

reg

addrs

List of addresses of the SIP server(s) to which the provider account connects.

reg

regstate

reg

pingstate

reg

lastresponse

List of headers of the last SIP server response to the sent REGISTER request.

reg

onlinetrunkcount

Number of active trunks in use.

Table 4. Registration states (regstate)
State Description

disabled

The account operates without registration.

registered

The account is registered.

wait_result

The account is being registered.

retry

The account is waiting for the next registration attempt.

detached

The account is being disconnected.

Table 5. Connection states (pingstate)
State Description

disabled

The account operates without connection checking.

ok

The last connection check passed successfully.

error

The last connection check failed.

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

{
  "callcount": 0,
  "dlgcount": 0,
  "sites": [
    {
      "site": "SITE1",
      "callcount": 0,
      "dlgcount": 0,
      "servers": [
        {
          "srvidx": 1,
          "node": "site1_h1@192.168.0.12",
          "addr": "192.168.0.12",
          "online": true,
          "callcount": 0,
          "dlgcount": 0,
          "domains": [],
          "regs": [
            {
              "code": "ceceron",
              "d": "test.rootdomain.ru",
              "user": "sip4",
              "domain": "test.ceceron.ru",
              "port": 5060,
              "proto": "udp",
              "addrs": [
                "test.ceceron.ru",
                "192.168.0.84"
              ],
              "regstate": "registered",
              "pingstate": "disabled",
              "last_response": [
                "SIP/2.0 200 OK",
                "Via: SIP/2.0/UDP 192.168.0.12:5080;rport=5080;received=192.168.0.12;branch=z9hG4bK4d9MzT-4TRPTu",
                "From: <sip:sip4@test.ceceron.ru>;tag=4WUgbJ",
                "To: <sip:sip4@test.ceceron.ru>;tag=rB2-00A-TTsq",
                "Call-ID: avLICRwnMr6mjNV7HkWwcKX6RJ0",
                "CSeq: 199253986 REGISTER",
                "Max-Forwards: 70",
                "Content-Length: 0",
                "Contact: <sip:sip4@192.168.0.12:5080>;expires=120",
                "Contact: <sip:sip4@192.168.0.204:5062>;expires=313",
                "Supported: path",
                "Allow: REGISTER,INVITE,ACK,CANCEL,BYE,REFER,NOTIFY,OPTIONS,INFO,SUBSCRIBE,MESSAGE,UPDATE",
                "Date: Tue, 05 Nov 2019 11:41:09 GMT",
                "Path: <sip:r_Q37WFY3@192.168.0.84:5060;transport=tcp;lr>"
              ],
              "onlinetrunkcount": 0
            },
            {
              "code": "rtest",
              "d": "test.rootdomain.ru",
              "user": "sip8",
              "domain": "test.rootdomain.ru",
              "port": 5060,
              "proto": "tcp",
              "addrs": [
                "test.rootdomain.ru",
                "192.168.0.12"
              ],
              "regstate": "registered",
              "pingstate": "ok",
              "last_response": [
                "SIP/2.0 200 OK",
                "Via: SIP/2.0/TCP 192.168.0.12:5080;rport=4005;received=192.168.0.12;branch=z9hG4bK3aut66-2ymB9o",
                "From: <sip:sip8@test.rootdomain.ru>;tag=FtT6WP",
                "To: <sip:sip8@test.rootdomain.ru>;tag=rB2-002-Qj4c",
                "Call-ID: 5DSlqsHIBWDPKaesn2JKzTjhRXA",
                "CSeq: 199349124 REGISTER",
                "Max-Forwards: 70",
                "Content-Length: 0",
                "Contact: <sip:sip8@192.168.0.12:5080;transport=TCP>;expires=34",
                "Supported: path",
                "Allow: REGISTER,INVITE,ACK,CANCEL,BYE,REFER,NOTIFY,OPTIONS,INFO,SUBSCRIBE,MESSAGE,UPDATE",
                "Date: Tue, 05 Nov 2019 11:42:08 GMT",
                "Path: <sip:r_Q1CJaRf@192.168.0.12:5060;transport=tcp;lr>"
                ],
              "onlinetrunkcount": 0
            }
          ]
        },
        {
          "srvidx": 32,
          "node": "site1_h11@192.168.0.12",
          "online": false
        }
      ]
    },
    {
      "site": "SITE2",
      "callcount": 0,
      "dlgcount": 0,
      "servers": [
        {
          "srvidx": 101,
          "node": "site2_h1@192.168.0.12",
          "online": false
        }
      ]
    }
  ]
}

Getting aggregate quantitative metrics from esg roles

Provides information about the aggregate number of dialogs and dialog legs from all instances of the esg role within the request scope specified by URL scope parameters.

Returns a limited data set from request Getting complete information about esg roles.

Request

The URL may contain additional scope parameters.

Example request
GET /rest/v1/master/master/logicalroles/esg/dashboards/count HTTP/1.1

Response

Table 6. Result object structure
Field Description

dlgcount

Number of dialogs served by all esg role instances within the request scope.

callcount

Number of dialog legs served by esg role instances within the request scope.

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

{
  "callcount": 24,
  "dlgcount": 12
}

Getting aggregate quantitative metrics from esg roles by sites

Provides information about the aggregate number of dialogs and dialog legs from all instances of the esg role within the request scope specified by URL scope parameters. Returns data by sites and totals.

Returns a limited data set from request Getting complete information about esg roles.

Request

The URL may contain additional scope parameters.

Request

Example request
GET /rest/v1/master/logicalroles/esg/dashboards/sites HTTP/1.1

Response

Table 7. Result object structure
Level Field Description

root

dlgcount

Number of dialogs served by all esg role instances within the request scope.

root

callcount

Number of dialog legs served by esg role instances within the request scope.

root

sites

List of sites containing esg role instances according to the configuration.

site

site

Site name.

site

dlgcount

Number of dialogs served by esg role instances within the request scope on this site.

site

callcount

Number of dialog legs served by esg role instances within the request scope on this site.

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

{
  "dlgcount": 24,
  "callcount": 12,
  "sites": [
    {
      "site": "SITE3",
      "callcount": 2,
      "dlgcount": 1
    },
    {
      "site": "SITE2",
      "callcount": 6,
      "dlgcount": 3
    },
    {
      "site": "SITE1",
      "callcount": 16,
      "dlgcount": 8
    }
  ]
}

See also