View on GitHub
Clone and run the full working example
Getting started
Overview
The AI agent handles the conversation and, when instructed, performs a cold SIP REFER transfer to any phone number. The agent constructs the SIP URI dynamically - the caller is transferred and the agent disconnects.How it works
- Caller requests a transfer (e.g. “Transfer me to sales” or “Transfer me to +1 555 000 1234”).
- The agent calls the
transfer_callfunction tool. - The agent sends a SIP REFER to
sip:+15550001234@your-vobiz-domain. - Vobiz routes the call to the destination.
- The agent leaves the room - the transfer is complete.
Agent function tool
Preset department transfers
Configure preset destinations in.env and map them to named tools:
Environment variables
.env
Related LiveKit templates
- LiveKit inbound calling - route calls to a Vobiz number into a LiveKit agent over a SIP trunk.
- LiveKit outbound calling - place calls from a LiveKit agent through a Vobiz SIP trunk.
- DTMF IVR - an IVR menu that accepts keypad input as well as speech.
- Agent-to-agent handoff - pass a call to a specialist agent with the conversation context.
- Answering machine detection - tell a human from voicemail before the agent speaks.
- Webhooks and CRM integration - push HMAC-signed call events to your CRM.
- All features in one agent - inbound, outbound, transfers, DTMF, AMD, and webhooks together.