Bring Your Own Bot (BYOB) is designed for organizations that have already invested in third-party AI voice agents but want to leverage Talkdesk as their CCaaS provider. By utilizing the SIP (Session Initiation Protocol) standard, Talkdesk removes the friction of bespoke integrations. Instead of building complex connections, you can now connect a SIP-compatible AI provider directly into your Talkdesk Studio flows. This ensures a unified, end-to-end view of the customer journey.
- How it Works
- Intelligent Handoff and Context Retrieval
- Configuration and Implementation
- Reporting and Billing
- Important Information
- Need help?
How it Works
The core of this solution lies within the Connect to Autopilot Voice component in Talkdesk Studio. By selecting the External Voice Stream transport mode, Talkdesk establishes a bi-directional audio stream between the caller and your AI provider.
Two versions of this component are available, and the node variable name differs between them:
- Version 1.7: Existing flows keep this version. Admins can choose to upgrade to the newer version.
- Version 2.1: Used automatically in every newly created flow.
Version 1.7
“Escalate_to” node variable:
Version 2.1
"Autopilot_result" node variable:
Intelligent Handoff and Context Retrieval
A critical advantage of this feature is the ability to maintain conversational continuity. When a caller requests a human agent or the AI reaches the limit of its capabilities, the AI provider initiates a transfer (via a SIP REFER).
During this process, Talkdesk retrieves specific conversational context (e.g., order numbers, intent, or sentiment) passed through custom SIP headers such as User-to-User. This data is then stored in Studio variables, allowing you to:
- Route Smartly: Direct the caller to a specific queue based on the AI’s findings.
- Reduce Friction: Ensure human agents receive the necessary context so the caller doesn't have to repeat themselves.
- Monitor Outcomes: Track whether a query was resolved by the AI or required an escalation.
Configuration and Implementation
The setup process is designed to be low-code, focusing on configuration rather than heavy engineering.
Prerequisites:
- An active Conversation Orchestrator license.
- Knowledge of Talkdesk Studio and external stream configuration.
- A configured AI agent on your chosen third-party provider.
Important Step: Please include the following IP addresses in your AI Voice Platform’s allow-list to ensure the solution works and audio flows both ways.
Implementation Steps
- AI Provider Alignment: Configure your agent on your chosen platform to handle SIP signaling and define the schema for the context you wish to pass back to Talkdesk.
- Studio Integration: In Talkdesk Studio, add the Connect to Autopilot Voice component to your flow. Select External Voice Stream as the connection mode and input the target SIP URI provided by your AI vendor.
- Context Passing to the bot: You can also pass context to the AI bot by setting the “Agents availability” variable. The contents of this variable will be encoded in Hex and sent in the SIP INVITE towards the bot.
The User-to-User header is formatted as shown below before being encoded.
business_hours=<AGENT_AVAILABILITY_VAR>
An example of the request URI is below.
- Context Passing from the bot: Map a User-to-User SIP header from your provider to the Talkdesk Studio variable. This variable can dictate the logic for the remainder of the Studio flow, such as determining which team receives an escalated call. The “Connect to Autopilot Voice” component version 1.7 will populate the “escalate_to” variable. The “Connect to Autopilot voice” component version 2.1 will populate the “autopilot_result” variable. An example of the “Refer-To” header in the transfer request from the AI bot is shown below.
When creating the User-to-User header, format it as shown below, preferably in Hex encoding. If your flow uses Connect to autopilot voice version 1.7, use the format below.
escalate_to=<CONTEXT>
If your flow uses Connect to autopilot voice version 2.1, use the format below.
autopilot_result=<CONTEXT>
Note: The context can contain multiple data values separated by “,” or can be a JSON string before being encoded as hex. For example, name=abcd,offer_id=12345,addr=NY or {“name”:”abcd”,”addr”:”NY”}.
An example of the Refer-To header is below.
Refer-To: <sip:escalation@talkdesk.com?User-to-User=657363616c6174655f746f3d6167656e74732d7175657565%3Bencoding%3Dhex>
- Custom Headers: You can also define custom HTTP headers that will be sent over the SIP INVITE to the AI bot. This is available for Connect to Autopilot voice component version 2.1 and above. Follow this link for more details.
An example of the custom header value is shown in the screenshot below.
- Security: Ensure all connections are secure. Talkdesk utilizes TLS for signaling and SRTP for media to maintain end-to-end confidentiality. Refer to the screenshot of the configuration on how to enable security over SIP signaling and media for the call.
Reporting and Billing
One of the primary benefits of this integration is the consolidation of data. Even though the "brain" of the conversation lives with a third-party provider, the interaction data remains within Talkdesk for a single source of truth.
- Reporting: Dedicated reports allow you to determine how many calls were successfully resolved by the AI agent versus how many were escalated to human agents. These reports can be downloaded on demand or scheduled for regular email delivery.
- Billing: This feature is part of the Conversation Orchestrator suite. It utilizes your existing per-minute pricing structure. The billing starts when the call is sent to the third-party AI bot and ends when the call is ended or transferred back to Talkdesk by the third-party bot. Usage appears in Admin > Billing > “Conversation Orchestrator” section.
Important Information
- Context Size Limits: Due to network limitations on SIP header and message sizes, the context passed from your AI agent to Talkdesk must be concise. Talkdesk supports a maximum context size of 256 bytes. We recommend standardizing the data schema with your provider beforehand.
- Context cannot use “|” or “;” as the delimiter between multiple data values.
- Transcripts: While the voice interaction is seamless, full-text transcripts generated by the third-party AI agent are currently not accessible via Talkdesk APIs in this release.
- Future-Proofing: This integration provides a seamless path to future-proofing your contact center. By using Talkdesk as your CCaaS layer today, you can easily transition to native Agentic AI and Navigator features when you are ready to consolidate your AI stack.
- Due to a limitation on Twilio SIP, you cannot configure the SIP target as another Twilio domain. This will lead to Error 32214 on Twilio, and the call will fail. To work around this limitation, use a SIP proxy or middleware and configure it as the target in the External Voice Stream field.
- Upgrading the Connect to autopilot voice component: Studio will provide an option to upgrade the component to the latest version. If you choose to upgrade the version, note the change in the node variable name. Refer to the “Context passing from the bot” section to make changes in the way your AI bot returns the context to Studio.
Need help?
Please get in touch with your Talkdesk representative to discuss compatibility or send us a ticket via Talkdesk Customer Care.