# `Twilio.Api.V2010.SIP.DomainService`
[🔗](https://github.com/jeffhuen/twilio_elixir/blob/main/lib/twilio/api/v2010/sip/domain_service.ex#L2)

Custom DNS hostnames that can accept SIP traffic

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

# `create`

```elixir
@spec create(Twilio.Client.t(), map(), keyword()) ::
  {:ok, Twilio.Resources.Api.V2010.SIP.Domain.t()}
  | {:ok, map(), map()}
  | :ok
  | {:error, Twilio.Error.t()}
```

Create a new Domain

Operation: `CreateSipDomain` | Tags: Api20100401Domain

## Required Parameters

| Parameter | Type | Description |
|-----------|------|-------------|
# 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 `sip.twilio.com`. |
## Optional Parameters

| Parameter | Type | Description |
|-----------|------|-------------|
# credo:disable-for-next-line Credo.Check.Readability.MaxLineLength
| `ByocTrunkSid` | string | The SID of the BYOC Trunk(Bring Your Own Carrier) resource that the Sip Domain will be associated with. |
# credo:disable-for-next-line Credo.Check.Readability.MaxLineLength
| `EmergencyCallerSid` | string | Whether an emergency caller sid is configured for the domain. If present, this phone number will be used as the callback for the emergency call. |
# credo:disable-for-next-line Credo.Check.Readability.MaxLineLength
| `EmergencyCallingEnabled` | boolean | Whether emergency calling is enabled for the domain. If enabled, allows emergency calls on the domain from phone numbers with validated addresses. |
# credo:disable-for-next-line Credo.Check.Readability.MaxLineLength
| `FriendlyName` | string | A descriptive string that you created 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 SIP is enabled for the domain. If enabled, TLS will be enforced and SRTP will be negotiated on all incoming calls to this sip domain. |
# credo:disable-for-next-line Credo.Check.Readability.MaxLineLength
| `SipRegistration` | boolean | Whether to allow SIP Endpoints to register with the domain to receive calls. Can be `true` or `false`. `true` allows SIP Endpoints to register with the domain to receive calls, `false` does not. |
# 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` |
# credo:disable-for-next-line Credo.Check.Readability.MaxLineLength
| `VoiceStatusCallbackMethod` | string (http-method) | The HTTP method we should use to call `voice_status_callback_url`. Can be: `GET` or `POST`. Values: `GET`, `POST` |
# credo:disable-for-next-line Credo.Check.Readability.MaxLineLength
| `VoiceStatusCallbackUrl` | string (uri) | The URL that we should call to pass status parameters (such as call ended) to your application. |
| `VoiceUrl` | string (uri) | The URL we should when the domain receives a call. |

# `delete`

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

Delete an instance of a Domain

Operation: `DeleteSipDomain` | Tags: Api20100401Domain

# `fetch`

```elixir
@spec fetch(Twilio.Client.t(), String.t(), keyword()) ::
  {:ok, Twilio.Resources.Api.V2010.SIP.Domain.t()}
  | {:ok, map(), map()}
  | :ok
  | {:error, Twilio.Error.t()}
```

Fetch an instance of a Domain

Operation: `FetchSipDomain` | Tags: Api20100401Domain

# `list`

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

Retrieve a list of domains belonging to the account used to make the request

Operation: `ListSipDomain` | Tags: Api20100401Domain

# `stream`

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

Stream: Retrieve a list of domains belonging to the account used to make the request (lazy auto-pagination).

# `update`

```elixir
@spec update(Twilio.Client.t(), String.t(), map(), keyword()) ::
  {:ok, Twilio.Resources.Api.V2010.SIP.Domain.t()}
  | {:ok, map(), map()}
  | :ok
  | {:error, Twilio.Error.t()}
```

Update the attributes of a domain

Operation: `UpdateSipDomain` | Tags: Api20100401Domain

## Optional Parameters

| Parameter | Type | Description |
|-----------|------|-------------|
# credo:disable-for-next-line Credo.Check.Readability.MaxLineLength
| `ByocTrunkSid` | string | The SID of the BYOC Trunk(Bring Your Own Carrier) resource that the Sip Domain will be associated with. |
# 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 `sip.twilio.com`. |
# credo:disable-for-next-line Credo.Check.Readability.MaxLineLength
| `EmergencyCallerSid` | string | Whether an emergency caller sid is configured for the domain. If present, this phone number will be used as the callback for the emergency call. |
# credo:disable-for-next-line Credo.Check.Readability.MaxLineLength
| `EmergencyCallingEnabled` | boolean | Whether emergency calling is enabled for the domain. If enabled, allows emergency calls on the domain from phone numbers with validated addresses. |
# credo:disable-for-next-line Credo.Check.Readability.MaxLineLength
| `FriendlyName` | string | A descriptive string that you created 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 SIP is enabled for the domain. If enabled, TLS will be enforced and SRTP will be negotiated on all incoming calls to this sip domain. |
# credo:disable-for-next-line Credo.Check.Readability.MaxLineLength
| `SipRegistration` | boolean | Whether to allow SIP Endpoints to register with the domain to receive calls. Can be `true` or `false`. `true` allows SIP Endpoints to register with the domain to receive calls, `false` does not. |
# 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` |
# credo:disable-for-next-line Credo.Check.Readability.MaxLineLength
| `VoiceStatusCallbackMethod` | string (http-method) | The HTTP method we should use to call `voice_status_callback_url`. Can be: `GET` or `POST`. Values: `GET`, `POST` |
# credo:disable-for-next-line Credo.Check.Readability.MaxLineLength
| `VoiceStatusCallbackUrl` | string (uri) | The URL that we should call to pass status parameters (such as call ended) to your application. |
| `VoiceUrl` | string (uri) | The URL we should call when the domain receives a call. |

---

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