# `Twilio.TwiML.VoiceResponse`
[🔗](https://github.com/jeffhuen/twilio_elixir/blob/main/lib/twilio/twiml/voice_response.ex#L1)

TwiML for voice calls.

## Example

    alias Twilio.TwiML.VoiceResponse

    VoiceResponse.new()
    |> VoiceResponse.say("Hello!", voice: "alice")
    |> VoiceResponse.gather(num_digits: 1, children: [
      VoiceResponse.say_element("Press 1 for sales.")
    ])
    |> VoiceResponse.to_xml()

# `t`

```elixir
@type t() :: Twilio.TwiML.t()
```

# `client`

```elixir
@spec client(
  String.t(),
  keyword()
) :: Twilio.TwiML.element()
```

Create a Client noun for use inside Dial.

# `dial`

```elixir
@spec dial(t(), String.t() | nil, keyword()) :: t()
```

Dial a phone number or SIP endpoint.

# `enqueue`

```elixir
@spec enqueue(t(), String.t(), keyword()) :: t()
```

Enqueue a call.

# `gather`

```elixir
@spec gather(
  t(),
  keyword()
) :: t()
```

Gather input from the caller (DTMF or speech).

# `hangup`

```elixir
@spec hangup(t()) :: t()
```

Hang up the call.

# `new`

```elixir
@spec new() :: t()
```

# `number`

```elixir
@spec number(
  String.t(),
  keyword()
) :: Twilio.TwiML.element()
```

Create a Number noun for use inside Dial.

# `pause`

```elixir
@spec pause(
  t(),
  keyword()
) :: t()
```

Pause for a number of seconds.

# `play`

```elixir
@spec play(t(), String.t(), keyword()) :: t()
```

Play an audio file.

# `queue`

```elixir
@spec queue(
  String.t(),
  keyword()
) :: Twilio.TwiML.element()
```

Create a Queue noun for use inside Dial.

# `record`

```elixir
@spec record(
  t(),
  keyword()
) :: t()
```

Record the caller.

# `redirect`

```elixir
@spec redirect(t(), String.t(), keyword()) :: t()
```

Redirect to another TwiML URL.

# `reject`

```elixir
@spec reject(
  t(),
  keyword()
) :: t()
```

Reject an incoming call.

# `say`

```elixir
@spec say(t(), String.t(), keyword()) :: t()
```

Say text to the caller.

# `say_element`

```elixir
@spec say_element(
  String.t(),
  keyword()
) :: Twilio.TwiML.element()
```

Create a Say element for use as a child (e.g. inside Gather).

# `sip`

```elixir
@spec sip(
  String.t(),
  keyword()
) :: Twilio.TwiML.element()
```

Create a Sip noun for use inside Dial.

# `to_xml`

```elixir
@spec to_xml(t()) :: String.t()
```

---

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