I am using Asterisk 1.2 on Centos 4.2. I would like to place an outgoing call on an Wildcard X100P card using a .call file.
The .call file is:
Channel: Zap/1/<pots number>
;
MaxRetries: 5
RetryTime: 300
WaitTime: 45
Context: outgoing
Extension: s
Priority: 1
The outgoing section in extension.conf is:
[outgoing]
exten => s,1,Set(TIMEOUT(digit)=5)
exten => s,n,Set(TIMEOUT(response=10)
;exten => s,n,Answer
exten => s,n,Wait(1)
exten => s,n,Playback(/tmp/prompt00)
exten => s,n,Wait(2)
exten => s,n,Hangup()
I have tried this with and without the Answer line with the same result.
The call is placed, but Asterisk does not wait until the call is answered before continuing down the calling plan. If the call is not answered, the Playback is done and the call is terminated. Here is the console output:
*CLI> -- Attempting call on Zap/1/<pots number> for s@outgoing:1 (Retry 1)
-- Executing Set("Zap/1-1", "TIMEOUT(digit)=5") in new stack
-- Digit timeout set to 5
-- Executing Set("Zap/1-1", "TIMEOUT(response)=10") in new stack
-- Response timeout set to 10
-- Executing Wait("Zap/1-1", "1") in new stack
-- Executing Playback("Zap/1-1", "/tmp/prompt00") in new stack
-- Playing '/tmp/prompt00' (language 'en')
-- Executing Wait("Zap/1-1", "2") in new stack
-- Executing Hangup("Zap/1-1", "") in new stack
== Spawn extension (outgoing, s, 6) exited non-zero on 'Zap/1-1'
-- Hungup 'Zap/1-1'
Nov 27 08:45:32 NOTICE[15567]: pbx_spool.c:276 attempt_thread: Call completed to Zap/1/<pots number>
The dialed number rings during the entire transaction above, it is not answered.
How do I get this to wait until the call is answered before it plays the message?
Many thanks.