D.101. TIMEOUT()

TIMEOUT(Art)
Liest/setzt eine Zeitbegrenzung auf einem Kanal. Diese Arten von Timeouts sind möglich:
absolute
Die gesamte, maximale Zeit, die ein Anruf dauern darf. Beim Erreichen dieser Dauer wird auf die Extension T (absolute timeout) weitergeleitet oder aufgelegt. Ein Wert von 0 bedeutet, dass es keine Begrenzung gibt. Mit dem Aufruf dieser Funktion wird die vorangehende Einstellung ungültig und neu gesetzt. Der Timeout beginnt zu dem Zeitpunkt des Aufrufs dieser Funktion, nicht mit dem Beginn des Anrufs.
digit
Die maximale Zeit, die zwischen dem Eintippen von Ziffern erlaubt ist. Beim Überschreiten wird die Eingabe des Users als beendet angesehen. Wenn dann die Extension nicht existiert, wird auf die Extension i (invalid) weitergeleitet oder aufgelegt. Der Default ist 5 Sekunden.
response
Die maximale Zeit, die auf eine Eingabe vom User gewartet wird. Wenn der User keine Extension tippt, wird auf die Extension t (timeout) weitergeleitet oder aufgelegt. Default: 10 Sekunden.
; absoluten Timeout abfragen:
exten => 123,1,Set(foo=${TIMEOUT(absolute)})

; Anruf-Dauer auf maximal 60 Sekunden begrenzen:
exten => 123,1,Set(TIMEOUT(absolute)=60)
exten => 123,n,Dial(SIP/${EXTEN})
exten => T,1,Playback(tut-uns-leid) 
exten => T,n,Playback(auf-wiederhoeren) 
exten => T,n,Hangup()
Asterisk-Versionen:
————————| 1.2 |————————| 1.4 |————————| 1.6 |————————
Interner Hilfetext zu dieser Funktion 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.
Differenz des internen Hilfetexts von Asterisk 1.2 zu 1.4:
— keine —
Differenz des internen Hilfetexts von Asterisk 1.4 zu 1.6:
--- in Asterisk 1.4
+++ in Asterisk 1.6
@@ -4,14 +4,14 @@
   TIMEOUT(timeouttype)

   [Synopsis]
-  Gets or sets timeouts on the channel.
+  Gets or sets timeouts on the channel. Timeout values are in seconds.

   [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.
+            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,
@@ -25,8 +25,8 @@
             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.
+            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.