Your AI agent or PBX places an outbound call through Plivo, then sends REFER mid-call to hand off to a human agent. Plivo bridges the caller to the transfer target and disconnects your endpoint. No re-dial, no dropped call.
Prerequisites
How it works
Step-by-step guide
Step 1: Set up your outbound trunk
- Go to cx.plivo.com/sip-trunking → Outbound Trunks
- Click Create New Outbound Trunk, create a credentials list, and save
- Copy the Termination SIP Domain — for example,
XXXXXXXXXXXX.zt.plivo.com
Step 2: Place the outbound call
Your endpoint dials the customer via your SIP trunk domain:Step 3: Send the REFER
When ready to hand off, send a REFER with the transfer target in theRefer-To header.
Refer-To header format:
Use your SIP trunk domain in the
Refer-To header. Transfers to other domains or arbitrary SIP URIs are blocked.Step 4: Handle NOTIFY messages
After202 Accepted, Plivo sends NOTIFY messages to report transfer progress. Your endpoint must respond to each NOTIFY with 200 OK.
Step 5: Call continues between customer and transfer target
Plivo bridges the caller to the transfer target and sends your endpoint a BYE.What callers experience
- During the transfer: The caller hears ring-back from the transfer target (180 Ringing) until the target answers.
- If the transfer fails: The caller remains on your leg. You can retry with a different number or continue the conversation.
- Music on hold: To play hold music while the transfer leg is establishing, play audio from your endpoint before sending REFER.
Response codes
Troubleshooting
Related
- SIP REFER Overview — Comparison, FAQ, and restrictions
- SIP REFER — Inbound Calls — Transfer inbound calls
- LiveKit Integration — Connect LiveKit AI agents via Plivo SIP trunking
- SIP Trunk Debug Logs — How to read SIP traces
- SIP Trunk Hangup Codes — Full list of hangup causes