Menu
This topic provides an overview of the Menu component, and describes its configuration, variables, as well as supported connections.
Component introduction
Menu component allows you to present callers with a set of menu options, and route calls based on the DTMF digit that they press. The input value is stored in variables, which can be used as input for subsequent components or for condition evaluation.
You can configure when the system stops collecting DTMF digits - either when reaching digit or response timeout or when callers press an end key. Additionally, audio prompt(s) or a text-to-speech message can be set to prompt callers for input.

- Supported prompt types
-
Prompt Type Description Custom Prompt Choose from existing custom prompts, or create a new one by recording with an extension or uploading an audio file. Music on Hold (MoH) Choose from existing MoH. Note: Before you begin, make sure the desired MoH is configured in PBX Settings > Voice Prompt > Music on Hold.
Text to Speech (TTS) Enter the desired text, which will be converted to speech in the selected language and voice style.
Note: Before you begin, make sure the Text-to-Speech feature is enabled in Integrations > AI.
- Supported end keys
#key or*key.- You can set the end key in Call Flow Designer > Options.

Component configuration
- Set prompt and digit timeout
-
- Click Menu component to proceed with the
configuration.

- Configure audio prompt(s) or a text-to-speech message to
instruct callers.
Item Description Custom Prompt 
- Click Custom Prompt.
- Specify custom prompt(s).Note: Up to 5 custom prompts are supported.
- To choose from an existing prompt, select it from the drop-down list of Prompt.
- To use a new prompt, click Record
New to record prompt with an
extension, or click Upload
to upload an audio file.Note: The new prompt will be saved in PBX Settings > Voice Prompt > Custom Prompt.
- Optional: To play
the custom prompt(s) in a loop, select the
checkbox of Enable Loop
Playback.Note: The looped prompt will be overridden if the next connected component is configured with a prompt.
Music on Hold (MoH) 
- Select Music on Hold.
- Select an existing MoH from the drop-down list of Music on Hold.
Note: The MoH will be overridden if the next connected component is configured with a prompt.Text to Speech (TTS) 
- Select Text to Speech.
- Complete the rest of the
configurations to convert text into speech.Note: Both static text and dynamic text are supported to convert into speech.
- Static text: Enter text directly in the Text field.
- Dynamic text: Enter text and configure
placeholders with corresponding variables to dynamically compose the text.
Optionally, you can configure prompt generation
timeout. If speech is not generated within the
timeout period, caller will be routed to the next
component without hearing a
prompt.
Example:

The new speech will be saved to the system and synchronized to PBX Settings > Voice Prompt > Custom Prompt.
- In the Digit Timeout(s) field, set how
long to wait for the caller to enter the next digit.
You can select a value from the drop-down list, or enter a value between 1 and 9999.
- At the bottom-right corner, click Confirm.
- Click Menu component to proceed with the
configuration.
- Set retry strategy for invalid input
- To allow callers to return to the component for a retry upon invalid key input, complete the following settings.

-
- Click Invalid Input branch.
- Select the checkbox of Return to Menu.
- In the Return Count drop-down list, select how many times callers can return to the component upon invalid input.
- Optional: Configure audio prompt(s) or a text-to-speech message to instruct callers to retry.
- At the bottom-right corner, click Confirm.
- Set response timeout and retry strategy
- To change the default response timeout or allow callers to return to the component for a retry upon response timeout, complete the following settings.

-
- Click Response Timeout branch.
- In the Component Response Timeout(s)
field, set how long to wait for the caller to operate.
You can select a value from the drop-down list, or enter a value between 1 and 9999.
- Set the retry strategy upon response timeout.
- Select the checkbox of Return to Menu.
- In the Return Count drop-down list, select how many times callers can return to the component upon response timeout.
- Optional: Configure audio prompt(s) or a text-to-speech message to instruct callers to retry.
- At the bottom-right corner, click Confirm.
- Set keys for menu options
-
- Click
on the component to add
a branch for a key.Note: You can configure up to 100 branches, each mapped to a different key.
- Click the branch to complete its settings.

Item Description Enter values to match Enter a value. Note:- Only numbers and characters
*and#are allowed. - If the value contains
*or#, ensure it does NOT conflict with the end key (configured in Call Flow Designer > Options). Otherwise, the input will be considered invalid and routed to the destination for invalid input.
Return to Menu To allow callers to return to the component, proceed as follows. Note: This is helpful for replaying the prompt and allowing a retry when the caller fails to make a selection.- Select the checkbox of Return to Menu.
- In the Return Count drop-down list, select how many times callers can return to the component.
- Optional: Configure audio prompt(s) or a text-to-speech message to instruct callers to retry.
- Only numbers and characters
- At the bottom-right corner, click Confirm.
- Click
Component variables
When a Menu component is added to a call flow, the system stores caller's input in variables. These variables can be referenced in expression-supported components, such as Condition or Developer, to retrieve the input value and flexibly route the call.
| Variable | Type | Description | Example Value |
|---|---|---|---|
| $Menu{index}.result | String |
The result of the Menu component.
|
$Menu1.result(STRING)=MenuResult.InvalidOption |
| $Menu{index}.ttsResult | String | The Text-to-Speech (TTS) result of the
Menu component.
|
$Menu1.ttsResult(STRING)=MenuTTSResult.Success |
| $Menu{index}.userInput | String | The DTMF digit that the caller pressed,
excluding the end key (# or
*). |
"2" |
Component connections
Menu component comes with two built-in branches - Invalid Input and Response Timeout, and supports up to 100 additional branches for DTMF keys. Each branch can be connected to one component, which can be any of the components listed below.
| Component | Description |
|---|---|
| Prompt |
Prompt component allows you to play audio prompt(s) or a text-to-speech message to callers. For more information, see Prompt. |
| Business Hours |
Business Hours component allows you to route calls to different destinations based on the time of day. For more information, see Business Hours. |
| Menu | Menu component allows you to present
callers with a set of menu options, and route calls based on the
DTMF digit they press. For more information, see Menu. |
| User Input |
User Input component allows you to collect DTMF digits from callers, typically used with Condition component to evaluate user input and route calls. For more information, see User Input. |
| Language |
Language component allows you to change the system prompt language for subsequent components in a call flow. For more information, see Language. |
| Record | Record component allows you to start
recording a call upon the caller being connected to another
participant, and optionally configure prompts to inform call
participants at the start and during the recording.
Alternatively, you can use the component to disable call
recording for calls that are supposed to be recorded. For more information, see Record. |
| Dial by Number |
Dial by Number component allows callers to directly dial a number to reach the destination. For more information, see Dial by Number. |
| Dial by Name |
Dial by Name component is one of the end components to terminate caller's connection to the current call flow. It allows callers to reach extension user by entering the first three letters of the user's name. For more information, see Dial by Name. |
| Transfer |
Transfer component is one of the end components to terminate caller's connection to the current call flow. It allows you to transfer callers to a designated destination, and optionally configure prompts to inform them of the transfer. For more information, see Transfer. |
| Hang Up Call |
Hang Up Call component is one of the end components to terminate caller's connection to the current call flow. When callers are routed to the component, the call will be disconnected. For more information, see Hang Up Call. |
| Condition | Condition component allows routing calls based on
logical expressions. For more information, see Condition. |
| Loop | Loop component allows a group of
components to be executed repeatedly, either for a specified
number of times or until a condition is met. For more information, see Loop. |
| Developer | Developer component allows you to
query and update data from PBX-native database or third-party
database. For more information, see the following
topics: |