# `Twilio.Trunking.V1.TrunkService`
[🔗](https://github.com/jeffhuen/twilio_elixir/blob/main/lib/twilio/trunking/v1/trunk_service.ex#L2)

Represents a SIP trunk

Operations: `list`, `create`, `fetch`, `update`, `delete`

# `create`

```elixir
@spec create(Twilio.Client.t(), map(), keyword()) ::
  {:ok, Twilio.Resources.Trunking.V1.Trunk.t()}
  | {:ok, map(), map()}
  | :ok
  | {:error, Twilio.Error.t()}
```

Operation: `CreateTrunk` | Tags: TrunkingV1Trunk

## Optional Parameters

| Parameter | Type | Description |
|-----------|------|-------------|
# credo:disable-for-next-line Credo.Check.Readability.MaxLineLength
| `CnamLookupEnabled` | boolean | Whether Caller ID Name (CNAM) lookup should be enabled for the trunk. If enabled, all inbound calls to the SIP Trunk from the United States and Canada automatically perform a CNAM Lookup and display Caller ID data on your phone. See [CNAM Lookups](https://www.twilio.com/docs/sip-trunking#CNAM) for more information. |
# credo:disable-for-next-line Credo.Check.Readability.MaxLineLength
| `DisasterRecoveryMethod` | string (http-method) | The HTTP method we should use to call the `disaster_recovery_url`. Can be: `GET` or `POST`. Values: `GET`, `POST` |
# credo:disable-for-next-line Credo.Check.Readability.MaxLineLength
| `DisasterRecoveryUrl` | string (uri) | The URL we should call using the `disaster_recovery_method` if an error occurs while sending SIP traffic towards the configured Origination URL. We retrieve TwiML from the URL and execute the instructions like any other normal TwiML call. See [Disaster Recovery](https://www.twilio.com/docs/sip-trunking#disaster-recovery) for more information. |
# credo:disable-for-next-line Credo.Check.Readability.MaxLineLength
| `DomainName` | string | The unique address you reserve on Twilio to which you route your SIP traffic. Domain names can contain letters, digits, and `-` and must end with `pstn.twilio.com`. See [Termination Settings](https://www.twilio.com/docs/sip-trunking#termination) for more information. |
# credo:disable-for-next-line Credo.Check.Readability.MaxLineLength
| `FriendlyName` | string | A descriptive string that you create to describe the resource. It can be up to 64 characters long. |
# credo:disable-for-next-line Credo.Check.Readability.MaxLineLength
| `Secure` | boolean | Whether Secure Trunking is enabled for the trunk. If enabled, all calls going through the trunk will be secure using SRTP for media and TLS for signaling. If disabled, then RTP will be used for media. See [Secure Trunking](https://www.twilio.com/docs/sip-trunking#securetrunking) for more information. |
| `TransferCallerId` | string |  Values: `from-transferee`, `from-transferor` |
| `TransferMode` | string |  Values: `disable-all`, `enable-all`, `sip-only` |

# `delete`

```elixir
@spec delete(Twilio.Client.t(), String.t(), keyword()) ::
  {:ok, map()} | {:ok, map(), map()} | :ok | {:error, Twilio.Error.t()}
```

Operation: `DeleteTrunk` | Tags: TrunkingV1Trunk

# `fetch`

```elixir
@spec fetch(Twilio.Client.t(), String.t(), keyword()) ::
  {:ok, Twilio.Resources.Trunking.V1.Trunk.t()}
  | {:ok, map(), map()}
  | :ok
  | {:error, Twilio.Error.t()}
```

Operation: `FetchTrunk` | Tags: TrunkingV1Trunk

# `list`

```elixir
@spec list(Twilio.Client.t(), map(), keyword()) ::
  {:ok, Twilio.Page.t()}
  | {:ok, map(), map()}
  | :ok
  | {:error, Twilio.Error.t()}
```

Operation: `ListTrunk` | Tags: TrunkingV1Trunk

# `stream`

```elixir
@spec stream(Twilio.Client.t(), map(), keyword()) :: Enumerable.t()
```

Stream:  (lazy auto-pagination).

# `update`

```elixir
@spec update(Twilio.Client.t(), String.t(), map(), keyword()) ::
  {:ok, Twilio.Resources.Trunking.V1.Trunk.t()}
  | {:ok, map(), map()}
  | :ok
  | {:error, Twilio.Error.t()}
```

Operation: `UpdateTrunk` | Tags: TrunkingV1Trunk

## Optional Parameters

| Parameter | Type | Description |
|-----------|------|-------------|
# credo:disable-for-next-line Credo.Check.Readability.MaxLineLength
| `CnamLookupEnabled` | boolean | Whether Caller ID Name (CNAM) lookup should be enabled for the trunk. If enabled, all inbound calls to the SIP Trunk from the United States and Canada automatically perform a CNAM Lookup and display Caller ID data on your phone. See [CNAM Lookups](https://www.twilio.com/docs/sip-trunking#CNAM) for more information. |
# credo:disable-for-next-line Credo.Check.Readability.MaxLineLength
| `DisasterRecoveryMethod` | string (http-method) | The HTTP method we should use to call the `disaster_recovery_url`. Can be: `GET` or `POST`. Values: `GET`, `POST` |
# credo:disable-for-next-line Credo.Check.Readability.MaxLineLength
| `DisasterRecoveryUrl` | string (uri) | The URL we should call using the `disaster_recovery_method` if an error occurs while sending SIP traffic towards the configured Origination URL. We retrieve TwiML from the URL and execute the instructions like any other normal TwiML call. See [Disaster Recovery](https://www.twilio.com/docs/sip-trunking#disaster-recovery) for more information. |
# credo:disable-for-next-line Credo.Check.Readability.MaxLineLength
| `DomainName` | string | The unique address you reserve on Twilio to which you route your SIP traffic. Domain names can contain letters, digits, and `-` and must end with `pstn.twilio.com`. See [Termination Settings](https://www.twilio.com/docs/sip-trunking#termination) for more information. |
# credo:disable-for-next-line Credo.Check.Readability.MaxLineLength
| `FriendlyName` | string | A descriptive string that you create to describe the resource. It can be up to 64 characters long. |
# credo:disable-for-next-line Credo.Check.Readability.MaxLineLength
| `Secure` | boolean | Whether Secure Trunking is enabled for the trunk. If enabled, all calls going through the trunk will be secure using SRTP for media and TLS for signaling. If disabled, then RTP will be used for media. See [Secure Trunking](https://www.twilio.com/docs/sip-trunking#securetrunking) for more information. |
| `TransferCallerId` | string |  Values: `from-transferee`, `from-transferor` |
| `TransferMode` | string |  Values: `disable-all`, `enable-all`, `sip-only` |

---

*Consult [api-reference.md](api-reference.md) for complete listing*
