Asterisk Project : Asterisk 13 Application_ReadExten

ReadExten()

Synopsis

Read an extension into a variable.

Description

Reads a # terminated string of digits from the user into the given variable.

Will set READEXTENSTATUS on exit with one of the following statuses:

  • READEXTENSTATUS
    • OK - A valid extension exists in ${variable}.
    • TIMEOUT - No extension was entered in the specified time. Also sets ${variable} to "t".
    • INVALID - An invalid extension, ${INVALID_EXTEN}, was entered. Also sets ${variable} to "i".
    • SKIP - Line was not up and the option 's' was specified.
    • ERROR - Invalid arguments were passed.

Syntax

ReadExten(variable,[filename,[context,[option,[timeout]]]])
Arguments
  • variable
  • filename - File to play before reading digits or tone with option i
  • context - Context in which to match extensions.
  • option
    • s - Return immediately if the channel is not answered.
    • i - Play filename as an indication tone from your indications.conf or a directly specified list of frequencies and durations.
    • n - Read digits even if the channel is not answered.
  • timeout - An integer number of seconds to wait for a digit response. If greater than 0, that value will override the default timeout.

See Also

Import Version

This documentation was imported from Asterisk Version SVN-branch-13-r420538