Skip to main content
Transfer an active call to any E.164 phone number or department via SIP REFER from a LiveKit AI agent.

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

  1. Caller requests a transfer (e.g. “Transfer me to sales” or “Transfer me to +1 555 000 1234”).
  2. The agent calls the transfer_call function tool.
  3. The agent sends a SIP REFER to sip:+15550001234@your-vobiz-domain.
  4. Vobiz routes the call to the destination.
  5. 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