---
title: "Dynamic routing to a number"
slug: "dynamic-routing-to-a-number"
description: "Use Flow Builder to route incoming calls to external numbers dynamically based on caller input or system responses. Enable private, real-time routing with full control over Caller ID and fallback handling."
updated: 2026-04-21T09:58:11Z
published: 2026-04-21T09:58:11Z
canonical: "docs.voiso.com/dynamic-routing-to-a-number"
---

> ## Documentation Index
> Fetch the complete documentation index at: https://docs.voiso.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Dynamic routing to a number

**Who should read this article**: Administrators, Supervisors

Use **Flow Builder** to privately route incoming calls to external numbers dynamically, based on caller input or system responses, with full control over the Caller ID displayed to the external contact.

## Use Case: Dynamic inbound call routing to a variable PSTN number

### Overview

This use case enables contact centers to dynamically route incoming voice calls to an external PSTN number—such as a mobile or landline—based on values collected during the call. It supports privacy-preserving routing (such as number masking), [Caller ID control](/v1/docs/flow-builder-route#caller-id-rules), context-based call delivery, and real-time API lookups. Calls are seamlessly redirected to the correct party without exposing personal phone numbers, using data gathered through DTMF input or external systems.

### Business Challenge

In many industries, contact centers must facilitate secure, private communication between callers and external parties such as field agents, service technicians, or delivery partners. Static call routing does not accommodate dynamic scenarios where the destination is only known at the time of the call—after a user enters a target ID or the system performs a lookup.

### Solution

Voiso’s Flow Builder allows contact centers to use variables and call context to dynamically route calls to external PSTN numbers in real time. Using a combination of IVR nodes like **Collect Digits**, **Conditions**, and **Route to Variable**, calls can be directed to the appropriate external contact without the inbound caller having to know the real phone number they wish to reach, and without the external contact seeing the inbound caller's [Caller ID](/v1/docs/flow-builder-route#caller-id-rules).

### How It Works

- **Caller dials a shared number** An inbound call reaches the contact center via a published or in-app number.
- **Digit collection via IVR** The **Collect Digits** node receives a code such as a reference ID or case number, either programmatically or by the caller manually entering a number. Or, the **DTMF** node prompts the caller to make a menu selection.
- **Real-time number lookup** An HTTP request retrieves the PSTN number associated with the ID and stores it in a variable.
- **Routing to external party** The **Route to Variable** node uses the PSTN number stored in the variable to place the outbound call using the contact center’s default Caller ID or other specified Caller ID.

### Example Scenarios

- **Field service**: Route customers to assigned field agents based on a service ID.
- **Healthcare**: Route patients to doctors on call after verifying appointment codes.
- **E-commerce**: Connect buyers to delivery partners based on order IDs.
- **B2B support**: Let external vendors contact a client rep securely using session tokens.

### Benefits

- **Privacy protection** Personal numbers are never exposed.
- **Contextual flexibility** Destinations are resolved based on real-time logic.
- **Integrated Caller ID management** Ensures consistent, masked outbound Caller ID.
- **Error handling & fallback** Invalid variables trigger fail-safes like voicemail.
- **Traceable and auditable** Flow logs include variable values and routing results.

## Example: dynamic number dialing call flow

### Prerequisites

- **Create an app**: Set up an app that calls your contact center number. This could be a button that dials the number directly. The app could be designed to automatically pass an ID code when the [call is answered](https://developers.voiso.com/reference/inbound-call-events) or request the user to enter the ID when the call is answered.
- **Build a flow**: Use the **Flow** page to set up an [inbound voice call flow](/v1/docs/voice-flows) and assign your contact center number to the flow. Refer to [Flows](/v1/docs/inbound-flows) for information about how to create a flow.

### Design a call flow

Call flows are designed using **[Flow Builder](/v1/docs/inbound-flow-builder-overview)** which you open from the **Flow** page.

#### Flow Builder nodes used

- **[Collect Digits](/v1/docs/collect-digits)**: Gathers input from caller or application and stores it in a variable.
- **[HTTP request](/v1/docs/http-request)**: Finds the contact's real PSTN in a data service.
- **[Route](/v1/docs/flow-builder-route)**: Sends call to external number retrieved from the data service via variable.
- **[Play Audio](/v1/docs/flow-builder-play-audio)**: Plays message before routing or for fallback.

#### Optional Flow Builder nodes

- **[Conditions](/v1/docs/conditions)**: Routes based on input stored in a variable.
- **[DTMF](/v1/docs/flow-builder-dtmf)**: Receives tone-based IDs or menu choices.

#### Steps

Watch this video or follow the steps below to see a simplified flow for calling numbers dynamically:

[Video](https://cdn.document360.io/44ae307a-3737-4fbf-98e0-9b888deb90dc/Images/Documentation/Dynamic_Inbound_Routing_Use_Case.mp4)

          Note

          

Some parts of the user interface shown in this video have changed since it was recorded. An updated version of the video is planned and will be published shortly.

1. When you launch **Flow Builder**, the **[Start](/v1/docs/flow-builder-start)** node is placed for you automatically.
2. Add a **Collect digits** node to capture the ID of the person to be called.
  1. If your flow requires input from the caller, enable the audio message and use the **Text-to-speech** option to prompt the caller to enter the code number. You can include specific instructions such as the number of digits to enter. **Note**: You can skip this step if your application automatically sends DTMF after the `inbound.call.answered` [event](https://developers.voiso.com/reference/inbound-call-events) is received.
  2. In the **Settings** section, create a new variable to store the ID code. Specify the number of digits in the code and how long to wait before timing out. You may also include an end key, such as **#** that tells the node when the caller or app has finished entering the ID code.
  3. If no digits are entered or there is a problem with the input, the node automatically routes to the **Next step (no input)** connection.
3. For error handling, you can add a node, such as **Play audio**, that requests that the caller or app re-input the digits. Route from this node back to the **Collect digits** node to attempt to retrieve the ID code again.
4. With the ID code stored in a variable, add an **HTTP request** node to the flow to query your data service for the real phone number of the person associated with the user ID code.
  1. In the **Endpoint** section, add the URL of your data service.
  2. Select the the **GET** method.
  3. Click **Test request** to verify that the node can access your data service.
  4. Use the key-value pairs in the **Header** section to specify the key containing the name of the ID code parameter.
  5. In the **Mapping settings** section, enter the JSON path of the parameter that holds the target phone number and assign it to a [custom variable](/v1/docs/flow-builder-variable-management#custom-variables).
5. For error handling, you can add a node, such as **Play audio**, that requests that the caller or app re-input the digits. Route from this node back to the **Collect digits** node to attempt to retrieve the ID code again.
6. With the real phone number stored a variable, the call can be route to the contact.
7. Consider adding a **Play audio** node to inform the caller that their call is being connected.
8. Add a **Route** node to the flow.
  1. In the **Settings** section, select **Variable** from the **Route to** menu.
  2. From the **Variable** menu, select the name of the variable that stores the real phone number of the contact.
  3. In the **Caller ID rules** section, optionally override the Caller ID by selecting **Override Caller ID**, then choose a Caller ID group from the **Caller ID group** menu.
9. Click **Save** in the Flow Builder, then navigate back to the **Flow** page and save your flow.

### Rename the node

Beginning with the [September 15 - 19, 2025 release](/v1/docs/september-15-19-2025), you may name nodes in **Flow Builder**. Click a node in the node palette to add it to the flow. The node is added to the flow and is named **Node N**, where **N** represents the number of the node; for example, **Node 6**. Below the node name is the node type, such as **Play Audio**. Click the node to open the node configuration panel, then click the name of the node to edit it. Enter a new name, then the check mark to save your change.

[Video](https://cdn.document360.io/44ae307a-3737-4fbf-98e0-9b888deb90dc/Images/Documentation/Flow%20Builder%20Renaming%20Nodes.mp4)

Dual Tone Multifrequency. A system that uses audio tones to represent digits on a keypad. When a person presses the numbers on their phone to dial a number or make a selection in an IVR, they are sending DTMF audio tones to the phone system.
