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

get number Action

Prompts the caller to enter a number and waits for it to be entered. You configure the prompt and how many digits are required, or you configure the digit that signifies the end of the number. The caller is expected to respond by pressing one or more digits.


The get number properties are:

PropertyRequired/OptionalDefaultDescription
prompt required - A play action. This is the prompt that requests the digit(s).
digit count optional 0 The number of digits to enter. 0 signifies an unlimited number of digits, in which case end digit must be set.
end digit optional "#" A single digit that, when pressed, will indicate the end of the number. An empty string signifies no end digit, in which case digit count must not be zero. Valid digits are 0123456789ABCD#*.
valid digits optional "0123456789" A string that represents the set of digits that are deemed to be valid. Note that the help digit and end digit are also valid entries in addition to those set here. Any valid Dual Tone Multi Frequency (DTMF) digit can be included in this string. Valid digits are 0123456789ABCD#*.
help digit optional "*" A single digit that, when pressed, will result in the 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 action waits for each digit to be entered.
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 get number 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 (a digit that is not defined in valid digits). Each play action in the array is played once for each successive invalid digit. When all messages have been played the get number action finishes. Note that barge in is disabled by default for these actions.
next page optional null A web page request object that defines the web page to be requested once the get number action has completed successfully. The digits entered will be sent to this page. If no page is specified then the subsequent action in the action array will be executed and the digits entered will be lost.

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 "GET" or "POST". The HTTP request method to use when requesting the url.

Returns

The result of the get number action will be returned via the subsequent http request to the next pagein action result as follows:

PropertyDescription
entered number A string of the digits that were entered in response to the prompt. The end digit, if entered, is not returned in this string.
  • Examples:

    • Get a variable length number using the defaults (ending with a '#'):

      "get_number" : 
      {
          "prompt" : 
          {
              "play" :
              {
                  "play_list" :
                  [
                      {
                          "text_to_say" : "Please enter your number followed by a hash."
                      }
                  ]
              }
          },
          "next_page" : 
          {
              "url" : "usenumberpage"
          }
      }
      

      The following may be returned when a number is successfully entered followed by '#':

      "action_result" :
      {
          "action" : "get_number",
          "result" :
          {
              "entered_number" : "0287368394"
          }
      }