# `Caracola.Dialog.Invite`
[🔗](https://github.com/netkubes/caracola/blob/v0.1.0-rc.1/lib/caracola/dialog/invite.ex#L1)

The INVITE usage of a dialog: the last INVITE transaction and the state
of the session. Equivalent to NkSIP's `#invite{}`.

`status` moves through `:proceeding_uac | :proceeding_uas` (provisional
responses), `:accepted_uac | :accepted_uas` (2xx response sent or
received, waiting for the ACK), `:confirmed` (ACK sent or received) and
`:bye` (BYE sent or received).

`local_sdp` and `remote_sdp` are the current session descriptions, once
an offer/answer exchange has been completed.

# `sdp_offer`

```elixir
@type sdp_offer() ::
  {:local | :remote, Caracola.Message.method(), Caracola.SDP.t()} | nil
```

Pending offer or answer: who sent it, in which method, and the SDP.

# `status`

```elixir
@type status() ::
  :proceeding_uac
  | :proceeding_uas
  | :accepted_uac
  | :accepted_uas
  | :confirmed
  | :bye
```

The status of the INVITE usage of a dialog, and which side (UAC or UAS) is in it.

# `t`

```elixir
@type t() :: %Caracola.Dialog.Invite{
  ack: Caracola.Message.t() | nil,
  answered: integer() | nil,
  class: :uac | :uas | nil,
  local_sdp: Caracola.SDP.t() | nil,
  media_started: boolean(),
  next_retrans: non_neg_integer() | nil,
  remote_sdp: Caracola.SDP.t() | nil,
  request: Caracola.Message.t() | nil,
  response: Caracola.Message.t() | nil,
  retrans_timer: {atom(), reference()} | nil,
  sdp_answer: sdp_offer(),
  sdp_offer: sdp_offer(),
  status: status(),
  timeout_timer: {atom(), reference()} | nil
}
```

The INVITE usage of a dialog: status, class, requests and responses, SDP and timers.

---

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