C.53. TIMEOUT()

TIMEOUT(type)
Reads/sets a timeout on the channel. The following types are permitted:
absolute
The absolute, maximum duration of a call. Once reached, the call is passed to the extension T, if it exists, or hung up. A value of 0 is the same as no timeout. When this function is called, the existing setting is reset and overwritten. The timeout counter starts when this function is called, not when the call begins.
digit
The maximum time allowed between entry of digits. If exceeded, user input is deemed to have finished. If the resulting extension does not exist, the call is passed to the extension i (invalid), if it exists, or hung up. The default is 5 seconds.
response
The maximum time to wait for input from a user. If the user does not enter an extension, the call is passed to extension t (timeout), if it exists, or the call is hung up. Default: 10 seconds.
; Check the absolute timeout:
exten => 123,1,Set(foo=${TIMEOUT(absolute)})

; Limit call duration to a maximum of 60 seconds:
exten => 123,1,Set(TIMEOUT(absolute)=60)
exten => 123,n,Dial(SIP/${EXTEN})
exten => T,1,Playback(sorry-dude) 
exten => T,n,Playback(buh-bye) 
exten => T,n,Hangup()

Note

Internal help for this application in Asterisk 1.4:
  -= Info about function 'TIMEOUT' =- 

[Syntax]
TIMEOUT(timeouttype)

[Synopsis]
Gets or sets timeouts on the channel.

[Description]
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 type 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.  The default timeout is 10 seconds.
diff output to internal help in Asterisk 1.2:
- none -