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

# LiveKit Voice Agent — Inbound, Outbound, Transfer & AMD

> A single LiveKit agent example demonstrating inbound, outbound, transfers, DTMF, answering machine detection, and webhooks together on Vobiz.

A single LiveKit agent that demonstrates all major Vobiz integration features - inbound calling, outbound dialing, call transfers, DTMF handling, and CRM webhooks - in one working example.

> [card] [View on GitHub](https://github.com/vobiz-ai/Livekit-Vobiz-All-feature-Example)
>
> Clone and run the full working example

## Getting started

```bash theme={null}
git clone https://github.com/vobiz-ai/Livekit-Vobiz-All-feature-Example.git
cd Livekit-Vobiz-All-feature-Example
pip install -r requirements.txt
python agent.py dev
```

## Overview

This example combines all Vobiz + LiveKit capabilities into a single production-ready agent. Use it as a starting point when you want to build an agent that can handle complex call scenarios without switching between multiple codebases.

## Features

* **Inbound calling** - accept calls on your Vobiz number
* **Outbound dialing** - initiate calls programmatically
* **Department transfers** - route callers to Billing, Support, or Sales via SIP REFER
* **Escalation to human** - cold transfer to a human agent
* **DTMF detection** - respond to keypad inputs during the call
* **CRM webhooks** - stream events to your backend in real time

## Agent function tools

| Tool | Description |
| - | - |
| `transfer_to_billing` | Transfer the caller to the Billing department |
| `transfer_to_support` | Transfer the caller to Technical Support |
| `escalate_to_human` | Cold transfer to a human staff member |
| `record_intent` | Log intent to CRM mid-call |

## Environment variables

```bash .env theme={null}
LIVEKIT_URL=wss://your-project.livekit.cloud
LIVEKIT_API_KEY=APIxxxxxxxxxxxxx
LIVEKIT_API_SECRET=secretxxxxxxxxxx
VOBIZ_SIP_DOMAIN=your-domain.sip.vobiz.ai
VOBIZ_USERNAME=your-username
VOBIZ_PASSWORD=your-password
OPENAI_API_KEY=sk-...
BILLING_NUMBER=+919XXXXXXXXX
SUPPORT_NUMBER=+919XXXXXXXXX
HUMAN_AGENT_NUMBER=+919XXXXXXXXX
```

## Related LiveKit templates

* [LiveKit inbound calling](https://www.vobiz.ai/docs/examples/livekit-vobiz-inbound.md) - route calls to a Vobiz number into a LiveKit agent over a SIP trunk.
* [LiveKit outbound calling](https://www.vobiz.ai/docs/examples/livekit-vobiz-outbound.md) - place calls from a LiveKit agent through a Vobiz SIP trunk.
* [Call transfer](https://www.vobiz.ai/docs/examples/vobiz-livekit-call-transfer-example.md) - transfer a live call to any phone number with SIP REFER.
* [DTMF IVR](https://www.vobiz.ai/docs/examples/vobiz-livekit-ivr-dtmf-example.md) - an IVR menu that accepts keypad input as well as speech.
* [Agent-to-agent handoff](https://www.vobiz.ai/docs/examples/vobiz-livekit-agent-to-agent-handoff-example.md) - pass a call to a specialist agent with the conversation context.
* [Answering machine detection](https://www.vobiz.ai/docs/examples/livekit-vobiz-machine-detection-agent-example.md) - tell a human from voicemail before the agent speaks.
* [Webhooks and CRM integration](https://www.vobiz.ai/docs/examples/livekit-vobiz-webhook-integration-example.md) - push HMAC-signed call events to your CRM.

To build an agent without LiveKit, see [Bare-metal XML](https://www.vobiz.ai/docs/examples/vobiz-all-xml.md), which streams call audio over a WebSocket with no third-party SDK, or [Vobiz + Pipecat](https://www.vobiz.ai/docs/examples/vobiz-x-pipecat.md).


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