Hi list,

I am having some difficulty implementing a certain dialplan where the following
happens. If the first Dial() is not answered, I want to play a small greeting then
ask the caller to either hold the line (try calling again) or press 1 to leave
voicemail.


exten => s,1,Dial(${BLAH},10,Tt) ; Dial 10 sec
exten => s,2,Answer
exten => s,3,Playback(greeting)
exten => s,4,Playback(werebusy)
exten => s,5,DigitTimeout(1)
exten => s,6,ResponseTimeout(3)
exten => s,7,Read(WHAT,holdormsg,1) ; "Hold the line, or press 1 to leave a msg.."
exten => s,8,Gotoif($[${WHAT} = 1]?30)
exten => s,9,Dial(${BLAH},15,Ttm) ; Dial another 15 sec with music on hold
exten => s,10,Goto(7) ; Loop


My problem is that if the caller doesn't press a key when prompted, and the Read()
is allowed to time out (3 seconds), (s,7) returns non-zero and asterisk hangs up
on the caller without further execution. I want it to continue down the priorities and
redial the line, with hold music.. It doesn't even get to test the value of ${WHAT}
if nothing is entered. However, if the caller enters an number other than 1, it will
perform properly and redial the line.


    -- Executing Read("vpb/1-1", "WHAT|holdormsg|1") in new stack
    -- Accepting a maximum of 1 digits.
    -- Playing 'holdormsg' (language 'en')
    -- User entered ''
  == Spawn extension (blah, s, 9) exited non-zero on 'vpb/1-1'
  == vpb/1-1: Hangup requested
  == vpb/1-1: Ending record mode (1/yes)
  == vpb/1-1: Ending play mode on vpb/1-1
  == vpb/1-1: Hangup complete

Any ideas what could be wrong ?

Cheers
Troy

_______________________________________________
Asterisk-Users mailing list
[email protected]
http://lists.digium.com/mailman/listinfo/asterisk-users
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-users

Reply via email to