Skip to content

Getting the list of SIP lines

Getting the list of SIP lines

Method get.sip_lines
Description Getting the list of SIP lines
Available to Partner, Client

Request parameters

Name Type Required Description
access_token string yes Authentication session key
user_id number no Unique identifier of the customer's user on whose behalf the request is made. Required for the agent. To obtain a list of customer users, call "get.customer_users".
limit number no Number of records returned. See section "Paging"
offset number no Offset defining the record number from which to return "limit" records. Default is "0". See section "Paging"
filter object no See section "Filtering criteria"
fields array no See section "Viewing returned data"
sort array no See section "Sorting data"

Response parameters

Name Type Valid values Filtering Sorting Description
id number yes Unique SIP line identifier
phone_number string yes SIP line phone number
type enum in / in_out yes yes Type of incoming communication supported by the SIP line. in — incoming only; in_out — incoming and outgoing.
channels_count number 1 to 20 Number of channels available on the SIP line
dial_time number 1 to 100 Time to ring the number set in the employee's profile, in seconds. Default: 60.
billing_state enum active / manual_lock / limit_lock yes yes SIP line billing status. active — SIP line is active; manual_lock — blocked manually; limit_lock — blocked automatically.
physical_state enum Зарегистрирован (Registered) / Не зарегистрирован (Not registered) yes yes Physical state of the SIP line.
virtual_phone_number string E.164 yes yes Virtual number displayed on outgoing calls. If the SIP line type is in, this field is empty.
status enum active / inactive yes yes SIP number status in the employee's profile; see method "get.employees"
employee_id number yes yes Unique employee identifier; see method "get.employees"
employee_full_name string yes Last name, first name, and middle name of the employee; see method "get.employees"
ip_addresses array yes IP addresses of registered terminals. Applies only when physical_state is Зарегистрирован.
date_time iso8601 YYYY-MM-DD hh:mm:ss Registration date and time
ip string IP address
virtual_phone_usage_rule enum Rule for selecting the virtual phone number used for outgoing calls
password string yes SIP line registration password

JSON request structure

{
    "jsonrpc": "2.0",
    "id": "number",
    "method": "get.sip_lines",
    "params": {
        "access_token": "string",
        "user_id": "number",
        "offset": "number",
        "limit": "number",
        "filter": {},
        "sort": [
            { "field": "string", "order": "string" }
        ],
        "fields": [ "string" ]
    }
}

JSON response structure

{
    "jsonrpc": "2.0",
    "id": "number",
    "result": {
        "metadata": {},
        "data": [
            {
                "id": "number",
                "phone_number": "string",
                "type": "enum",
                "employee_id": "number",
                "employee_full_name": "string",
                "channels_count": "number",
                "dial_time": "number",
                "billing_state": "enum",
                "physical_state": "enum",
                "status": "enum",
                "virtual_phone_number": "string",
                "ip_addresses": [
                    "string"
                ],
                "date_time": "iso8601",
                "ip": "string",
                "virtual_phone_usage_rule": "enum",
                "password": "string"
            }
        ]
    }
}

List of returned errors

See "Errors for get methods".