The Menu Step
Continue to build the TTSsample.aef script by adding a Menu step (from the Media palette) to offer the caller the choice between the English and Spanish languages.
Figure shows the configured General tab of the Menu customizer window.

Configure the General tab of the Menu customizer window as follows:
-
Contact—Triggering Contact
The Menu step acts upon the contact that triggered the execution of the Menu step.
-
Interruptible—Yes
External events can interrupt the execution of this step.
Figure shows the configured Prompt tab of the Menu customizer window.

Configure the Prompt tab of the Menu customizer window as follows:
-
Prompt—TTS[“For English, press one"] + spanishPrompt
The Menu step plays this prompt back to the caller. The specified prompt expression combines the TTS prompt, “For English, press one” with spanishPrompt, which the second Create TTS Prompt step previously created. (See The Second Create TTS Prompt Step.)
Note | The format TTS[...] is another way to create a TTS prompt that uses the default gender and the language of the call. The text passed in parameter must match the language of the call. |
-
Barge In—Yes
The caller can respond without having to listen to the whole playback of the prompt.
-
Continue on Prompt Errors—Yes
In the event of a prompt error, instead of generating an exception, the step continues with the second prompt if the error occurs on the first prompt, or, if this is the last prompt in the sequence, the script waits for input from the caller.
Figure shows the configured Input Tab of the Menu customizer window.

-
Timeout (in sec)—3
The system waits 3 seconds for input from the caller before sending the script to the Timeout output branch (after the script reaches the maximum number of attempts).
-
Maximum Retries—3
The Menu step will plays the prompt to the caller up to 3 times after a timeout or invalid input response.
In this case, after 3 retries, the Menu step executes either the Timeout or Unsuccessful output branches, depending on whether the last try timed out or the caller entered an invalid input response.
-
Flush Input Buffer—No
The caller can type ahead and the step will save the previous input.
Figure shows the configured Filter Tab of the Menu customizer window.

-
Options—English, Spanish
The Menu step offers these two menu choices to the caller. Use the Add button to enter these two options.
-
English—If this were a fully-functioning script, this output branch would contain steps providing business logic in an English language context.
-
Spanish—If this were a fully-functioning script, this output branch would contain steps providing business logic in a Spanish language context.
-
Timeout—If the script times out, the script will fall through to the closing steps of the script.
-
Unsuccessful—If valid caller response is not received, the script will fall through to the closing steps of the script.