Query Trunk Status Monitoring Settings

Query trunk status monitoring settings for the API feature.

Request URL

GET {base_url}/{api_path}/trunk_status_monitor/list?access_token={access_token}

Request parameters

Parameter Required Type Description
page No Integer Define which page is displayed.
page_size No Integer Define how many records per page.
sort_by No String Define the sorting field.

Valid value:

  • trunk_id
order_by No String Define the display order.

Valid value:

  • asc: Ascending order.

Response parameters

Parameter Type Description
errcode Integer Returned error code.
  • 0: Succeed.
  • Non-zero value: Failed.
Note: You can check the error code and error message in Error Code and Error Message.
errmsg String Returned message.
  • SUCCESS: Succeed.
  • FAILURE: Failed.
total_number Integer The total number of trunks.
data Array<Monitoring_Settings> The status monitoring settings of trunks.
Monitoring_Settings
Parameter Type Description
trunk_id Integer Trunk ID.
name String Trunk Name.
enb_call_status Integer
Whether the Call Status Monitor is enabled.
  • 0: Disabled
  • 1: Enabled
enb_control_inbound_call Integer Whether the Control Inbound Call is enabled.
  • 0: Disabled
  • 1: Enabled

Examples

Request example

GET /openapi/v1.0/trunk_status_monitor/list?access_token=QytWnoLcod7RFB5f0S5oX4ORMbKPbU5t&page=1&page_size=2&sort_by=trunk_id&order_by=asc HTTP/1.1

Host: yeastardocs.example.yeastarcloud.com

Response example

HTTP/1.1 200 OK
{
    "errcode": 0,
    "errmsg": "SUCCESS",
    "total_number": 6,
    "data": [
        {
            "trunk_id": 14,
            "name": "Register1",
            "enb_call_status": 0,
            "enb_control_inbound_call": 1
        },
        {
            "trunk_id": 15,
            "name": "Register2",
            "enb_call_status": 0,
            "enb_control_inbound_call": 1
        }
    ]
}