Dial and Wait on Connect

Is there any option or way wherein after dialing a channel and on successfull Connection , Asterisk can wait for 3-4 seconds before actually passing on the audio as opposed to immediate delivery of voice ( or automated message ).
I am using asterisk 1.6 and SIP channel and am trying to originate an automated message.If the call is anwsered then the message is delivered perfectly but if the call goes to answering machine or voicemail then it is truncated.


are you using a sip provider? or do you have a pots line, or PRI?

Add a suitable application to your dial plan before the one that sends the message. The simplest is Wait()

Here is the dialplan:-
exten => _X.,1,Set(CALLERID(num)=1XXXXXXX7689)
exten => _X.,n,Wait(8)
exten => _X.,n,Dial(SIP/${EXTEN}@XXXXXXXX,30,trg)

      This Dialplan is executed from an originate command which is supposed to deliver an automated message. The Problem I am facing is when the call rings thru' and connects to voicemail or answering machine. In this scenario my theory is that it takes some finite time for the destination device to be ready to receive any audio. However the audio is delivered as soon as Asterisk thinks it has connected, resulting in choppy or no message delivery at all. 


How about playing an 8 sec recording of silence before playing the real message?

There is something missing from that dialplan - nowhere does it make the announcement. The wait, wait for silence, answering machine detect, etc. needs to be before the dialplan line that makes the announcement. In also wonder if you have your originate parameters the wrong way round.

On the other hand, I receive lots of automated, international calls (from outside UK jurisdiction, where they would be illegal) at home, normally from very dubious organisations, so I’m not really sympathetic to this sort of application, in general.