> 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/call-flow-builder.md).

# Call Flow Builder

[Call Flows](https://app.voipnumber.net/callflows) define what happens to a call. By adding actions to `Call Flow`, you can customize the behaviour of incoming calls and provide callers with the user experience they need

Actions within the `Call Flow` dictate various [actions](https://docs.voipnumber.net/tools-and-features/call-flow-builder#actions) such as speech translation, sending a call to `voicemail`, prompting the caller to press a key for further options, transferring the call to another Connection or external numbers, playing prerecorded audio files, converting text to speech with specified language and voice settings, and more...

## How to use it

You create a [Call Flow](https://app.voipnumber.net/callflows) by dragging actions from the actions sidebar menu onto a design pane at [app.voipnumber.net/callflowbuilder](https://app.voipnumber.net/callflowbuilder) There you can move them around, configure their settings, connect them with each other, and remove (actions and connections)

<figure><img src="/files/5bcm1RyzZ2ptJGVWH6CR" alt=""><figcaption><p>Drag'n'drop actions from the sidebar (on the right) onto a design pane. There you can move them around, connect with each other, remove them and remove/change connections</p></figcaption></figure>

Every action is represented on the design pane by `Action Main Node` and one or more `Action Outcome Nodes` e.g. *Success, Fail, Completed, Interrupted*. Every action has an input and output

### Action Main Node

This is a coloured rectangle with the action's name, e.g. *Bridge, Play text with AI, Incoming Call, End,* etc.

### Action Outcome Node (*action outcome*)

`Action Main Node` is connected to one or more outcomes. These define possible results for the action. Start and stop actions ( `Incoming Call` and `End`  ) are exceptions from this rule, as they do not have `Action Outcome Node`

### Action Input Handle (*action input*)

`Action Input Handle` is located at the top of `Action Main Node`

### Action Output Handle (*action output*)

`Action Output Handle` is located at the bottom of `Action Outcome Node`

### Connection

`Connection` is a line that you draw to connect actions (Note, this is not a SIP [Connection](/components/connection.md)). `Connection` is always attached to `Action Output Handle` and leads to the `Action Input Handle`. A line leading from `Action Main Node` to one of its `Action Outcome Node`, drawn automatically when action is dropped onto a pane is not a `Connection` in this sense (for example, a green dashed line connecting `Bridge` to `Success` or line connecting `Play Text with AI` and `Completed`)

### Rules

* `Action Input Handle` must be connected to `Action Output Handle` of other action
* `Action Output Handle` must be connected to the `Action Input Handle` of other action
* Actions `Incoming Call` and `End` are mandatory (any valid Call Flow starts and ends on them)

Start and stop actions ( `Incoming Call` and `End` ) have only a single handle. But the above rule still holds.

Let's draw that on the screen

<figure><img src="/files/hAlbcbu9DHjDcfdedqbn" alt=""><figcaption><p>Call Flow Builder. Action input, output, outcome and connection</p></figcaption></figure>

In some cases it makes sense for the action to loop itself (e.g. [#collect-digits](#collect-digits "mention")), in this case action's output connects to the input of the same action

### Validate your Call Flow

Call Flow Builder warns you as you draw when you attempt to create an invalid `Connection` or make other design errors. Once you've finished always check your design for any errors before saving

<figure><img src="/files/OyxSUQIpVu5LMJoLBu7A" alt=""><figcaption><p>Always VALIDATE your Call Flow to catch any errors</p></figcaption></figure>

<div align="center"><figure><img src="/files/7SUvpyqdBi5LuZDUaQ4F" alt="" width="363"><figcaption><p>Call Flow Builder will tell you if there's any connection missing or something else isn't right</p></figcaption></figure></div>

### Configuring actions

Every action has configuration settings that you can change. Click on the `Action Main Node` (coloured rectangle with action's name) to open configuration settings

### Removing connections

To `remove` a connection click on it and press `BACKSPACE` or `DELETE`&#x20;

## Actions

Actions available in Call Flow Builder define what gets done on a call. There always must be action `Start` and action `End` placed on a Call Flow. Between them you insert `Voice AI` and `PBX` actions to perform actual things&#x20;

#### Action `Start`

Every Call Flow starts with `Start` action and ends on action `End` . These two actions are mandatory for a valid Call Flow. `Start` action doesn't really do anything to a call, it is completely transparent. Its only purpose is to define where everything starts 🛫

<figure><img src="/files/pnPejm9OS3oC4XewIDDe" alt="" width="158"><figcaption></figcaption></figure>

#### Action `End`

Action `End` defines where your Call Flow stops. Just like with any other action, you can connect to it multiple action outputs

<figure><img src="/files/iyUj8kdKIryKIG6k0TL2" alt="" width="159"><figcaption></figcaption></figure>

Next, we got regular actions which perform actual things. These are grouped into 2 sets: `Voice AI` and `PBX`. `Voice AI` actions make use of AI in form of LLM. `PBX` actions are regular functionalities you expect every legitimate telephony platform to have

## Voice AI actions&#x20;

### Action `AI Agent`

This action executes an AI Agent on a call, with tools to perform work.

<figure><img src="/files/DxWFmCVaXo1jtmQdGE7P" alt="" width="375"><figcaption></figcaption></figure>

Settings include  [AI Agent](/components/ai-agent.md)  selection and media with configurable input/output channels and audio level knobs

See how to setup and configure agent: [AI Agent](/features/ai-agent.md) , [Appointment bookings](/features/appointment-bookings.md) , [AI Agent with Groq LLM](/how-to/ai-agent-with-groq-llm.md)

<div><figure><img src="/files/OpZIz3FygJqrMOUXlrmJ" alt=""><figcaption></figcaption></figure> <figure><img src="/files/NtblFYu2s9P9vRx249aU" alt=""><figcaption></figcaption></figure></div>

### Action `Translate speech coming from VoIP Number`

Performs real time speech translation in direction from VoIP Number to a target dependent on type of Call Flow:

A leg - from VoIP Number to calling party

B leg - from VoIP Number to called party

<figure><img src="/files/FZz8tiNFt0jM9t5yg3r9" alt="" width="375"><figcaption></figcaption></figure>

Settings include languages, TTS engine selection and audio level knobs

<div><figure><img src="/files/3Vrwu5CR5CU10DUa9FWQ" alt=""><figcaption></figcaption></figure> <figure><img src="/files/Dc1OX97dcUsDFFpWfhsc" alt=""><figcaption></figcaption></figure> <figure><img src="/files/CAfTrN6dy8yjUbgIW2rZ" alt=""><figcaption></figcaption></figure></div>

### Action `Translate speech coming to VoIP Number`

Performs real time speech translation in direction to VoIP Number from a target dependent on type of Call Flow:

A leg - to VoIP Number from calling party

B leg - to VoIP Number from called party

<figure><img src="/files/f98R8b3Cs2DhJTOsso2J" alt="" width="375"><figcaption></figcaption></figure>

Settings include languages, TTS engine selection and audio level knobs

<div><figure><img src="/files/3Vrwu5CR5CU10DUa9FWQ" alt=""><figcaption></figcaption></figure> <figure><img src="/files/Dc1OX97dcUsDFFpWfhsc" alt=""><figcaption></figcaption></figure> <figure><img src="/files/CAfTrN6dy8yjUbgIW2rZ" alt=""><figcaption></figcaption></figure></div>

### Action `Translate speech (routed)`

Performs real time speech translation with configurable input and output between VoIP Number and target dependent on type of a Call Flow:

A leg - between VoIP Number and calling party

B leg - between VoIP Number and called party

<figure><img src="/files/Kqa4nEVyEVoovuG0HSJE" alt="" width="375"><figcaption></figcaption></figure>

💡 This gives 4 possible routing setups (channel input/output configurations) on each call leg

Settings include languages, TTS engine selection and media with configurable input/output channels and audio level knobs

<div><figure><img src="/files/m4gt5WkvnsNMjptmm4W8" alt=""><figcaption></figcaption></figure> <figure><img src="/files/DUeg68WvbRVDuLjsMYU7" alt=""><figcaption></figcaption></figure></div>

<div><figure><img src="/files/AybiWJsN78yFMdJNwDa8" alt=""><figcaption></figcaption></figure> <figure><img src="/files/tvRnAwGzuHh14ZTSy6k8" alt=""><figcaption></figcaption></figure></div>

## PBX actions

### **Action `Audio loop (Echo)`**&#x20;

<figure><img src="/files/wprtRv3xrcGQ4iuPlpnf" alt="" width="224"><figcaption></figcaption></figure>

`Audio loop (Echo)` simply plays back any audio it received. We often use it as a last item on the **A** type [Call Flow](/components/call-flow.md) when there is no need to bridge audio to other destination - this action bends audio path back to the caller. Audio level can be optionally attenuated (in dB).

<figure><img src="/files/6wV8ehm5tzkCj7P8BKJw" alt="" width="375"><figcaption></figcaption></figure>

### **Action `Audio loop with delay (Delay echo)`**&#x20;

<figure><img src="/files/wTcCbaG4cyGyOMgGQP2i" alt="" width="313"><figcaption></figcaption></figure>

`Audio loop with delay (Delay echo)` is similar to action `Audio loop (Echo)` . It plays audio back with a configurable delay (in milliseconds). Audio level can be optionally attenuated (in dB).

<figure><img src="/files/IdJmqEqo5VP5DVkPIG70" alt="" width="375"><figcaption></figcaption></figure>

### **Action `Bridge`**&#x20;

Action `Bridge` sends a call to another [Connection](/components/connection.md)

<figure><img src="/files/zxOat0bkcISsARNgHRp8" alt="" width="188"><figcaption></figcaption></figure>

When call is bridged it is ringing a target [Connection](/components/connection.md). It may and up being connected (answered) or not, and this is represented on a Call Flow as outcome `Success` and outcome `Fail` . You can configure what happens after the bridge succeeded or failed by drawing a line from respective outcomes

In example below we end up a call regardless the outcome

<figure><img src="/files/xaghXpBOJVvUPXJTJfGa" alt="" width="563"><figcaption></figcaption></figure>

In the next example we send it to AI Agent instead

<figure><img src="/files/BuKUuPow87F5j6TXXkOf" alt="" width="563"><figcaption></figcaption></figure>

Action `Bridge` has two `Bridge target` modes:

* `Dialed connection`
* `Selected connection`

This is because a single Call Flow may be attached to more than just one [Connection](/components/connection.md)

During a call, when Call Flow is executed, an actually dialed [#connection](#connection "mention") is changing, reflecting a SIP To header. If `Bridge` is in `Dialed connection` mode it will send a call to that [Connection](/components/connection.md). If you instead want a Call Flow that always bridges to the same [Connection](/components/connection.md), set a bridge target mode to `Selected connection` and pick your [Connection](/components/connection.md) from a dropdown menu

<div><figure><img src="/files/526p6Ly0NF5hK1AuQcyC" alt=""><figcaption></figcaption></figure> <figure><img src="/files/WhKv2h9IlXBxR826hyDi" alt=""><figcaption></figcaption></figure></div>

### **Action `Ring group`**&#x20;

With a `Ring Group` action on a [Call Flow](/components/call-flow.md) you can ring multiple phones and easily control what happens next. For example if the call can't be answered you may want to send it to an AI Agent, or voicemail.

<figure><img src="/files/51TZtnWDnR4WWEpBBDjV" alt="" width="375"><figcaption></figcaption></figure>

You can ring [Connection](/components/connection.md), [Trunk](/components/trunk.md), external SIP endpoints (through a [Trunk](/components/trunk.md) with SIP destination enabled on Trunk OUT) and numbers on public telephony (through a [Trunk](/components/trunk.md) with public calling enabled).

<figure><img src="/files/r5ppFth3LwCZycZZ432h" alt="" width="375"><figcaption></figcaption></figure>

`Ring Group` has 2 modes: *sequential* and *parallel*. In *sequential* mode you ring destinations one after another, in series. In *parallel* mode you ring them all at once, simultaneously.&#x20;

Each destination can be configured with different *timeout*.&#x20;

<figure><img src="/files/5j8RMFMxDn3BtAcAq8mu" alt="" width="375"><figcaption></figcaption></figure>

{% hint style="info" %}
Make sure to **disable voicemail** on your mobile/PSTN numbers you've added to a Ring Group. Call answered by a voicemail will end up a Ring Group with outcome Success (connected) and terminate further ringing. This is because they are same in terms of excahnged SIP signalling messages: in both cases 200 OK is received (SIP indication that call has been answered, conveying media description). &#x20;
{% endhint %}

You can easily embed it into more complex flows.

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

### **Action `Conference`**&#x20;

With a `Conference` action on a [Call Flow](/components/call-flow.md) multiple callers can join a single, shared audio room just like on Google Meet, Microsoft Teams or Zoom.

<figure><img src="/files/0pl46U8mpFIO4fAfudR4" alt="" width="179"><figcaption></figcaption></figure>

`Conference` has S*ampling Rate* setting that controls audio quality. You can select from 8 kHz narrowband up to fullband 48 kHz and run your conference with DVD-quality sound that adapts to what each caller can handle.&#x20;

<figure><img src="/files/yi5CKB8clpU9jNkmbRIQ" alt="" width="375"><figcaption></figcaption></figure>

{% hint style="info" %}
When you want to provide conference participants with best audio quality remmber that they joined a conference with codecs negotiatied in a process of [Audio codecs setup / negotiation](/features/audio-codecs-setup-negotiation.md). These codecs reflect the best audio sampling rate callers can handle. If conference sampling rate is more than caller's codecs allow, caller will only get quality matching their codecs capabilities.&#x20;

This is negotiated per each particiapant, so by selecting highest sampling rate you will provide all conference participants with the best quality they can handle.
{% endhint %}

It also has *Member Options* setting where you can toggle if callers join muted and if they can control mute.

<figure><img src="/files/4CWDMtvwtkq0Uoe23JBs" alt="" width="375"><figcaption></figcaption></figure>

You can dial out [Connection](/components/connection.md), [Trunk](/components/trunk.md), numbers on public telephony and any SIP endpoints. Just add them to Destinations in *Dial Out* section and automatically join them to a conference.

<div><figure><img src="/files/00PvyPGskn7nZ5xt9Caw" alt="" width="375"><figcaption></figcaption></figure> <figure><img src="/files/jQPnO3hMUzsu2jwEY3E7" alt="" width="375"><figcaption></figcaption></figure></div>

You can easily embed it into more complex flows.

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

### **Action `Play text with AI`**

You can generate very human like speech with action `Play text with AI` This is how it sounds

{% embed url="<https://soundcloud.com/piotr-gregor/action-play-text-with-ai?si=08a56171aa8f4c9e925bd0a4fb47cda3&utm_campaign=social_sharing&utm_medium=text&utm_source=clipboard>" %}
Speech generated with action `Play text with AI` sounds very natural 🙂
{% endembed %}

<figure><img src="/files/gsGewHXnZ6VvOq3N1G09" alt="" width="188"><figcaption><p>Action <code>Play text with AI</code></p></figcaption></figure>

This is the simplest possible usage of this action

<figure><img src="/files/bo4J9Mch6BH4H2iObAGh" alt="" width="179"><figcaption><p>Example</p></figcaption></figure>

Type a text to get synthesized into speech in a `Text` field. Select a voice engine type and a voice from a dropdown list of available persons 🙎🙎🏻‍♂️🙍‍♀️ Click `Play` to listen how it sounds. Change text and re-`Play` until you're happy with the result. Click `OK` to save it

Toggle `Interruptible` switch if speech playback during Call Flow execution should terminate on a key pressed by a user

<figure><img src="/files/WmZ13aAb2nDkWmCif6lB" alt="" width="474"><figcaption><p>Configuration of action <code>Play text  with AI</code></p></figcaption></figure>

### **Action `Play audio`**&#x20;

Use action `Play audio` to playback wav, mp3 or mp4 files from uploaded file or from URL

<figure><img src="/files/HLP1hPfW8yG6SEmPnAB0" alt="" width="188"><figcaption><p>Action <code>Play audio</code> </p></figcaption></figure>

<figure><img src="/files/Xg5CP7XMMZ6XsJBL3QxD" alt="" width="179"><figcaption><p>Play audio example usage</p></figcaption></figure>

<figure><img src="/files/D4i4vGQe2qUyVCmBlRub" alt="" width="563"><figcaption><p>Play audio configuration</p></figcaption></figure>

<figure><img src="/files/XNMpZLGG7ti0nh2onszl" alt="" width="295"><figcaption><p>Play audio config with background</p></figcaption></figure>

### **Action `Collect digits`  0️⃣1️⃣2️⃣3️⃣4️⃣5️⃣6️⃣7️⃣8️⃣9️⃣**

Action `Collect digits` is a DTMF collection block, where you can define important aspects of DTMF collection process, e.g: how many digits you require, a terminator, timeout on a single digit and the whole process and if digits accumulated before this action is hit should be flushed 🧐

<figure><img src="/files/jTWxFYXoayN8IKZA5tb3" alt="" width="188"><figcaption><p>Action <code>Collect digits</code></p></figcaption></figure>

<figure><img src="/files/WpEBqkPMGghL83rrhgi8" alt=""><figcaption><p>A simple flow with DTMF collection</p></figcaption></figure>

<figure><img src="/files/PR5Ob9bGiwWRF6Fz78RF" alt="" width="450"><figcaption></figcaption></figure>

### **Action `Handle digits`**&#x20;

Use action `Handle digits` to execute functions assigned to DTMF digits in a `Collect digits` action. `Collect digits` would normally precede this action

<figure><img src="/files/BrrJZQ16QTBB5E7apMpG" alt="" width="188"><figcaption><p>Action <code>Handle digits</code></p></figcaption></figure>

<figure><img src="/files/oGd99BlbuPW6SZsArtmY" alt=""><figcaption><p>Simple flow with <code>Handle digits</code></p></figcaption></figure>

### **Action `Voicemail deposit`**&#x20;

Action `Voicemail deposit` implements a voicemail box. Use this action to record a voicemail, transcribe it and send to email

<figure><img src="/files/AnFPCtv1Ie8pDBg9wqhH" alt="" width="188"><figcaption><p>Action <code>Voicemail deposit</code></p></figcaption></figure>

<figure><img src="/files/08abbpYrFQmookVbJJzD" alt=""><figcaption><p>Simplest flow with <code>Voicemail deposit</code></p></figcaption></figure>

<figure><img src="/files/qMLOM5khiNCadm8SVAnT" alt="" width="563"><figcaption></figcaption></figure>

<figure><img src="/files/q92VtvSkKFbengz5Onve" alt="" width="563"><figcaption></figcaption></figure>

### **Action `Voicemail retrieval`**

Action `Voicemail retrieval` implements a voicemail box for the voicemail owner. Dial to this action to listen to your voicemails, save or delete them, on the phone

<figure><img src="/files/CXRBsWEzvpVwrrFph9aQ" alt="" width="188"><figcaption><p>Action <strong><code>Voicemail retrieval</code></strong></p></figcaption></figure>

<figure><img src="/files/hEWZPXf8MaQ3MyqFGOlK" alt="" width="308"><figcaption><p>A simple flow with a call to a voicemail box </p></figcaption></figure>

Access to voicemail can be protected by the PIN

<figure><img src="/files/FwfbT9ZkvoIczk4EjYRq" alt="" width="450"><figcaption></figcaption></figure>


---

# 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/call-flow-builder.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.
