# Routing and forwarding

With routing, you determine when and by which path incoming calls end up with your AI Agent. Only by integrating it into routing can the AI telephone assistant automatically answer and handle calls. Depending on whether you are already a sipgate customer or use an external phone system, setting up routing differs slightly.

### Set up routing in the sipgate cloud phone system

{% hint style="info" %}
Here you will find the instructions for setting up routing without the sipgate cloud phone system
{% endhint %}

If you use sipgate AI Agents with an existing sipgate account, the AI Agent is integrated directly into your existing routing. You can use all the familiar sipgate routing functions.

<figure><img src="/files/0f45bdbec6a0221e0474016ce422d61ea58fde1d" alt=""><figcaption></figcaption></figure>

#### Step by step: Integrate the AI Agent into sipgate routing

{% stepper %}
{% step %}
**Open routing**

Log in to your sipgate account and open the routing in which the agent should be used. This can be a personal routing, a group routing, or a newly created routing.
{% endstep %}

{% step %}
**Set period**

Define when the routing should be active and forward calls to the AI Agent. Typical scenarios are:

* Outside business hours
* When the team is absent
* On public holidays or weekends
* When the phone system is overloaded
  {% endstep %}

{% step %}
**Forward to the AI Agent**

Select "AI Agents" or the phone number of the desired agent as the forwarding destination.
{% endstep %}

{% step %}
**Confirm forwarding**

Confirm the forwarding to the agent.
{% endstep %}

{% step %}
**Save and activate routing**

After saving, calls will automatically be forwarded to the AI Agent during the specified period. Alternatively, you can also specifically integrate the agent into a holiday routing or absence routing.
{% endstep %}
{% endstepper %}

### Set up routing without the sipgate cloud phone system

You can also use sipgate AI Agents without the sipgate cloud phone system. In this case, you integrate the individual agent phone number into your existing phone system. This way, the AI telephone assistant handles calls that come through your current telephone system.

#### Step by step: Integrate the AI Agent into an external phone system

{% stepper %}
{% step %}
**Configure AI Agent**

First set up your sipgate AI Agent via the configuration page and define [**playbooks**](/documentation/en/behavior/playbooks.md)**,** [**customer questions**](/documentation/en/behavior/kundenfragen.md) and other settings.
{% endstep %}

{% step %}
**Find the agent's individual phone number**

On your agent's configuration page, you will find an individual phone number. Your agent can be reached at this number at any time.
{% endstep %}

{% step %}
**Integrate phone number into your routing**

Enter this phone number as the forwarding destination in your existing phone system. From this point on, your system will forward calls to the sipgate AI Agent, which will then take over.
{% endstep %}
{% endstepper %}

{% hint style="info" %}
**Important notes**

* Routing determines when callers reach the agent, not how the conversation is conducted.
* The conversation logic is defined through conversation guidance, knowledge, and playbooks.
* Changes to routing take effect immediately for future calls.
  {% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://help.sipgate.com/documentation/en/behavior/routing-und-weiterleitung.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
