SIP (Session Initiation Protocol) technology allows voice calls and other communication services to be carried over the internet.
Talk currently supports SIP-IN for receiving calls from the internet. SIP-OUT, for making outbound calls on the internet, is currently not supported.
A common use case for a SIP-IN line is to connect an external AI agent to Talk. For example, you might want your AI agent to field the call first. If it can’t help, you’ll then be transferred to a Zendesk agent.
Once you’ve added a SIP-IN line to Talk, you can configure Talk to transfer calls to your AI agent when a human agent or voicemail is unavailable.
This article contains the following topics:
Understanding the call escalation process
Here’s a high-level overview of how the process works:
- An end user calls your Talk number using a Public Switched Telephone Network (PSTN) phone line.
- If no agent is available and voicemail is off, Talk transfers the call to the external AI agent using call overflow or IVR keypress to an external number hosted with the AI agent provider.
- The AI agent addresses the caller’s query, or, if it cannot address it, escalates the call to a Zendesk live agent using your SIP-IN line.
- During escalation, context collected by the AI agent can be passed to Zendesk in a ticket. If a ticket is not passed, Support generates a ticket for the call.
Step 1: Understanding the requirements for SIP-IN lines in Talk
Before you start, ensure that you've read and understood the requirements for using SIP-IN lines with Talk. See Adding a Talk SIP-IN line.
- The SIP header format must be: X-Zendesk-Ticket-Id=<ticket number>
- When creating the ticket, use the via_id 34 as detailed [here]. This will identify it as an incoming voice call ticket in Zendesk.
- Our provider supports G.711 μ-law (PCMU) and A-law (PCMA) codecs for media.
- Twilio voice media IPs use a single global range;: 168.86.128.0/18 with a UDP port range 10000-60000
Step 2: Connecting an incoming call from Zendesk Talk to an external AI agent
Once you’ve met the necessary requirements, you can configure connecting incoming calls to your AI agent.
To connect a call to your AI agent
- Configure your AI agent with the URI you created for your SIP-IN line. See Adding a Talk SIP-IN line.
- Ensure that call overflow is configured to dial your AI agent when a call can’t be taken by agents or answered by voicemail. You can create multiple schedules on the Suite Enterprise plan to overflow calls at specific times. A ticket number is not passed to the AI agent.
When an incoming call is received on your standard (Public Switched Telephone Network or PSTN) Zendesk phone number and no agent or voicemail is available, Talk overflows the call to the AI agent using a PSTN line. The call is shown in the Talk real-time dashboard.
Step 3: Interacting with the AI agent
In this step, the caller interacts with the external AI agent.
The AI agent authenticates the caller and creates a Zendesk Support ticket to log the conversation. If the caller is a new end user, the external AI agent can create a new profile in Support and link this profile to the ticket.
Agents will be shown the linked call tickets containing caller and SIP details when handling SIP-IN calls.
The ticket generated by the AI agent must be passed to Support using SIP headers for it to be associated with the call. Use the SIP header format, X-Zendesk-Ticket-Id=<ticket number> where ticket number is the number of the ticket you want to create.
When creating the ticket, use the via_id 34 (details here). This will help identify it as a voice incoming call ticket in Zendesk.
Step 4: Completing the call
After the AI agent takes the call, one of two things will happen:
- The external AI agent resolves the caller’s question, it ends the call and updates the ticket. The information updated in the ticket can be used in Zendesk for reporting. Omnichannel routing can work using parameters from this ticket.
- The AI agent cannot resolve the caller’s query and escalates the call
to Talk using the SIP-IN line. Talk plays the available agents greeting and the
call is offered to agents. The business hours setting on the SIP-IN line,
voicemail, and overflow settings are respected. The Talk hold music plays while
the call is routed.
After the call ends, the ticket passed by the external AI agent is displayed to the agent. The ticket contains the caller and SIP details.
To configure call escalation
- Configure your AI agent to forward calls to the SIP-IN line URI you created in Admin Center.
- Configure your AI agent to pass a ticket to support using the SIP line you created. This process might differ depending on the AI agent you are using. Refer to your AI agent documentation for help. The AI agent can use the Zendesk API to create a ticket in Support for the conversation. Additionally, the AI agent can create a Zendesk user profile if necessary. See the API documentation for help.
During escalation, context collected by the AI agent can be passed to Zendesk in the form of a Zendesk ticket. If a ticket is not passed, a new Support ticket is generated for the call.
Zendesk authenticates incoming requests on the SIP-IN line by matching the IP address of the request with the IP ranges defined in the SIP-IN Line settings. The ticket ID contained in the SIP header is used by Zendesk to link the relevant ticket to the phone call. This ticket is displayed to the agent who answers the call and is also utilised for reporting purposes.
You can find other connection requirements for forwarding the call over SIP in this article.