Asterisk answering calls too early

I am stumped (probably over a small thing).

When * calls my phone, it starts to play a greeting before I even pick up the phone. By the time my phone starts ringing and I answer it, the message is half over.

Here is my extensions.conf context:

[play1]
exten => s,1,ResponseTimeout,100
exten => s,2,Answer
exten => s,3,Playback(vm-options)
exten => s,4,Hangup

If I use this context with an IAX channel and an external VoIP provider, it works great! My phone rings, I answer it, and the message starts to play.

If I use this context with a TDM400P with an FXO module, it immediately proceeds to the Playback (even while my phone is still ringing). I’ve put wait(6) before the answer and it didn’t help.

Anyone know what’s wrong?

Bill

bill, i’m stumped too … trying to work out what you’re trying to do. if you’re using this as an incoming-from-zap context then Asterisk is going to answer and play vm-options as the dialplan stipulates.

what is it you’re trying to do ?

Thanks for taking the time to reply. The short script I posted above is just an example I put together to demonstrate my problem.

I would like to be able to initiate a call by placing a call file in my …/outgoing directory. Then, have my server call my cell phone and play me a message when I answer it.

I thought that Answer() basically listened to ringing and paused the flow of execution until someone answered the phone. It doesn’t seem to do that when I make a call using my Zap channel which is associated with my TDM400P with an FXO module.

Maybe you can try the wait(2) just before or right after your answer command… might solve your problem…

There are times when you don’t want to use the answer() at all. Does Asterisk not listen to the phone ringing anyway? If there is no answer() then execution is put on hold until the extension is picked up or it times out?

CLI > show application Answer would say otherwise. it merely answers a channel.

it’s been posted a few times over the last few days, Zap has limited connect/disconnect supervision capabilities and the channel will show as answered immediately, regardless of the answer status. some hardware works ok, and it relies on your telco doing their bit too.

perhaps you could look at dialling using the G option to pass you into a context that waited for input from you before proceeding ?

I think my US phone company (a Sprint subsidiary) is okay. It is probably just an issue with zaptel & asterisk working together. I was hoping someone else had this problem and knew what they had to do to fix it.

I will be calling a phone and will never receive input (like key prompts) from a person. So, it’s really important for me to know when the call is answered on their end. Also, the fact that it works when I use IAX or SIP through another service provider kinda clues me in on a Zap isolation. I should have a perfect setup. I just bought a brand new Dell PowerEdge 1850 with a PCI Ethernet card. I installed the Pound Key (an operating system from Digium) recently. I downloaded the latest and greatest zaptel drivers. I stuck to simple configurations of zaptel.conf and zapata.conf. I did notice that I can hear a slight echo when I talk into the phone (even with echo cancellation on). I wonder if the echo could be causing the problem.

I wonder if distinctive ring detection isn’t working or polarity checking isn’t working.

in the limited installations i’ve done with the TDM cards, answer supervision has never worked.

the Sangoma AFT A200 works nicely though with ‘answeronpolarityswitch=yes’ and a telco that provides the reversal (BT in this case)

YMMV

What might be a strategy I could employ to work around this issue?

How do you make a system that calls phones and leaves messages?