How to configure the asterisk dot call file for autodial
10 Sep, 2015
Asterisk dot call file Configuration
Topic: How to configure the asterisk dot call file for autodial
Asterisk Call Files
Asterisk call files are structured files which, when moved to the appropriate directory, are able to automatically place calls using Asterisk. Call files are a great way place calls automatically without using more complex Asterisk features like the AGI, AMI, and dialplan, and require very little technical knowledge to use.
Call files are like a shell script for Asterisk. A user or application writes a call file into /var/spool/asterisk/outgoing/ where Asterisk processes it immediately
Asterisk .call demonstration
Let's demonstrate the .call file principle with an example. Assume that we have a SIP phone registered with the number 1000 in Asterisk. In addition, we have the following dialplan in extensions.conf :
for more information about dialplan click this Link
Asterisk polls the /var/spool/asterisk/outgoing/ for new call files and processes any it finds.
Asterisk opens a connection to device SIP/1000. If the device is in use or not answered, Asterisk tries two more times (seeMaxRetries).
If someone answers SIP/1000, Asterisk begins processing extension 777 in the context [voicebroadcast]. In this case, Asterisk plays hello-world to the answering party.
The channel upon which to initiate the call
The caller ID to be used for the call.
Number of seconds the system waits for the call to be answered. If not specified, defaults to 45 seconds.
Maximum number of dial retries (if an attempt fails because the device is busy or not reachable). If not specified, defaults to 0 (only one attempt is made).
Number of seconds to wait until the next dial attempt. If not specified, defaults to 300 seconds.
The account code for the CDR.
The destination context.
The destination extension, in which dialplan execution begins if the device is answered.
The destination priority. If not specified, defaults to 1.
lets you set one or more channel variables
By default, call files are deleted immediately upon execution. If Archive: yes is set, they are copied into /var/spool/asterisk/outgoing _done/ instead. Asterisk adds a line to the call file which describes the result:Status: <Expired|Completed|Failed>
If the call is not processed follow the below steps 1. Permission to outgoing directory chmod 777 /var/spool/asterisk/outgoing 2. change the ownership to the .call file chown asterisk:asterisk /var/spool/asterisk/outgoing/broadcast.call