# Source: https://docs.ultravox.ai/telephony/inbound-calls.md

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

# Inbound Calls

> Configure AI agents to answer incoming phone calls.

Ultravox can power AI agents that automatically answer incoming phone calls from your users. This is perfect for customer service, support lines, or any application where users initiate contact.

## How Inbound Calls Work

The simplest way to set up inbound calls is to [import your credentials](/telephony/supported-providers#providing-telephony-credentials) and point your telephony provider directly to Ultravox. Just set your telephony provider's webhook callback to `https://app.ultravox.ai/api/agents/{agent_id}/telephony_xml` to have incoming phone calls automatically create and connect to Ultravox calls.

Alternatively, you can use these steps when routing calls through your own application.

<Steps>
  <Step title="User Dials You">
    User dials your phone number purchased from your telephony provider.
  </Step>

  <Step title="Incoming Webhook">
    Provider routes the call to your configured webhook/application.
  </Step>

  <Step title="Create Ultravox Call">
    Your server creates an Ultravox call and gets a `joinUrl`.
  </Step>

  <Step title="Connect & Answer">
    Connect the call to your provider using the `joinUrl`. The AI agent answers and begins the conversation.
  </Step>
</Steps>

## Using Template Variables

When you use [Agents](/agents/overview#why-start-with-agents%3F) for creating calls, you can define template variables that get passed in at call creation time.

When using simplified incoming call handling (i.e. you have imported your credentials from a [supported provider](/telephony/supported-providers#providing-telephony-credentials)), you can define a mapping from your provider's requests to template context fields. For example, for Twilio you could add an entry like `{"From": "user.phone_number"}` to add `{"user": {"phone_number": "+15551234567"}}` to the template context .

When handling telephony webhooks yourself, this data might come from an IVR or your own application. You then specify it as usual (i.e. via template variables) when creating your Ultravox call, e.g.

```js Example: Template Context theme={null}
// System prompt expects template variables
systemPrompt: "You are calling {{customerName}}..."

// Set templateContext at call creation time
templateContext: {
  customerName: "VIP Customer",
  accountType: "enterprise"
}
```

For more see [Template Context →](/agents/making-calls#template-context-and-variables)

## Next Steps

* Check out the [Inbound Call Quickstart](/gettingstarted/quickstart/telephony-inbound)
* Learn about [Call Transfers](/telephony/call-transfers) to escalate calls to human agents