- 05 Jun 2025
- 5 Minutes to read
- Print
- DarkLight
- PDF
Dynamic routing to a number
- Updated on 05 Jun 2025
- 5 Minutes to read
- Print
- DarkLight
- PDF
Who should read this article: Administrators, Supervisors
Use Flow Builder to route incoming calls to external numbers dynamically based on caller input or system responses.
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), 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.
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.
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 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 and assign your contact center number to the flow. Refer to Flows for information about how to create a flow.
Design a call flow
Call flows are designed using Flow Builder which you open from the Flow page.
Flow Builder nodes used
- Collect Digits: Gathers input from caller or application and stores it in a variable.
- HTTP request: Finds the contact's real PSTN in a data service.
- Route: Sends call to external number retrieved from the data service via variable.
- Play Audio: Plays message before routing or for fallback.
Optional Flow Builder nodes
- Conditions: Routes based on input stored in a variable.
- 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:
- When you launch Flow Builder, the Start node is placed for you automatically.
- Add a Collect digits node to capture the ID of the person to be called.
- 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 is received. - 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.
- If no digits are entered or there is a problem with the input, the node automatically routes to the Next step (no input) connection.
- 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
- 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.
- 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.
- In the Endpoint section, add the URL of your data service.
- Select the the GET method.
- Click Test request to verify that the node can access your data service.
- Use the key-value pairs in the Header section to specify the key containing the name of the ID code parameter.
- 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.
- 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.
- With the real phone number stored a variable, the call can be route to the contact.
- Consider adding a Play audio node to inform the caller that their call is being connected.
- Add a Route node to the flow.
- In the Settings section, select Variable from the Route to menu.
- From the Variable menu, select the name of the variable that stores the real phone number of the contact.
- Click Save in the Flow Builder, then navigate back to the Flow page and save your flow.