[Asterisk-Users] Newbie Help - Auto Fallthrough

Jonathan Hobbs toolkit at magma.ca
Wed Feb 23 09:18:34 MST 2005


I am a serious Asterisk newbie: just installed asterisk last week and it is
now running with our Voicetronix OpenLine4 hardware.

All is working as expected with one exception, in the following sequence
(extracted from my extensions.conf file):

[GetConfirmation]
exten => s,n,SetVar(TimeOut=0)          ; if timeout and TimeOut=1 then user
already timed out once, so hangup
exten => s,n,SetVar(State=GetConfirmation)                      ; set up for
time-out return
exten => s,n,ResponseTimeout(10)                                ; Set
Response Timeout to 10 seconds
exten => s,n,Background(mymenu})                               ; play menu
msg (press 1..., press 2... press 3...), wait for response

include => TimeOut                                              ; include
timeout handler

exten => 1,1,Goto(DoTransaction,s,1)                            ; submit
transaction

exten => 2,1,Goto(GetFare,s,1)                                  ; send user
back to re-enter fare, tip and cab #

exten => 3,1,Goto(s,1)                                          ; replay
confirmation msg

[TimeOut]
; user timed out, so see if TimeOut flag set.  If set, then this is the
second time in a row that user has timed out
; so hang up.  If not set, then set TimeOut and let user try again
; Usage:   include => TimeOut  (placed as last entry in any context
(routine) where timeout handling required)
exten => t,1,NoOp(In TimeOut: ${TimeOut})
exten => t,2,Gotoif($[${TimeOut}]?:5:3)
exten => t,3,SetVar(TimeOut=1)                  ; users first time-out so
set flag
exten => t,4,Goto(${State},s,1))                ; start current sub-routine
all over again
exten => t,5,Hangup                             ; users second time-out, so
hang up



In the above sequence (context) the menu message plays as expected, and as
long as the user enters a DTMF digit BEFORE the message playback completes,
all words as it should.  However, if the message playback completes, there
is no 10 second wait for the user's entry, instead the call hangs up
immediately and the following debug info is displayed on the console:


    -- Executing SetVar("vpb/1-1", "State=GetConfirmation") in new stack
    -- Executing ResponseTimeout("vpb/1-1", "10") in new stack
    -- Set Response Timeout to 10
    -- Executing BackGround("vpb/1-1", "1-1") in new stack
    -- Playing '1-1' (language 'taxi')
  == Auto fallthrough, channel 'vpb/1-1' status is 'UNKNOWN'
  == vpb/1-1: Hangup requested
  == vpb/1-1: Ending record mode (1/yes)
       > vpb/1-1: stopped record thread on vpb/1-1
  == vpb/1-1: Ending play mode on vpb/1-1
       > vpb/1-1: Setting state down
  == vpb/1-1: Hangup complete
       > Restarting monitor
       > Trying to reawake monitor
       > Monitor restarted
       > Monitor got null event
       > vpb/1-4: Event [12=>[03] Loop Drop]
       > vpb/1-4: handle_notowned: mode=3, event[12][[03] Loop Drop
]=[0]
       > vpb/1-4: handle_notowned: mode=3, [12=>0]


Can anyone tell me:

(1) why there is no 10 second wait time?
(2) why the TimeOut code did not execute?

Any and all ideas, comments, suggestions appreciated!

Jonathan






More information about the asterisk-users mailing list