# `Twilio.Voice.V1.ByocTrunkService`
[🔗](https://github.com/jeffhuen/twilio_elixir/blob/main/lib/twilio/voice/v1/byoc_trunk_service.ex#L2)

# credo:disable-for-next-line Credo.Check.Readability.MaxLineLength
BYOC Trunks allow you to bring your own voice carrier to Twilio, enabling your calls to use our Programmable Voice APIs.

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

# `create`

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

Operation: `CreateByocTrunk` | Tags: VoiceV1ByocTrunk

## Optional Parameters

| Parameter | Type | Description |
|-----------|------|-------------|
# credo:disable-for-next-line Credo.Check.Readability.MaxLineLength
| `CnamLookupEnabled` | boolean | Whether Caller ID Name (CNAM) lookup is enabled for the trunk. If enabled, all inbound calls to the BYOC 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
| `ConnectionPolicySid` | string | The SID of the Connection Policy that Twilio will use when routing traffic to your communications infrastructure. |
# credo:disable-for-next-line Credo.Check.Readability.MaxLineLength
| `FriendlyName` | string | A descriptive string that you create to describe the resource. It is not unique and can be up to 255 characters long. |
# credo:disable-for-next-line Credo.Check.Readability.MaxLineLength
| `FromDomainSid` | string | The SID of the SIP Domain that should be used in the `From` header of originating calls sent to your SIP infrastructure. If your SIP infrastructure allows users to "call back" an incoming call, configure this with a [SIP Domain](https://www.twilio.com/docs/voice/api/sending-sip) to ensure proper routing. If not configured, the from domain will default to "sip.twilio.com". |
# credo:disable-for-next-line Credo.Check.Readability.MaxLineLength
| `StatusCallbackMethod` | string (http-method) | The HTTP method we should use to call `status_callback_url`. Can be: `GET` or `POST`. Values: `GET`, `POST` |
# credo:disable-for-next-line Credo.Check.Readability.MaxLineLength
| `StatusCallbackUrl` | string (uri) | The URL that we should call to pass status parameters (such as call ended) to your application. |
# credo:disable-for-next-line Credo.Check.Readability.MaxLineLength
| `VoiceFallbackMethod` | string (http-method) | The HTTP method we should use to call `voice_fallback_url`. Can be: `GET` or `POST`. Values: `GET`, `POST` |
# credo:disable-for-next-line Credo.Check.Readability.MaxLineLength
| `VoiceFallbackUrl` | string (uri) | The URL that we should call when an error occurs while retrieving or executing the TwiML from `voice_url`. |
# credo:disable-for-next-line Credo.Check.Readability.MaxLineLength
| `VoiceMethod` | string (http-method) | The HTTP method we should use to call `voice_url`. Can be: `GET` or `POST`. Values: `GET`, `POST` |
| `VoiceUrl` | string (uri) | The URL we should call when the BYOC Trunk receives a call. |

# `delete`

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

Operation: `DeleteByocTrunk` | Tags: VoiceV1ByocTrunk

# `fetch`

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

Operation: `FetchByocTrunk` | Tags: VoiceV1ByocTrunk

# `list`

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

Operation: `ListByocTrunk` | Tags: VoiceV1ByocTrunk

# `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.Voice.V1.ByocTrunk.t()}
  | {:ok, map(), map()}
  | :ok
  | {:error, Twilio.Error.t()}
```

Operation: `UpdateByocTrunk` | Tags: VoiceV1ByocTrunk

## Optional Parameters

| Parameter | Type | Description |
|-----------|------|-------------|
# credo:disable-for-next-line Credo.Check.Readability.MaxLineLength
| `CnamLookupEnabled` | boolean | Whether Caller ID Name (CNAM) lookup is enabled for the trunk. If enabled, all inbound calls to the BYOC 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
| `ConnectionPolicySid` | string | The SID of the Connection Policy that Twilio will use when routing traffic to your communications infrastructure. |
# credo:disable-for-next-line Credo.Check.Readability.MaxLineLength
| `FriendlyName` | string | A descriptive string that you create to describe the resource. It is not unique and can be up to 255 characters long. |
# credo:disable-for-next-line Credo.Check.Readability.MaxLineLength
| `FromDomainSid` | string | The SID of the SIP Domain that should be used in the `From` header of originating calls sent to your SIP infrastructure. If your SIP infrastructure allows users to "call back" an incoming call, configure this with a [SIP Domain](https://www.twilio.com/docs/voice/api/sending-sip) to ensure proper routing. If not configured, the from domain will default to "sip.twilio.com". |
# credo:disable-for-next-line Credo.Check.Readability.MaxLineLength
| `StatusCallbackMethod` | string (http-method) | The HTTP method we should use to call `status_callback_url`. Can be: `GET` or `POST`. Values: `GET`, `POST` |
# credo:disable-for-next-line Credo.Check.Readability.MaxLineLength
| `StatusCallbackUrl` | string (uri) | The URL that we should call to pass status parameters (such as call ended) to your application. |
# credo:disable-for-next-line Credo.Check.Readability.MaxLineLength
| `VoiceFallbackMethod` | string (http-method) | The HTTP method we should use to call `voice_fallback_url`. Can be: `GET` or `POST`. Values: `GET`, `POST` |
# credo:disable-for-next-line Credo.Check.Readability.MaxLineLength
| `VoiceFallbackUrl` | string (uri) | The URL that we should call when an error occurs while retrieving or executing the TwiML requested by `voice_url`. |
| `VoiceMethod` | string (http-method) | The HTTP method we should use to call `voice_url` Values: `GET`, `POST` |
| `VoiceUrl` | string (uri) | The URL we should call when the BYOC Trunk receives a call. |

---

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