Calling out

When I try to call out asterisk dosnt wait for the call to be answered before it starts the dial plan. I tried Wait for Ring and AMD but that dosnt work. I notice that asterisk dosnt say Zap is Ringing when it calls out not sure if it is supposed to. please let me know if you need any more information about my problem.

I think that an output of you *CLI, and your dialplan is needed

Here is the dial plan

[code][callfile]

exten => s,1,Set(saveto=/var/log/asterisk/); where to save the call file
exten => s,n,Set(filename=${callnumber}${STRFTIME(${EPOCH},-%m.%d.%y-%a.%b%d.%I.%M.%S%p)})
; Specify where and how to call
exten => s,n,System(echo “Channel: Zap/g0/${callnumber}” >> ${saveto}${filename})
exten => s,n,System(echo “MaxRetries: 3” >> ${saveto}${filename})
exten => s,n,System(echo “RetryTime: 90” >> ${saveto}${filename})
exten => s,n,System(echo “WaitTime: 30” >> ${saveto}${filename})
; If the call answers, connect it here
exten => s,n,System(echo “Context: outbound” >> ${saveto}${filename})
exten => s,n,System(echo “Extension: s” >> ${saveto}${filename})
exten => s,n,System(echo “Priority: 1” >> ${saveto}${filename})
exten => s,n,System(echo “Archive: Yes” >> ${saveto}${filename})
exten => s,n,System(mv ${saveto}${filename} /var/spool/asterisk/outgoing/)
exten => s,n,BackGround(auth-thankyou)
exten => s,n,Hangup

[test] ; dial 7 to go here
exten => s,1,BackGround(tt-weasels)
exten => s,n,set(callnumber=2033606)
exten => s,n,Goto(callfile,s,1)
exten => s,n,Hangup

exten => s,2,WaitExten(45)
exten => s,3,Hangup

exten => #,1,BackGround(auth-thankyou)
exten => #,2,Hangup

;exten => _XXXXXXX,1,SayDigits(${EXTEN})
exten => _XXXXXXX,1,set(callnumber=${EXTEN})
exten => _XXXXXXX,1,set(callnumber=2033606)
exten => _XXXXXXX,n,Goto(callfile,s,1)
exten => _XXXXXXX,n,Hangup

[outbound]
exten => s,1,Answer
exten => s,n,Wait(30)
exten => s,n,WaitForSilence(500|4)
exten => s,n,AMD
exten => s,n,GotoIf($[${AMDSTATUS}=HUMAN]?humn:mach)
exten => s,n(mach),WaitForSilence(2500)
exten => s,n,Playback(tt-weasels)
exten => s,n,Hangup
exten => s,n(humn),WaitForSilence(500)
exten => s,n,Goto(main,s,1)
exten => s,n,Hangup [/code]

Here is the CLI

localhost*CLI> dial 7 The 'dial' command is deprecated and will be removed in a future release. Please use 'console dial' instead. == Console is full duplex -- Executing [7@local:1] Goto("Console/dsp", "test|s|1") in new stack -- Goto (test,s,1) -- Executing [s@test:1] BackGround("Console/dsp", "tt-weasels") in new stack << Console call has been answered >> -- <Console/dsp> Playing 'tt-weasels' (language 'en') -- Executing [s@test:2] Set("Console/dsp", "callnumber=2033606") in new stack -- Executing [s@test:3] Goto("Console/dsp", "callfile|s|1") in new stack -- Goto (callfile,s,1) -- Executing [s@callfile:1] Set("Console/dsp", "saveto=/var/log/asterisk/") in new stack -- Executing [s@callfile:2] Set("Console/dsp", "filename=2033606-01.03.09-Sat.Jan03.11.44.31PM") in new stack -- Executing [s@callfile:3] System("Console/dsp", "echo "Channel: Zap/g0/2033606" >> /var/log/asterisk/2033606-01.03.09-Sat.Jan03.11.44.31PM") in new stack -- Executing [s@callfile:4] System("Console/dsp", "echo "MaxRetries: 3" >> /var/log/asterisk/2033606-01.03.09-Sat.Jan03.11.44.31PM") in new stack -- Executing [s@callfile:5] System("Console/dsp", "echo "RetryTime: 90" >> /var/log/asterisk/2033606-01.03.09-Sat.Jan03.11.44.31PM") in new stack -- Executing [s@callfile:6] System("Console/dsp", "echo "WaitTime: 30" >> /var/log/asterisk/2033606-01.03.09-Sat.Jan03.11.44.31PM") in new stack -- Executing [s@callfile:7] System("Console/dsp", "echo "Context: outbound" >> /var/log/asterisk/2033606-01.03.09-Sat.Jan03.11.44.31PM") in new stack -- Executing [s@callfile:8] System("Console/dsp", "echo "Extension: s" >> /var/log/asterisk/2033606-01.03.09-Sat.Jan03.11.44.31PM") in new stack -- Executing [s@callfile:9] System("Console/dsp", "echo "Priority: 1" >> /var/log/asterisk/2033606-01.03.09-Sat.Jan03.11.44.31PM") in new stack -- Executing [s@callfile:10] System("Console/dsp", "echo "Archive: Yes" >> /var/log/asterisk/2033606-01.03.09-Sat.Jan03.11.44.31PM") in new stack -- Executing [s@callfile:11] System("Console/dsp", "mv /var/log/asterisk/2033606-01.03.09-Sat.Jan03.11.44.31PM /var/spool/asterisk/outgoing/") in new stack -- Executing [s@callfile:12] BackGround("Console/dsp", "auth-thankyou") in new stack -- <Console/dsp> Playing 'auth-thankyou' (language 'en') -- Attempting call on Zap/g0/2033606 for s@outbound:1 (Retry 1) -- Executing [s@callfile:13] Hangup("Console/dsp", "") in new stack == Spawn extension (callfile, s, 13) exited non-zero on 'Console/dsp' << Hangup on console >> -- Executing [s@outbound:1] Answer("Zap/7-1", "") in new stack -- Executing [s@outbound:2] Wait("Zap/7-1", "30") in new stack