when call file is running the playback executes before the pair answer the call. i used wait application to postpone the playback app. what should i do to play the sound after answering the person.
What DAHDI technology are you using? If analog this is normal as there is no call supervision provided on analog lines. They are considered answered immediately. There is an option which turns on extremely experimental code to try to guess the state of things, but it may disconnect calls.
If the service provider provides line reversal supervision, you should be able to enable that. If they don’t the call will never answer if you enable it.
Generally, though anything that requires reliable answer or disconnect supervision should use ISDN, directly, or indirectly via VoIP.