Skip to content

Get sip lines

Getting a list of SIP-lines

Method get.sip_lines
Description Getting a list of SIP-lines
Who has access Partner, Customer

Parameters of a request

Title Type Required Description
access_token string yes Authentication session key
user_id number no Unique ID of an agent's customer user who makes request
Is required for agent
To access a list of customer users, use the method "get.customer_users"
limit number no Returning entries count. Refer to "Paging"
offset number no Offset that defines from which number to return the entries "limit". Default value is "0". Refer to "Paging"
filter object no Refer to "Filters"
fields array no Refer to "Viewing returning data"
sort array no Refer to "Data sorting"

Parameters of a reply

Title Type Valid values Filtering Sorting Description
id number yes Unique SIP-line id
phone_number string yes SIP-line's phone number
type enum
  • in
  • in_out
yes yes Incoming connection type available for a SIP-lines.
  • in - Support of incoming connection only
  • in_out - Support of both incoming and outgoing connection
channels_count number The number of lines available on a SIP-line
dial_time number from 1 to 100 Default value is "60". Time to dial a number from an employee's profile. Value is in seconds.
billing_state enum
  • active
  • manual_lock
  • limit_lock
yes yes SIP-line status in the billing.
  • active - SIP-line is active;
  • manual_lock - SIP-line is blocked manually;
  • limit_lock - SIP-line is blocked automatically.
physical_state enum
  • Registered
  • Not registered
yes yes Physical state of a SIP-line.
virtual_phone_number string E164 yes yes Virtual number displayed during an outgoing call
If a SIP-line type is "in", this field will be empty
status enum
  • active
  • inactive
yes yes Sip-number status in an employee's profile, refer to "get.employees"
employee_id number yes yes Employee unique ID, refer to the methods "get.employees"
employee_full_name string yes Employee full name, refer to the methods "get.employees"
IP-address
ip_addresses array yes IP-address of registered terminals.
Relevant to SIP-lines, that have parameter's value "physical_state" = "Registered"
date_time iso8601 YYYY-MM-DD hh:mm:ss Time and date of registration
ip string IP-address

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 reply 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": [
          {
            "date_time": "iso8601",
            "ip": "string"
          }
        ]
      }
    ]
  }
}

List of returning errors

Refer to the section "List of errors for the methods with the verb get"