How to configure Asterisk to send audio before call is established

Solution 1:

Early media is possible with Asterisk, but only in certain situations, and only with the cooperation/support of all the devices and services involved. Some phones and/or service providers do not support early media. Support for early voice and early DTMF may vary.

You have a SIP phone registered to Asterisk, which places a call to an external number. Asterisk in turn Dials that number over a separate SIP trunk. These are two separate call legs. Asterisk can play early media back to the caller (a custom ringtone or music on hold, for instance) and Asterisk can receive early media from the external party over the SIP trunk. However, a standard Dial() statement will automatically Answer() and bridge the call legs together when remote party answers.

It seems you wish to avoid this usually-desired behavior, and bridge the call legs without Answer()ing them. The Dial() application allows you to defer the usually-automatic Answer() using the 'd' or 'D' options. I'm not aware of any Dial() option that will allow you to bridge the call legs without Answer()ing.

Please see the Asterisk wiki for further discussion and examples of early media with Asterisk.