{
    "componentChunkName": "component---src-templates-doc-page-js",
    "path": "/docs/en/telephony/call_routing/",
    "result": {"data":{"site":{"siteMetadata":{"title":"Gatsby-doc-engine"}},"markdownRemark":{"id":"5f83adce-2910-5b3e-aa16-f1d357a31f04","excerpt":"Call Routing When configuring telephony, it is possible to create multiple connections that will use different logins, but the same host/protocol/port, active…","html":"<h1>Call Routing</h1>\n<hr>\n<p>When configuring telephony, it is possible to <a href=\"/1.10.3/docs/en/telephony/telephony_setup\">create multiple connections</a> that will use different logins, but the same host/protocol/port, active registration and allowed incoming calls.</p>\n<p>Routing is performed for such connections. Calls to numbers specified in the login are distributed to the corresponding SIP trunks and then to different bot channels.</p>\n</br>\n<h4>Transferring a call from a bot script to another SIP trunk</h4>\n<p><a href=\"/1.10.3/docs/en/bot_answers/message_types#switch\">When transferring a call from a bot script to an operator</a>, you can specify the <code class=\"language-text\">transferChannel</code> optional field:</p>\n<div class=\"gatsby-highlight\" data-language=\"js\"><pre class=\"language-js\"><code class=\"language-js\">$response<span class=\"token punctuation\">.</span>replies<span class=\"token punctuation\">.</span><span class=\"token function\">push</span><span class=\"token punctuation\">(</span><span class=\"token punctuation\">{</span>\n      <span class=\"token literal-property property\">type</span><span class=\"token operator\">:</span><span class=\"token string\">\"switch\"</span><span class=\"token punctuation\">,</span>\n      <span class=\"token literal-property property\">closeChatPhrases</span><span class=\"token operator\">:</span> <span class=\"token string\">\"Reset the operator\"</span><span class=\"token punctuation\">,</span>\n      <span class=\"token literal-property property\">firstMessage</span><span class=\"token operator\">:</span> <span class=\"token string\">\"\"</span><span class=\"token punctuation\">,</span>\n      <span class=\"token literal-property property\">phoneNumber</span><span class=\"token operator\">:</span> <span class=\"token string\">\"79216665544\"</span><span class=\"token punctuation\">,</span>\n      <span class=\"token literal-property property\">transferChannel</span> <span class=\"token operator\">:</span> <span class=\"token string\">\"237-test-237-VDQ-28334674\"</span>        <span class=\"token comment\">// botId</span>\n      <span class=\"token punctuation\">}</span><span class=\"token punctuation\">)</span><span class=\"token punctuation\">;</span></code></pre></div>\n<p>Set the <code class=\"language-text\">transferChannel</code> parameter to the bot’s <code class=\"language-text\">botId</code>. You can copy the <code class=\"language-text\">botId</code> value from the interface: go to the project > click <em>Channels</em> in the control panel > copy <code class=\"language-text\">botId</code> under the channel name.</p>\n<p class='warn'>If the <code class=\"language-text\">transferChannel: \"botId\"</code> field is specified, the call is transferred via the SIP trunk for this channel. Parameters of the connected SIP trunk are applied.</p>\n<p>If an incorrect <code class=\"language-text\">botId</code> is specified or the field is not specified, the call is transferred through the SIP trunk where the phone call was established.</p>","frontmatter":{"title":"","description":null},"headings":[{"value":"Call Routing"}]}},"pageContext":{"slug":"/docs/en/telephony/call_routing/","previous":{"fields":{"slug":"/docs/en/telephony/call_tasks/"},"frontmatter":{"title":"","description":null}},"next":{"fields":{"slug":"/docs/en/telephony/call_policy/"},"frontmatter":{"title":"","description":null}}}},
    "staticQueryHashes": ["1209419333"]}