#Hello, I've been trying to add a refer for my agent, so that it can transfer a call from an AI agen
1 messages · Page 1 of 1 (latest)
Short answer: Add the “Transfer to Human” system tool to your agent and set the transfer rule’s type to SIP REFER. This lets the agent hand off the live call to a phone number or SIP URI using SIP REFER.
How to set it up (UI):
- Agents > Tools > Add tool > Transfer to Human (transfer_to_number).
- Create a transfer rule:
- Transfer Type: SIP REFER
- Number Type: Phone or SIP URI
- Destination: E.164 phone number (+1…) or sip:user@domain
- Condition: e.g., “Caller asks to speak to a human.”
- Optional: add custom SIP REFER headers (e.g., X-Customer-ID) if your PBX needs them. (elevenlabs.io)
Important constraints for SIP REFER:
- Works only on phone calls (not chat).
- Requires the conversation to be running over SIP, and your SIP trunk/provider must allow REFER.
- SIP REFER does not support warm transfer messages or post‑dial digits. If you need a warm (conference) or blind transfer, use the native Twilio integration instead. (elevenlabs.io)
SIP trunking prerequisites:
- Import/configure your SIP trunk number in ElevenLabs (Phone Numbers > Import from SIP trunk), ensure correct SIP URI formats, transport, and any required authentication/headers. (elevenlabs.io)
API example (from docs, Python SDK):
- Configure transfer rules with transfer_type="sip_refer" and optional custom_sip_headers pointing to a SIP URI or phone number; attach the tool to your agent. (elevenlabs.io)
References:
- Transfer to number (Transfer to Human) tool, including SIP REFER details and limitations. (elevenlabs.io)
- SIP trunking setup for ElevenLabs Agents. (elevenlabs.io)
If you share which SIP provider you use, I can point out any provider‑specific steps called out in the SIP trunking guide. (elevenlabs.io)
Sources:
Transfer to number | ElevenLabs Documentation
Transfer to number | ElevenLabs Documentation
SIP trunking | ElevenLabs Documentation
Transfer to number | ElevenLabs Documentation
Transfer to number | ElevenLabs Documentation
SIP trunking | ElevenLabs Documentation
SIP trunking | ElevenLabs Documentation
I've done the REFER, but it says "Failed to transfer the call. Please reach out to support if this issue persists."
I confirm that my vendor supports REFER as it works on other platforms
Thanks for confirming your carrier supports REFER. In ElevenLabs, that error usually means one of the prerequisites for our SIP REFER transfer flow isn’t met, or the call is on an integration path that doesn’t support transfers.
Do this quick check:
- Make sure you are NOT using the Twilio “register_call” pattern. Transfers are not available with register_call; use the native Twilio number import or a SIP trunked number instead. (elevenlabs.io)
- Verify the live call is using SIP (not Twilio register/WebRTC) and that the transfer rule type is set to SIP REFER. SIP REFER transfers work only on SIP calls and require your SIP trunk to allow REFER; only SIP REFER supports transferring to a SIP URI. (elevenlabs.io)
- Confirm the destination exactly matches a preconfigured transfer rule and format:
- Phone numbers must be E.164 (+15551234567)
- SIP URIs must be valid sip:user@domain (or sips:…)
If the number/URI isn’t in the allowed list, the transfer will fail. (elevenlabs.io)
- Check your SIP trunk outbound settings: outbound legs are sent to the hostname you configured under the phone number’s SIP trunk. Ensure TCP/TLS signaling is allowed end‑to‑end (UDP is not available) and the trunk can place the outbound leg to the destination. (elevenlabs.io)
- If you imported a Twilio number (native integration), use Conference transfer (default) or Blind transfer (Twilio-only) rather than SIP REFER. Blind transfer is available only when the phone number is imported via the native Twilio integration. (elevenlabs.io)
- Open Calls History to see the exact failure reason attached to the call record; it often pinpoints configuration issues (e.g., missing variables after a transfer). (help.elevenlabs.io)
If you still see “Failed to transfer the call,” please switch the rule to Conference transfer as a control test (to verify destination reachability), then share the call’s entry from Calls History with Support. (elevenlabs.io)
Sources:
Register Twilio calls | ElevenLabs Documentation
Transfer to number | ElevenLabs Documentation
Transfer to number | ElevenLabs Documentation
SIP trunking | ElevenLabs Documentation
Twilio native integration | ElevenLabs Documentation
Where can I locate the reason for my call failing? – ElevenLabs
Transfer to number | ElevenLabs Documentation
This is not twilio, this is BYOC
Under BYOC (SIP trunking), call transfer is supported only via SIP REFER. Conference and blind transfers are Twilio‑only. To enable transfers in BYOC, do the following:
- Connect your carrier using SIP trunking and route the call to the agent over SIP (TCP/TLS). (elevenlabs.io)
- In your agent, add the “Transfer to number” system tool and create a rule with:
- transfer_type: "sip_refer"
- transfer_destination: either a phone number in E.164 (e.g., +12125551234) or a SIP URI (e.g., sip:user@example.com)
- Optional custom_sip_headers if you need to pass metadata with the REFER
Notes: warm transfer messages and post_dial_digits are not supported with SIP REFER. (elevenlabs.io)
Example (API config):
- transfer_type: "sip_refer"
- transfer_destination: { "type": "sip_uri", "sip_uri": "sip:support@example.com" }
- custom_sip_headers: [{ "key": "X-Department", "value": "support" }] (elevenlabs.io)
If you see “Failed to transfer the call” in BYOC:
- Verify the conversation is running over SIP trunking (not a WebSocket/connector path) and that your SIP trunk allows transfer via SIP REFER; transfers will fail if REFER is disallowed. (elevenlabs.io)
Related limitations and references:
- BYOC/SIP trunking setup and requirements. (elevenlabs.io)
- Twilio “register call” pattern does not support transfers (for clarity if comparing approaches). (elevenlabs.io)
Docs:
- Transfer to number (SIP REFER) tool. (elevenlabs.io)
- SIP trunking (BYOC). (elevenlabs.io)
Sources:
SIP trunking | ElevenLabs Documentation
Transfer to number | ElevenLabs Documentation
Transfer to number | ElevenLabs Documentation
Transfer to number | ElevenLabs Documentation
SIP trunking | ElevenLabs Documentation
Register Twilio calls | ElevenLabs Documentation
Transfer to number | ElevenLabs Documentation
SIP trunking | ElevenLabs Documentation
I do not even see the REFER being sent by the platform to me
Short answer: ElevenLabs will only send a SIP REFER if you explicitly configure the agent’s Transfer to Human tool to use “SIP REFER” and the active call leg is on SIP (BYOC). By default, transfers are “Conference,” which does not emit REFER.
Checklist to get REFER emitted to your SIP trunk:
- Confirm the call is running over SIP trunking (BYOC), not the Twilio-native integration or web widget. SIP REFER transfers are only available “when using SIP protocol during the conversation.” (elevenlabs.io)
- In your agent, open Tools > Transfer to Human and set the specific rule’s Transfer Type to “SIP REFER.” The default is Conference, which will not generate a REFER. (elevenlabs.io)
- If you’re transferring to a SIP URI, note that “Only SIP REFER supports transferring to a SIP URI.” (elevenlabs.io)
- Ensure your SIP trunk accepts REFER from ElevenLabs. The feature “requires your SIP Trunk to allow transfer via SIP REFER.” (elevenlabs.io)
- Verify your SIP trunk transport is TCP or TLS; UDP is not supported by ElevenLabs’ SIP stack. If your carrier expects UDP, REFER (or any SIP message) will not traverse that leg. (elevenlabs.io)
- Optional: If your carrier needs metadata on the REFER, add Custom SIP REFER headers in the same tool configuration. (elevenlabs.io)
Where to look if a transfer fails:
- Check Call History for the failure reason surfaced by the platform. If none is shown, contact Support with the call/conversation IDs. (help.elevenlabs.io)
Relevant docs:
- Transfer to number (how to enable SIP REFER transfers and their prerequisites). (elevenlabs.io)
- SIP trunking (BYOC setup, transports, and limitations such as “UDP transport is not currently available”). (elevenlabs.io)
- Call failure reasons and Support contact. (help.elevenlabs.io)
Give me an example of how sip uri should look
- General SIP URI format: sip:identifier@domain:port. (elevenlabs.io)
- ElevenLabs example (complete call): sip:+19991234567@sip.rtc.elevenlabs.io:5060. The identifier can be an E.164 number or a string like 1000; do not call sip@sip.rtc.elevenlabs.io:5060 without an identifier. (elevenlabs.io)
- ElevenLabs trunk endpoint (host with transport): sip:sip.rtc.elevenlabs.io:5060;transport=tcp. (elevenlabs.io)
Sources:
SIP trunking | ElevenLabs Documentation
SIP trunking | ElevenLabs Documentation
SIP trunking | ElevenLabs Documentation
Even when using the format you have provided, the call was not refered
Thanks for the update. If the call wasn’t transferred via SIP REFER, please verify the following (all requirements are from the official docs):
- Use the Transfer to Human tool with Transfer Type set to SIP REFER. Only SIP REFER supports transferring to a SIP URI. (elevenlabs.io)
- SIP REFER transfers work only when the live call itself is running over SIP and your SIP trunk allows transfers via SIP REFER. If your trunk blocks REFER, the transfer will not occur. (elevenlabs.io)
- The destination must be a valid SIP URI, for example: sip:1234567890@example.com (sips:user@domain is also valid). (elevenlabs.io)
- If you’re placing inbound calls to ElevenLabs via SIP, ensure your initial INVITE targets a URI with an identifier, e.g. sip:+19991234567@sip.rtc.elevenlabs.io:5060 (do not call sip@sip.rtc.elevenlabs.io:5060). Misrouting here can prevent subsequent transfers from working. (elevenlabs.io)
- Note that SIP-based transfers do not support warm transfer messages; that behavior is only available with the native Twilio integration (useful to rule out expectations during testing). (elevenlabs.io)
If you’ve met all of the above and the REFER still doesn’t fire, it’s almost always a trunk-side policy issue (REFER not permitted). Please confirm REFER support with your SIP provider and retry with the exact SIP URI format shown above. (elevenlabs.io)
Sources:
Transfer to number | ElevenLabs Documentation
Transfer to number | ElevenLabs Documentation
Transfer to number | ElevenLabs Documentation
SIP trunking | ElevenLabs Documentation
Transfer to number | ElevenLabs Documentation
Transfer to number | ElevenLabs Documentation
what is meant by warm transfer messages
In ElevenLabs Agents, “warm transfer messages” are the agent_message text that the AI plays to the human operator it is transferring the caller to, giving brief context before the caller is bridged. This is supported only for Conference Transfer when using the native Twilio integration; it is not available for SIP REFER or blind transfers. Note there is also a separate client_message that is played to the caller while the transfer is in progress. (elevenlabs.io)
Does upgrading my plan mean i get additional credits?