> ## Documentation Index
> Fetch the complete documentation index at: https://unmute.ai/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Unmute compiles to exactly four targets. Pipecat and LiveKit are code targets: compile writes a Python project you run. SLNG is a hosted target: compile writes a deployment body and SLNG runs the agent, so it has no `unmute dev`. Twilio compiles to a small Python app that Twilio ConversationRelay calls; you host it, and it has no `unmute dev` either. Those four are the only values `provider` accepts in `targets.yaml`. Deepgram and ElevenLabs appear in these docs as model vendors, which is not the same thing as a target, and `slng` is both.
> The Go structs in `internal/spec` and `internal/ir` are the schema truth. Check a field against them, or run `unmute validate`, rather than against what you remember.

# Outbound calls

> Make the agent dial out, and give it the values it needs before the phone rings.

An outbound agent starts the call. That changes two things: the channel has to
declare it, and the agent usually needs to know who it is calling before the
first word.

No shipped example dials out: `examples/salon-concierge` declares
`outbound: false`, and every other package is browser only. So the snippets and
commands below are a worked example named `my-agent`, an agent that calls a
customer about an appointment. Everything in them is authorable as shown; there
is just no package in the repository to run them against.

On this page:

* [Declare the direction](#declare-the-direction) - `channels:`, key by key, for an agent that dials
* [One route per target](#one-route-per-target) - a connection file per target, key by key
* [Place a call](#place-a-call) - where the request comes from on each route
* [Give the call its values](#give-the-call-its-values) - `call_start` variables, and `--var` locally
* [Values the route supplies](#values-the-route-supplies) - what the runtime fills in, and which routes fill it

## Declare the direction

```yaml targets.yaml theme={null}
channels:
  - name: phone
    kind: telephony
    inbound: false
    outbound: true
```

Without `outbound: true`, this target has no outbound capability at all: no
route reads a destination number for it.

### Every key a channel takes

A telephony channel writes both directions, whichever one it uses.

**kind** `realtime_audio | telephony` *required*

`telephony` is a phone call. `realtime_audio` is the browser channel, and it
takes none of the keys below.

**inbound** `true | false` *required*

Whether this agent answers calls. `false` on an agent that only dials.

**outbound** `true | false` *required*

Whether this agent places calls. It is also what a warm transfer needs, since
a warm transfer dials its destination.

**required\_controls** `list of control names`

What the route has to support: `cold_transfer`, `warm_transfer`,
`dtmf_send`, `dtmf_receive`, `hold`, `hangup`, `voicemail_detection`,
`ivr_navigation`. A route that cannot do one is refused when you validate.

**on\_voicemail** `hangup | leave_message`

What the agent does when it reaches a voicemail box. It needs
`outbound: true` and a route that detects voicemail, which today is LiveKit
`sip`.

## One route per target

Dialling out is the carrier's job, so each target needs a connection that can
reach your carrier account. An agent on both targets rides two different
mechanisms, so it needs two connection files holding the same three names:

```yaml Pipecat theme={null}
# connections/twilio_voice.yaml
transport: cloud-websocket
carrier: twilio
environment:
  account_sid: TWILIO_ACCOUNT_SID
  auth_token: TWILIO_AUTH_TOKEN
  from_number: TWILIO_PHONE_NUMBER
```

```yaml LiveKit theme={null}
# connections/twilio_connector.yaml
transport: connector
carrier: twilio
environment:
  account_sid: TWILIO_ACCOUNT_SID
  auth_token: TWILIO_AUTH_TOKEN
  from_number: TWILIO_PHONE_NUMBER
```

Same three names, different `transport:`. `from_number` is the caller identity
the person you dial sees. Neither target says anything else about the route.

### Every key a connection takes

**transport** `sip | connector | cloud-websocket | daily-sip` *required*

The mechanism that carries the call. Every one of the four can dial out. The
target's provider decides which of them it accepts.

**carrier** `twilio | telnyx | plivo` *required*

The carrier account that places the call. Telnyx and Plivo dial out through
the LiveKit `sip` route only.

**environment** `route key to environment variable name`

Which variable holds each of the route's account values. Dialling out always
needs `from_number`, plus either `account_sid` and `auth_token` or the SIP
trio, depending on the route. [Which environment keys a route
accepts](https://unmute.ai/reference/connections-yaml.md#which-environment-keys-a-route-accepts)
has the set per route. The names on the right are yours, and every one is
UPPER\_SNAKE.

See [`connections/<name>.yaml`](https://unmute.ai/reference/connections-yaml) for the whole file.

## Place a call

A phone call reaches an agent that is deployed, so placing one is the
deployed platform's job, not a local command. Compile `my-agent`, deploy it
to the target's platform, and use the **Place an outbound call** section of
the generated `build/<target>/README.md`. It prints the exact request for
your route, with the trunk, project, and agent names already filled in:

* Pipecat `cloud-websocket` places the call with one request to Twilio's own
  API, carrying markup that names the deployed agent.
* Pipecat `daily-sip` places it with one request to the Pipecat Cloud
  dial-out endpoint, through the trunk your carrier setup created.
* LiveKit `sip` and LiveKit `connector` place it by dispatching this agent to
  a new room with job metadata, and the worker dials with the carrier's trunk
  settings inline.

Every one of the four surviving telephony routes can dial out. What differs
is the request shape, which is why the README is the one place to copy it
from: it already carries your own values.

## Give the call its values

An outbound call usually knows things before it starts: who is being called,
about what. Declare them as fields on `State` in `state.py`, and give each a
`call_start` source in `agent.yaml`:

```python state.py theme={null}
from pydantic import BaseModel, Field


class State(BaseModel):
    customer_id: str = Field(
        "", description="CRM id of the customer this call is about. Used by the booking tools, never spoken."
    )
    name: str = Field("", description="Customer's first name, used in the greeting and the prompt.")
    appointment_time: str = Field(
        "", description='Appointment start in spoken form, for example "tomorrow at 3 pm".'
    )
```

```yaml agent.yaml theme={null}
variables:
  - name: customer_id
    source: call_start
  - name: name
    source: call_start
  - name: appointment_time
    source: call_start
```

Locally, `--var` supplies them:

```sh theme={null}
unmute dev my-agent --target pipecat \
  --var customer_id=cus_1042 \
  --var name=Ada \
  --var "appointment_time=tomorrow at 3 pm"
```

In production the same values ride the target's own dispatch payload, as one
flat JSON object. Each generated `build/<target>/README.md` prints the exact
spelling for its platform.

That is the whole relationship: **`--var` is the local stand in for the dispatch
payload**. Same names, same types, same variables.

Values are checked against the field's type in `state.py`, and an undeclared
name is refused rather than quietly ignored.

### Every key a variable takes

Types, defaults and descriptions are not keys of `variables:`. They live on the
field in `state.py`, as the [reference](https://unmute.ai/reference/variables.md#the-state-class-holds-the-types)
explains. The list takes three keys.

**name** `string` *required*

The field on `State` this entry configures.

**source** `call_start | conversation | a system call fact`

Where the value comes from. `call_start` is the dispatch payload, which
`--var` stands in for. `conversation` is a value the model records mid-call.
The eight system facts are listed below. Left out, a task's `save:` fills
it. A `call_start` field needs a default in `state.py` when the channel is also
inbound, because an inbound call carries no dispatch payload.

**confirm** `step name`

The step that has to hear the caller agree before anything acts on this
value. Until then it renders in that step's prompt and nowhere else. See
[`confirm:`](https://unmute.ai/reference/variables#confirm-marks-a-value-the-caller-has-to-agree-to).

## Values the route supplies

Some variables are filled in by the runtime, not by you:

```yaml theme={null}
variables:
  - name: dialed_number
    source: to_number
```

`dialed_number` is a `str` field with a default on `State`.

System sources include `to_number`, `from_number`, `direction`, `call_id`,
`stream_id`, `session_id`, `carrier`, and `connection`. Seeding one with
`--var` is refused, because the runtime owns it.

**Which routes supply them, and in which direction, differs per fact.** Both
LiveKit routes supply every system source, on both directions. The two
Pipecat Twilio routes supply a smaller set: `pipecat cloud-websocket` fills
`to_number` on an outbound call, which is exactly the `dialed_number` example
above, while `pipecat daily-sip` supplies no `to_number` at all. A route that
does not grant a fact refuses the declaration at validation, rather than
leaving an empty string at call time. [The full grid](https://unmute.ai/build/prefetch.md#where-it-works)
in the pre-fetch reference has every fact, route and direction.

Declaring the fact as a `prefetch:` entry instead keeps one package compiling
on every route. Where the route supplies nothing, the entry is skipped and the
variable keeps its default, rather than the package being refused. [Where it
works](https://unmute.ai/build/prefetch.md#where-it-works) covers that shape, under "The number an
outbound call carries", and what a `cloud-websocket` call has to carry for it
to arrive.

## Where to go next

> [card] [Inbound calls](https://unmute.ai/telephony/inbound-calls.md)
>
> Take a real call, once the route is deployed.

> [card] [Get your Twilio details](https://unmute.ai/telephony/twilio.md)
>
> Which console value fills which name.

> [card] [Variables reference](https://unmute.ai/reference/variables.md)
>
> Types, sources, and where each value can be used.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.