By using the Aculab site, you agree with our use of cookies.
right  Talk To Us!

run menu Action

Runs an interactive menu that requests a single digit key press from the caller. You configure it to prompt for a number of menu options and the caller is expected to respond by pressing a single digit. For example "Press one for blue or two for red."


The run menu properties are:

PropertyRequired/OptionalDefaultDescription
prompt required - A play action. This is the prompt that requests a digit to be selected.
menu options required - An array of menu option objects, each specifying a Dual Tone Multi Frequency (DTMF) digit and an associated next page.
help digit optional "*" A single digit that, when pressed, will result in the menu prompt being repeated. An emtpy string signifies no help digit. Valid digits are 0123456789ABCD#*.
seconds digit timeout optional 5 An integer. The time period in seconds that the run menu action waits for a digit to be selected.
on digit timeout messages optional "Sorry, I did not hear that.",
"Please listen to the instructions and then use your telephone keypad to enter a valid number."
An array of play actions. This defines messages to play if no digit is pressed within the digit timeout period. Each play action in the array is played once for each successive timeout. When all messages have been played the run menu action finishes. Note that barge in is disabled by default for these actions.
on invalid digit messages optional "Sorry, that was not a valid number.",
"Please listen to the instructions and enter a valid number."
An array of play actions. This defines messages to play if an invalid digit is pressed. Each play action in the array is played once for each successive invalid digit. When all messages have been played the run menu action finishes. Note that barge in is disabled by default for these actions.

The menu option properties are:

PropertyRequired/OptionalDefaultDescription
digit required - The digit to be pressed for this option. Valid digits are 0123456789ABCD#*.
next page required - A web page request object that defines the web page to be requested when the associated digit is pressed. Setting this to null signifies that the subsequent action in the action array should be executed when this option is selected.

web page request defines how a specific web page is requested:

PropertyRequired/OptionalDefaultDescription
url required - The address of the web page to request.
method optional POST One of "GET" or "POST". The HTTP request method to use when requesting the url.

Returns

The result of the menu selection will be returned via the subsequent http request to the selected next page in action result as follows:

PropertyDescription
selected digit A string containing the single digit that was selected in response to the menu prompt.
  • Examples:

    • Run a simple yes/no menu using the defaults:

      "run_menu" : 
      {
          "prompt" : 
          {
              "play" :
              {
                  "play_list" :
                  [
                      {
                          "text_to_say" : "Please press 1 for yes and 2 for no."
                      }
                  ]
              }
          },
          "menu_options" : 
          [
              {
                  "digit" : "1",
                  "next_page" : 
                  {
                      "url" : "optionyespage"
                  }
              },
              {
                  "digit" : "2",
                  "next_page" : 
                  {
                      "url" : "optionnopage"
                  }
              }
          ]
      }
      

      The selected digit is specified in the request for the next page:

      "action_result" :
      {
          "action" : "run_menu",
          "result" :
          {
              "selected_digit" : "2"
          }
      }