Connecting an external AI agent using a SIP-IN line

<body>
<p id="docs-hc-snippet" style="display: none;">SIP (Session Initiation Protocol) technology allows voice calls and other communication services to be carried over the internet.</p>
<div class="article-banners">
<div id="docs-wmp-link">
<a href="https://support.zendesk.com/hc/en-us/articles/5411234991258-plan" rel="noopener" target="_blank">What's my plan?</a>
</div>

<div class="article-banner" id="suite_all">
<table>
<tbody>
<tr>
<td>
<strong>All Suites</strong>
</td>
<td>Team, Growth, Professional, Enterprise, or Enterprise Plus</td>
</tr>
</tbody>
</table>
</div>

<div class="article-banner" id="support_with_talk_all">
<table>
<tbody>
<tr>
<td>
<strong>Support with</strong>
</td>
<td>Talk Team, Professional, or Enterprise</td>
</tr>
</tbody>
</table>
</div>

</div>

<div class="body">

<p class="p">SIP (Session Initiation Protocol) technology allows voice calls and other
communication services to be carried over the internet.</p>
<p class="p">SIP-IN, for receiving calls from the internet, is supported. SIP-OUT, for
making outbound calls on the internet, is currently not supported.</p>
<p class="p">A common use case for a SIP-IN line is to connect an external AI agent to
Zendesk. 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.</p>
<p class="p">Once you’ve <a class="xref" href="https://support.zendesk.com/hc/en-us/articles/8397091234586" target="_blank">added a SIP-IN line</a>, you can configure call transfer to your
AI agent when a human agent or voicemail is unavailable.</p>
<p class="p">This article contains the following topics:</p>
<ul class="ul" id="Talk_sipin_ai__ul_jkv_tmt_kdc">
<li class="li"><a class="xref" href="#topic_ulw_2fc_qdc">Understanding the call escalation process</a></li>
<li class="li"><a class="xref" href="#topic_y5h_rmt_kdc">Step 1: Understanding the requirements for SIP-IN lines</a></li>
<li class="li"><a class="xref" href="#topic_wt5_rmt_kdc">Step 2: Connecting an incoming call to an external AI agent</a></li>
<li class="li"><a class="xref" href="#topic_zmv_rmt_kdc">Step 3: Interacting with the AI agent</a></li>
<li class="li"><a class="xref" href="#topic_dcw_rmt_kdc">Step 4: Completing the call</a></li>
</ul>
</div>
<div aria-labelledby="ariaid-title2" class="topic nested1" id="topic_ulw_2fc_qdc">
<h2 class="title topictitle2" id="ariaid-title2">Understanding the call escalation process</h2>
<div class="body">
<p class="p">Here’s a high-level overview of how the process works:</p>
<p class="p"><img class="image" id="topic_ulw_2fc_qdc__image_p3f_zlt_kdc" src="https://zen-marketing-documentation.s3.amazonaws.com/docs/en/Talk_sipin_27.png" width="500"></p>
<ol class="ol" id="topic_ulw_2fc_qdc__ol_zwz_lfc_qdc">
<li class="li">An end user calls your phone number using a Public Switched Telephone
Network (PSTN) phone line.</li>
<li class="li">If no agent is available and voicemail is off, the call is transferred
to the external AI agent using <a class="xref" href="https://support.zendesk.com/hc/en-us/articles/4408832017690" target="_blank">call overflow</a> or <a class="xref" href="https://support.zendesk.com/hc/en-us/articles/4408885628698" target="_blank">IVR keypress</a> to an external number
hosted with the AI agent provider.</li>
<li class="li">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.</li>
<li class="li">During escalation, context collected by the AI agent can be passed to
Zendesk in a ticket.</li>
<li class="li">At the end of the overflowed call to the external number, a ticket is created
with the tag "call_overflow".</li>
</ol>
</div>
</div>
<div aria-labelledby="ariaid-title3" class="topic nested1" id="topic_y5h_rmt_kdc">
<h2 class="title topictitle2" id="ariaid-title3">Step 1: Understanding the requirements for SIP-IN lines</h2>
<div class="body">
<p class="p">Before you start, ensure that you've read and understood the requirements for using
SIP-IN lines. See <a class="xref" href="https://support.zendesk.com/hc/en-us/articles/8397091234586" target="_blank">Adding a SIP-IN line</a>.</p>
<div class="p">A ticket (containing all relevant call information) can be created by the AI agent
partner before the call, and the ticket ID is passed to Zendesk to be associated
with the SIP call. Agents will be shown the linked call tickets containing caller
and SIP details when handling SIP-IN calls, ensuring a seamless conversation. You
must configure your AI agent to create a ticket. You can use the <a class="xref" href="https://developer.zendesk.com/documentation" target="_blank">Zendesk API</a> and your AI agent's documentation to learn
how to do this. Creating a ticket has the following requirements:<ul class="ul" id="topic_y5h_rmt_kdc__ul_pbt_rfc_qdc">
<li class="li">The SIP header format must be: X-Zendesk-Ticket-Id=&lt;<em class="ph i">ticket
number</em>&gt;.</li>
<li class="li">When creating the ticket, use the via_id 34 as detailed <a class="xref" href="https://developer.zendesk.com/documentation/ticketing/reference-guides/via-types/#:~:text=34,Phone%20call%20(incoming)" target="_blank">here</a>. This will identify it as an
incoming voice call ticket in Zendesk.</li>
<li class="li">Our provider supports G.711 μ-law (PCMU) and A-law (PCMA) codecs
for media.</li>
<li class="li">Twilio voice media IPs use a single global range: 168.86.128.0/18,
with a UDP port range 10000-60000.</li>
</ul>
</div>
</div>
</div>
<div aria-labelledby="ariaid-title4" class="topic nested1" id="topic_wt5_rmt_kdc">
<h2 class="title topictitle2" id="ariaid-title4">Step 2: Connecting an incoming call to an external AI agent</h2>
<div class="body">
<p class="p">Once you’ve met the necessary requirements, you can configure connecting
incoming calls to your AI agent.</p>
<div class="p">
<div class="note note">
<span class="notetitle">Note:</span> Multiple schedules can be created on Suite Enterprise plan to overflow the call at specific
times.</div>
</div>
<p class="p"><strong class="ph b">To connect a call to your AI agent</strong></p>
<ol class="ol" id="topic_wt5_rmt_kdc__ol_dvt_z3c_qdc">
<li class="li">Configure your AI agent with a SIP URI using the domain you defined
for your SIP line. For example,
<code class="ph codeph">anyuser@department-company-zendesk.sip.twilio.com</code>. See
<a class="xref" href="https://support.zendesk.com/hc/en-us/articles/8397091234586" target="_blank">Adding a SIP-IN line</a>. </li>
<li class="li">Ensure that <a class="xref" href="https://support.zendesk.com/hc/en-us/articles/4408832017690" target="_blank">call overflow</a> is configured to dial
your AI agent when a call can’t be taken by agents or answered by voicemail. You
can <a class="xref" href="https://support.zendesk.com/hc/en-us/articles/4408842938522" target="_blank">create multiple schedules</a> on the Suite
Enterprise plan to overflow calls at specific times. A ticket number is not
passed to the AI agent.</li>
</ol>
<p class="p">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, the call
overflows to the AI agent using a PSTN line. The call is shown in the <a class="xref" href="https://support.zendesk.com/hc/en-us/articles/4408831823514" target="_blank">real-time dashboard</a>.</p>
</div>
</div>
<div aria-labelledby="ariaid-title5" class="topic nested1" id="topic_zmv_rmt_kdc">
<h2 class="title topictitle2" id="ariaid-title5">Step 3: Interacting with the AI agent</h2>
<div class="body">
<p class="p">In this step, the caller interacts with the external AI agent.</p>
<p class="p">The AI agent authenticates the caller and creates a ticket to log the
conversation. If the caller is a new end user, the external AI agent can create a
new profile and link this profile to the ticket.</p>
<p class="p">Agents will be shown the linked call tickets containing caller and SIP
details when handling SIP-IN calls.</p>
<p class="p">The ticket generated by the AI agent must:</p>
<ul class="ul" id="topic_zmv_rmt_kdc__ul_wzk_bvz_ygc">
<li class="li">Set the SIP header format to X-Zendesk-Ticket-Id=&lt;<em class="ph i">ticket
number</em>&gt;, to pass the ticket number.</li>
<li class="li">Use the via_id 34 (details <a class="xref" href="https://developer.zendesk.com/documentation/ticketing/reference-guides/via-types/#:~:text=34,Phone%20call%20(incoming)" target="_blank">here</a>). This will help identify it as
an incoming voice call ticket in Zendesk.</li>
</ul>
<div class="p">
<div class="note tip">
<span class="tiptitle">Tip:</span> Separate from the AI agent’s ticket, an <a class="xref" href="https://support.zendesk.com/hc/en-us/articles/4408821302810" target="_blank">overflow ticket is created</a> when the
overflowed call to the external number ends. If you don’t need this ticket, you
can use <a class="xref" href="https://support.zendesk.com/hc/en-us/articles/4408886797466" target="_blank">a trigger</a> to automatically close it.
You can identify overflow tickets by the ticket tag, “call_overflow”.</div>
</div>
</div>
</div>
<div aria-labelledby="ariaid-title6" class="topic nested1" id="topic_dcw_rmt_kdc">
<h2 class="title topictitle2" id="ariaid-title6">Step 4: Completing the call</h2>
<div class="body">
<p class="p">After the AI agent takes the call, one of two things will happen:</p>
<ul class="ul" id="topic_dcw_rmt_kdc__ul_cgb_dkc_qdc">
<li class="li">The external AI agent resolves the caller’s question, ends the call,
and updates the ticket. The information updated in the ticket can be used for
reporting. <a class="xref" href="https://support.zendesk.com/hc/en-us/articles/4409149119514" target="_blank">Omnichannel routing</a> can work using
parameters from this ticket.</li>
<li class="li">The AI agent cannot resolve the caller’s query and escalates the call
using the SIP-IN line. The available agents greeting plays, and the call is
offered to agents. The business hours setting on the SIP-IN line, voicemail, and
overflow settings are respected. The hold music plays while the call is
routed.<p class="p">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.</p>
</li>
</ul>
<p class="p"><strong class="ph b">To configure call escalation</strong></p>
<ol class="ol" id="topic_dcw_rmt_kdc__ol_dgb_dkc_qdc">
<li class="li">Configure your AI agent to forward calls to the SIP-IN line URI you
created in Admin Center.</li>
<li class="li">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. <a class="xref" href="https://developer.zendesk.com/api-reference/ticketing/tickets/tickets/" target="_blank">See the API documentation</a> for
help.</li>
</ol>
<div class="p">
<div class="note important">
<span class="importanttitle">Important:</span> When you create a ticket using the API, make sure to use via_id 34 to create
the ticket.</div>
</div>
<p class="p">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, the overflow
ticket created when the overflowed call ends, with tag "call_overflow", serves as
the record of the call.</p>
<p class="p">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 used for reporting purposes.</p>
<p class="p">You can find other connection requirements for forwarding the call over SIP
<a class="xref" href="https://support.zendesk.com/hc/en-us/articles/8397091234586-Adding-a-Talk-SIP-IN-line#topic_idv_2dt_kdc" target="_blank">in this article</a>.</p>
</div>
</div>
<script id="docs-schema-markup" type="application/ld+json">{
"@context": "https://schema.org",
"@type": "TechArticle",
"@id": "https://support.zendesk.com/hc/en-us/articles/8397061704474-Connecting-an-external-AI-agent-using-a-SIP-IN-line",
"url": "https://support.zendesk.com/hc/en-us/articles/8397061704474-Connecting-an-external-AI-agent-using-a-SIP-IN-line",
"headline": "Connecting an external AI agent using a SIP-IN line",
"description": "You can connect an external AI agent to your phone system using a SIP-IN line to handle incoming calls, escalate to live agents if needed, and manage call tickets for tracking and reporting.",
"articleSection": "Setting up your voice channel",
"datePublished": "2024-11-18T20:29:51+00:00",
"dateModified": "2026-04-02T13:18:41.823059+00:00",
"inLanguage": "en-US",
"mainEntityOfPage": {
"@type": "WebPage",
"@id": "https://support.zendesk.com/hc/en-us/articles/8397061704474-Connecting-an-external-AI-agent-using-a-SIP-IN-line"
},
"author": {
"@type": "Organization",
"name": "Zendesk",
"url": "https://www.zendesk.com"
},
"publisher": {
"@type": "Organization",
"name": "Zendesk"
},
"isPartOf": {
"@type": "WebSite",
"name": "Zendesk Help",
"url": "https://support.zendesk.com/hc/en-us"
},
"about": {
"@type": "SoftwareApplication",
"name": "Zendesk"
}
}</script>
</body>