# Get Inbound Trunks

Returns the collection of inbound Trunks.

## Request

HTTP Method: `GET`

URI Path: `/v3/voice_in_trunks`

Note

For all returned data attributes, see [Inbound Trunk Object](voice-in-trunk-object.html).

### URI Query Parameters

| Name | Type | Is Required? | Description |
| --- | --- | --- | --- |
| filter[<filter\_name>] | `string`, `DateTime` | No | [Filtering](../../../specification/filtering.html#api-filters) |
| fields[voice\_in\_trunks] | `string` | No | [Sparse fieldsets](../../../specification/sparse-fieldsets.html#api-sparse-fieldsets) |
| sort | `string` | No | [Sorting](../../../specification/sorting.html#api-sorting) |

### Filters

| Filter Name | Type | Allow Blank | Allow Array | Filters by: |
| --- | --- | --- | --- | --- |
| id | `string` | No | Yes | Trunk `id` field. |
| name | `string` | Yes | Yes | Trunk `name` field. |
| external\_reference\_id | `string` | No | No | The `external_reference_id` field. |
| configuration.type | `string` | Yes | Yes | The type of configuration (SIP, PSTN, etc) |

### Sorting

| Value | Sorts by: |
| --- | --- |
| name | The `name` field. |
| priority | The `priority` field. |
| capacity\_limit | The `capacity_limit` field. |
| weight | The `weight` field. |
| cli\_format | The `cli_format` field. |
| cli\_prefix | The `cli_prefix` field. |
| description | The `description` field. |
| ringing\_timeout | The `ringing_timeout` field. |
| created\_at | The `created_at` field. |

### Object Relationships

| Value | Description |
| --- | --- |
| voice\_in\_trunk\_group | [Trunk Group Object](../voice-in-trunk-groups/trunk-group-object.html#voice-in-trunk-group-object-v34) |
| pop | [POP Object](pop-object.html#pop-object-v34) |

## Example

[[DIDWW-API-EXAMPLE-START]]

http

```
GET /v3/voice_in_trunks HTTP/1.1
Host: api.didww.com
Content-Type: application/vnd.api+json
Accept: application/vnd.api+json
Api-Key: [API token]
```

curl

```
curl -i -X GET https://api.didww.com/v3/voice_in_trunks -H "Accept: application/vnd.api+json" -H "Api-Key: [API token]" -H "Content-Type: application/vnd.api+json"
```

response

```
HTTP/1.1 200 OK
Content-Type: application/vnd.api+json

{
  "data": [
    {
      "id": "2d7f943f-07c4-4b27-8792-e85806368218",
      "type": "voice_in_trunks",
      "attributes": {
        "priority": 1,
        "capacity_limit": 10,
        "weight": 2,
        "name": "Office",
        "cli_format": "e164",
        "cli_prefix": "+",
        "description": null,
        "ringing_timeout": 30,
        "created_at": "2017-06-25T08:21:41.795Z",
        "external_reference_id": null,
        "configuration": {
          "type": "sip_configurations",
          "attributes": {
            "username": "username",
            "host": "example.com",
            "port": null,
            "codec_ids": [
              9,
              7
            ],
            "rx_dtmf_format_id": 1,
            "tx_dtmf_format_id": 1,
            "resolve_ruri": true,
            "auth_enabled": true,
            "auth_user": "username",
            "auth_password": "password",
            "auth_from_user": "Office",
            "auth_from_domain": "example.com",
            "sst_enabled": false,
            "sst_min_timer": 600,
            "sst_max_timer": 900,
            "sst_accept_501": true,
            "sip_timer_b": 8000,
            "dns_srv_failover_timer": 2000,
            "rtp_ping": false,
            "rtp_timeout": 30,
            "force_symmetric_rtp": false,
            "symmetric_rtp_ignore_rtcp": false,
            "rerouting_disconnect_code_ids": [
              58,
              59,
              1505
            ],
            "sst_session_expires": null,
            "sst_refresh_method_id": 1,
            "transport_protocol_id": 1,
            "max_transfers": 5,
            "max_30x_redirects": 7,
            "media_encryption_mode": "disabled",
            "stir_shaken_mode": "disabled",
            "allowed_rtp_ips": null,
            "network_protocol_priority": "any",
            "enabled_sip_registration": true,
            "use_did_in_ruri": true,
            "diversion_relay_policy": "as_is",
            "diversion_inject_mode": "did_number",
            "cnam_lookup": true
          }
        }
      },
      "relationships": {
        "voice_in_trunk_group": {
          "links": {
            "self": "https://api.didww.com/v3/voice_in_trunks/2d7f943f-07c4-4b27-8792-e85806368218/relationships/voice_in_trunk_group",
            "related": "https://api.didww.com/v3/voice_in_trunks/2d7f943f-07c4-4b27-8792-e85806368218/voice_in_trunk_group"
          }
        }
      }
    },
    {
      "id": "34b95e8c-9b78-4e64-aea8-9e5764d8f16f",
      "type": "voice_in_trunks",
      "attributes": {
        "priority": 1,
        "capacity_limit": 5,
        "weight": 65535,
        "name": "Office Mobile",
        "cli_format": "e164",
        "cli_prefix": null,
        "description": null,
        "ringing_timeout": null,
        "created_at": "2017-06-25T08:21:41.795Z",
        "external_reference_id": null,
        "configuration": {
          "type": "pstn_configurations",
          "attributes": {
            "dst": "1xxxxxxxxx"
          }
        }
      },
      "relationships": {
        "voice_in_trunk_group": {
          "links": {
            "self": "https://api.didww.com/v3/voice_in_trunks/34b95e8c-9b78-4e64-aea8-9e5764d8f16f/relationships/voice_in_trunk_group",
            "related": "https://api.didww.com/v3/voice_in_trunks/34b95e8c-9b78-4e64-aea8-9e5764d8f16f/voice_in_trunk_group"
          }
        }
      }
    }
  ],
  "meta": {
    "total_records": 2
  },
  "links": {
    "first": "https://api.didww.com/v3/voice_in_trunks?page%5Bnumber%5D=1&page%5Bsize%5D=50",
    "last": "https://api.didww.com/v3/voice_in_trunks?page%5Bnumber%5D=1&page%5Bsize%5D=50"
  }
}
```

[[DIDWW-API-EXAMPLE-END]]

On this page
