[HELP] Dailout using .call files - does not wait for answer

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.

Does it only happen when you call with a .call file?

What happens if you just call (interactively, from a live phone) with a Dial() command?

The problem is that channel zap is answered not when you pick up the handset , but when it start ringing, i.e. is not answered only if it is busy.
In fact if you try to make an outgoiong call with the sip channel, this problem doesn’t occurs.

greyhound - thanks for the reply. Unfortunately, I only have the fxo port to play with (no fxs or softphone yet).

spyke - thanks for the reply. If I understand, the behavior is as expected and there is nothing that I can do about it if I use the Zap hardware.

This seems like a serious limitation - am I still missing something or is it just not possible to detect when a Zap call is answered at the other end?

I really hope that someone comes here and tell me I’m wrong!