# Asterisk Project : Dial Application

Added by malcolmd , edited by lmadsen on Feb 24, 2011

Now that you've learned the basics of using dialplan applications, let's take a closer look at the Dial() application that we used earlier in extensions 6001 and 6002. Dial() attempts to ring an external device, and if the call is answered it bridges the two channels together and does any necessary protocol or CODEC conversion. It also handles call progress responses (busy, no-answer, ringing).

Dial() and the Dialplan

Please note that if the Dial() application successfully bridges two channels together, that the call does not progress in the dialplan. The call will only continue on to the next priority if the Dial() application is unable to bridge the calling channel to the dialed device.

The Dial() application takes four parameters:

1. Devices
   - A list of the device(s) you want to call. Devices are specified as technology or channel driver, a forward slash, and the device or account name. For example, SIP/demo-alice would use the SIP channel driver to call the device specified in the demo-alice section of sip.conf. Devices using the IAX2 channel driver take the form of IAX2/demo-george, and DAHDI channels take the form of DAHDI/1.
   - When calling through a device (such as a gateway) or service provider to reach another number, the syntax is technology/device/number such as SIP/my_provider/5551212 or DAHDI/4/5551212.
   - To dial multiple devices at once, simply concatenate the devices together whith the ampersand character (&). The first device to answer will get bridged with the caller, and the other endpoints will stop ringing.

   -     exten => 6003,1,Dial(SIP/demo-alice&SIP/demo-bob,30)

2. Timeout
   - The number of seconds to allow the device(s) to ring before giving up and moving on to the next priority in the extension.
3. Options
   - There are dozens of options that you can set on the outbound call, including call screening, distinctive ringing and more. Type core show application dial at the Asterisk CLI for a complete list of all available options. If you want to specify multiple options, simply concatenate them together. For example, if you want to use both the *m*and H options, you would set mH as the options parameter.
4. URL
   - The fourth parameter is a URL that will be sent to the endpoint. Few endpoints do anything with the URL, but there are a few (softphones mostly) that do act on the URL.