Auto-Dialout (Call Files)

Auto-Dialout is a feature that allows users to initiate calls through Asterisk. By placing files in /var/spool/asterisk/outgoing/, Asterisk can automatically initiate calls. Reported practical uses for call files include automated surveys and automated voicemail callbacks.

In general terms, call files specify an channel to call and an extension or application to connect with the called channel. All call files must have both to be valid. Call files also may specify call options such as Caller*ID or set local variables. Statements are made in format directive: arguments Here is a summary of available call file directives:

Table 1. Call File Directives

NameExplanation/Notes
Channel: <channel>Outbound channel
Callerid: <id>Caller*ID for outbound channel
Application: <application>Application to bridge outbound channel with. Arguments are passed with a Data directive. See note about CDR below.
Data: <data>The data to be passed to an application
MaxRetries: <integer>Number of times to retry outbound channel if it is busy or otherwise unavailable
Context: <context>Context for an extension to bridge the outbound call to
Extension: <extension>Extension in [<context>] to bridge to
Priority: <integer>The priority in <extension>@[<context>] to connect to.
RetryTime: <seconds>Time between retries
WaitTime: <seconds>How long to wait for an answer
Context: <context>Context for an extension to bridge the outbound call to
SetVar: <name=value>Set a variable for the connecting dialplan or application logic to use
Here is an example call file:

		Channel: Zap/1g/12125558910
		MaxRetries: 3
		RetryTime: 40
		WaitTime: 25
		Context: surveys
		Extension: 212 
		Priority: 1
		

Call File Caveats

There a few things to watch out for:

No CDR Data From Applications

If your call file directly connects to an application, and not an extension, no CDR data will be collected for that call. To circumvent this, just connect the call to an extension that starts the application.

Asterisk is Quick

When generating call files, create them in a staging directory and copy them into /var/spool/asterisk/outgoing/ when you are finished. Otherwise, Asterisk may grab a half-way completed call file.