> For the complete documentation index, see [llms.txt](https://help.sipgate.de/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.sipgate.de/ai-agents/en/behavior/routing-und-weiterleitung.md).

# Routing and forwarding

With routing, you determine, **when and by which route calls end up with your agent**. You control how it conducts conversations via personality, knowledge, and playbooks.

Setup depends on whether you use the **sipgate cloud phone system** or a **different phone system** use.

### With the sipgate cloud phone system

Integrate your agent directly into your existing routing. The familiar routing functions are available to you for this.

<figure><img src="https://3225157888-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FL8XuEunVQH0eqk0OHmIg%2Fuploads%2Fgit-blob-99ab190250ac62433c3f2ce87fa15c83f514dd58%2Frouting.gif?alt=media" alt=""><figcaption></figcaption></figure>

#### Step by step: integrate the AI agent into sipgate routing

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

Open the desired routing in your sipgate account. You can use a personal routing, a group routing, or a new routing.
{% endstep %}

{% step %}
**Set time period**

Determine when calls should be forwarded to your agent, for example:

* outside business hours
* when your team is unavailable
* on public holidays or weekends
* when the switchboard is overloaded
  {% endstep %}

{% step %}
**Forwarding to the AI agent**

Select the desired agent or its phone number as the forwarding destination. Confirm the selection and save and activate the routing. Your agent will then handle calls according to the defined rules.
{% endstep %}
{% endstepper %}

### Without sipgate cloud phone system

You can also use sipgate sona with another phone system. To do this, enter the **phone number of your agent as the forwarding destination** in your existing phone system.

{% stepper %}
{% step %}
**Configure agent**

First set up your agent via the configuration page and define [**Playbooks**](https://help.sipgate.de/ai-agents/en/behavior/playbooks.md)**,** [**Customer questions**](https://help.sipgate.de/ai-agents/en/behavior/kundenfragen.md) and additional settings.
{% endstep %}

{% step %}
**Find agent phone number**

In your agent's configuration, you will find a dedicated phone number. Your agent can be reached at this number at any time.
{% endstep %}

{% step %}
**Add the phone number to your routing**

Enter the agent's phone number as the forwarding destination in your phone system. There, define when calls should be forwarded to your agent.

Changes to the routing affect future calls.
{% endstep %}
{% endstepper %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://help.sipgate.de/ai-agents/en/behavior/routing-und-weiterleitung.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
