A caller dials your Plivo number, Plivo routes it to your AI agent or PBX, and your endpoint sends REFER to hand off to a human agent. Plivo bridges the caller to the transfer target and disconnects your endpoint. The caller never re-dials.
Prerequisites
How it works
Step-by-step guide
Step 1: Set up your inbound trunk
- Go to cx.plivo.com/sip-trunking → Inbound Trunks
- Create or select an inbound trunk and set your SIP endpoint as the Primary URI
- Assign a Plivo number to the trunk — go to the trunk → Phone Numbers → link a number
Step 2: Answer the inbound call
When a customer dials your Plivo number, Plivo sends an INVITE to your SIP endpoint URI. Your endpoint responds200 OK to answer.
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 (ending in .zt.plivo.com). 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. The original caller’s number is preserved as the caller ID presented to the transfer target.What callers experience
- Caller ID preserved: The transfer target sees the original caller’s number, not your endpoint’s SIP URI.
- 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 — Outbound Calls — Transfer outbound calls
- SIP Trunk Debug Logs — How to read SIP traces
- SIP Trunk Hangup Codes — Full list of hangup causes