Asterisk func timeout

Synopsis:

Gets or sets timeouts on the channel.

Description:

TIMEOUT(timeouttype)

Gets or sets various channel timeouts. The timeouts that can be
manipulated are:

absolute: The absolute maximum amount of time permitted for a call. A
setting of 0 disables the timeout.

digit: The maximum amount of time permitted between digits when the
user is typing in an extension. When this timeout expires,
after the user has started to type in an extension, the
extension will be considered complete, and will be
interpreted. Note that if an extension typed in is valid,
it will not have to timeout to be tested, so typically at
the expiry of this timeout, the extension will be considered
invalid (and thus control would be passed to the 'i'
extension, or if it doesn't exist the call would be
terminated). The default timeout is 5 seconds.

response: The maximum amount of time permitted after falling through a
series of priorities for a channel in which the user may
begin typing an extension. If the user does not begin typing an
extension in this amount of time, control will pass to the
't' extension if it exists, and if not the call would be
terminated. Once the user begins to type an extension Asterisk
will wait for digit timeout to be reached and response timeout has
no effect. The default timeout is 10 seconds.

Notes

  • This function may be both read from and written to.
  • If dialplan execution runs out of priorities to execute and autofallthrough (introduced in Asterisk 1.2) is 'yes' (the default in Asterisk 1.4), then you must call WaitExten() when you want to allow the user to enter a new extension, otherwise Asterisk will terminate the call. If you set autofallthrough to 'no', then Asterisk will wait for the user to dial a new extension and the wait time will be controlled by these timeouts.


Used By


TIMEOUT(digit) and TIMEOUT(response) are consulted by the following dialplan commands (applications):

  • DISA()
  • Read() — timeout parameter will override TIMEOUT(response) and TIMEOUT(digit), if soundfile is played, only TIMEOUT(response) is used
  • WaitExten() — timeout parameter will override TIMEOUT(response)

TIMEOUT(digit) and TIMEOUT(response) are consulted by the following AGI commands:

  • get option (uses only TIMEOUT(digit) and only if the timeout parameter is 0)

Return value

Returns the length of the given timeout in seconds.

Examples


exten => s,1,Set(foo=${TIMEOUT(digit)})

exten => s,1,Set(TIMEOUT(absolute)=5)

See also


Created by: murf, Last modification: Mon 11 of Jun, 2007 (17:23 UTC) by Luxvero


Please update this page with new information, just login and click on the "Edit" or "Discussion" tab. Get a free login here: Register Thanks! - Find us on Google+

Page Changes | Comments

 

Featured -

Search: