[Asterisk-Users] Background() and Read()

Douglas Garstang dgarstang at oneeighty.com
Thu Apr 20 15:02:59 MST 2006


I'm having some issues with Background() and Read() commands.
See the example below. This is when I wait for Background to finish playing the sound file, before entering '12345#'. 
All works fine.

hestia*CLI> 
    -- Executing Answer("SIP/2944093-3366", "") in new stack
    -- Executing Wait("SIP/2944093-3366", "1") in new stack
    -- Executing BackGround("SIP/2944093-3366", "if-u-know-ext-dial") in new stack
    -- Playing 'if-u-know-ext-dial' (language 'en')
    -- Executing Read("SIP/2944093-3366", "number||||||") in new stack
    -- User entered '12345'
    -- Executing NoOp("SIP/2944093-3366", "12345") in new stack
  == Auto fallthrough, channel 'SIP/2944093-3366' status is 'UNKNOWN'

However, if I start to enter digits before Background() is finished, background stops playing the file, and nothing happens after this point. I keep hitting # and still no reply. It didn't even execute the Read().

hestia*CLI> 
    -- Executing Answer("SIP/2944093-6437", "") in new stack
    -- Executing Wait("SIP/2944093-6437", "1") in new stack
    -- Executing BackGround("SIP/2944093-6437", "if-u-know-ext-dial") in new stack
    -- Playing 'if-u-know-ext-dial' (language 'en')

Here's extensions.conf:
exten => 1000,1,Answer
exten => 1000,2,Wait,1
exten => 1000,3,Background(if-u-know-ext-dial)
exten => 1000,4,Read(number||||||)
exten => 1000,5,NoOp(${number})

Anyone got any ideas?



More information about the asterisk-users mailing list