Call Files

From KlavoWiki
Jump to navigationJump to search

Call files are nothing more than simple text files which contain directives that instruct Asterisk how to place calls and what to do once the call is connected.

Call files may contain comments. Comments are encouraged in call files to help provide clear explanations to other people who may use/modify the call file in the future. Comments always follow a pound sign (#) or a semi-colon (;) character. All comments are ignored by Asterisk when processing the call file, and have no effect on the call.

The call file is broken into two sections. The first section is the initial call and the second section is what to do with that call which in itself uses one of two options.

Section A

Channel: DAHDI/g1/12341234

... with the following options

MaxRetries: 1
RetryTime: 5
WaitTime: 60

Section B
Connect the call to another call or an application.

Context: default
Extension: s
Priority: 1

or

Application: VoiceMailMain
Data: 1234

... additional data that can be used:

Callerid: Wakeup Call Service <(555) 555-5555>
Account: mysuperfunaccountcode
Set: file1=/tmp/to
Set: file2=/tmp/msg
Set: timestamp=20021023104500
Set: CDR(userfield,r)=42

NOTE: The file that you create should be created in /tmp/ or some other location and then MOVED and not copied to /var/spool/asterisk/outgoing/. If the file is copied Asterisk could try to activate the file before the file has been completely copied and thus cause problems.

Future Activation
If you want to run a call file in the future just change the date stamp of the file to be the day and time that you would like the file to run.