Transfer to business
A common Virtual Agent flow is: the AI handles the front of the call, then hands the caller to a human at a business number. Transfers use an in-dialog SIP REFER. Alianza performs the transfer on your behalf — there is no new call leg for you to create and no SDP to renegotiate.
What your Virtual Agent must do
-
Send a
REFERin-dialog — sameCall-IDand tags as the ongoing call — with aRefer-Toheader carrying the business number in E.164 format:REFER sip:alianza@... SIP/2.0 Call-ID: <the ongoing call's Call-ID> Refer-To: <sip:+14155551234@...> -
Watch for in-dialog
NOTIFYrequests on the subscription theREFERimplicitly creates. These report transfer progress and the final outcome. -
On a final
NOTIFYreporting success (200 OK), expect aBYEfrom Alianza shortly after. The transfer is complete and your Experience is out of the call. -
On a final
NOTIFYreporting failure, the original call is untouched — the caller is still with you. You may retry theREFER.
Because the REFER travels inside the existing dialog, Alianza correlates it from the dialog itself. You do not attach correlation headers to a transfer.
What Alianza does
- Accepts the
REFERwith202 Accepted, then issues its ownREFERtoward the business. No new call leg, no SDP renegotiation. - Reports progress (
100 Trying) and the final outcome viaNOTIFYon the subscription theREFERcreated. - On success: sends the final
NOTIFY(200 OK), then aBYEending your Experience's leg. - On failure: reports the underlying failure reason via
NOTIFYand leaves the original call untouched.
Billing stops at the
BYE. Your Experience's leg ends when Alianza sends theBYEafter a successful transfer — not when the caller eventually hangs up with the business.
Possible outcomes
| Outcome | What you'll see | Caller impact |
|---|---|---|
| Transfer succeeded | Final NOTIFY 200 OK, then a BYE ending your leg |
Caller is now with the business; your Experience is out of the call |
Refer-To missing, not E.164, or an unsupported scheme |
400 on the REFER |
None |
Attended transfer (Replaces header) |
488 — not yet supported |
None |
| A transfer is already in progress on this call | 491 |
None |
| Business rejected the call | Final NOTIFY carrying that rejection status |
None — you may retry |
| No answer within the timeout | Final NOTIFY 408 |
None — you may retry |
| Transport failure reaching the business | Final NOTIFY 503 |
None — you may retry |
Every failure leaves the caller with your Experience, so a failed transfer is recoverable: decide whether to retry, offer an alternative, or continue the conversation.
Spec gap. The no-answer timeout that produces a
NOTIFY408is not documented, so you cannot predict how long a transfer attempt blocks before failing. Confirm the value with Alianza if your Experience needs to keep the caller informed while a transfer is ringing.Gap ID
refer-no-answer-timeout
See also
- Inbound call flow — how the call reaches you, and the
X-Alianza-Correlator-Idheader. - Known issues — current Virtual Agent limitations.