Call files question

Hi all!

I’m trying to using “call” files in order to make automatic calls in asterisk. My idea is to have control on the number dialed. For example: if i call the number 100 (I move myfile.call in /spool/outgoing directory) i want that if the user 100 is busy i get a message “sorry, user is busy”, if the phone is not available i get a message “sorry, user not available”.

In few words…i need to treat the dialed number as a variable and manipulate the associated status.
How can i obtain that? No exaustive asterisk guide or documents on “call files”…

myfile.call
Channel: SIP/100
Extension: IVR
Priority: 1

extensions.conf

[IVR]
exten => s,1,???

Thx in advance!

Mario

If you want detailed status on the first party, you will need to use a local channel to setup the outbound call.

hope this will help you

asterisk call file sample

[quote]Channel: SIP/2000
MaxRetries: 2
RetryTime: 5
WaitTime: 30
Context: outgoing
Extension: 9999999999[/quote]

  1. now give necessary permission to the /var/spool/asterisk/outgoing dirctory
    ie: chmod 777 /var/spool/asterisk/outgoing

  2. mv filename.call /var/spool/asterisk/outgoing

  3. the call will be immediatly connected

FYI description of the call file
Channel:
The channel upon which to initiate the call. Uses the same syntax as the Dial()
Callerid:
The caller ID to be used for the call.
WaitTime:
Number of seconds the system waits for the call to be answered. If not specified, defaults to 45 seconds.
MaxRetries:
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).
RetryTime:
Number of seconds to wait until the next dial attempt. If not specified, defaults to 300 seconds.
Account:
The account code for the CDR.
Context:
The destination context.
Extension:
The destination extension, in which dialplan execution begins if the device is answered.
Priority:
The destination priority. If not specified, defaults to 1.
Setvar: <var=value>
Setvar: lets you set one or more channel variables.
Archive: <yes|no>

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