> For the complete documentation index, see [llms.txt](https://docs.voipnumber.net/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.voipnumber.net/features/media-routing.md).

# Media routing

## What is media routing?

💡 Media routing is about what is an input to your media processing pipeline, like an [AI Agent](/features/ai-agent.md) and where is an output of that pipeline connected to

In a typical case, when Alice calls an AI Agent the thing is obvious:

* input is taken as Alice voice
* output in the form of agent's voice is routed back to Alice

But even in this case, there are 2 media streams involved and 4 possible media routings

<figure><img src="/files/1CAcmJ2rr4H16EIw1zlc" alt=""><figcaption></figcaption></figure>

In case of a regular call with 2 parties involved (say Alice calls Bob) there is 4 different media streams and 8 technically different (4 logically different) media routings

<figure><img src="/files/3pvsGcPDODiPMqGD6BHW" alt=""><figcaption></figcaption></figure>

There may be even more routing configurations, if you consider playing agent's voice to both parties (*broadcasting* agent)

To configure media routing for any media processing action (like Speech translation, AI Agent, etc.) , open a [Call Flow](/components/call-flow.md) and  click on that action to access `MEDIA` tab

<figure><img src="/files/eeqppbCmX9YRSUKrClHL" alt=""><figcaption></figcaption></figure>

## What can I do with media routing?

Cool example of a media routing is a *whispering* AI Agent

When Alice calls Bob, Alice my be running an AI Agent which process Bob's voice, but whose output (in the form of agent's voice) can be heard by Alice only. This can be done in an opposite direction too of course, or in both directions at the same time, and you may even think of making same agent's voice available to both Alice and Bob

See [Whispering AI Agent](/how-to/whispering-ai-agent.md)  for more details


---

# 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 dynamically by asking a question.

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

```
GET https://docs.voipnumber.net/features/media-routing.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.
