Diff from version 4 to 8 (current)
@@ -22,7 +22,7 @@ |
* call file asterisk | * asterisk call file dial plan context | * asterisk call file ( /var/spool/asterisk/outgoing). | -* Examples: See __Minimal Call File Example__ and __Syntax of Call Files__ sections. | +* : __ Call File __ __Call Files __ | !!Call files | * | ** __Channel: <channel>__: Channel to use for the call. |
|
|
@@ -36,18 +36,18 @@ |
** __Extension: <ext>__ extensions.conf | ** __Priority: <priority>__ Priority of extension to start with | ** __Set:__ ((Asterisk variables|variable)) for use in the extension logic (example: __file1=/tmp/to__ ); in Asterisk 1.0.x use 'SetVar' instead of 'Set' | -** __Application: __ Asterisk Application to run (use instead of specifiying context, extension and priority) | +** __Application: __ Asterisk ( (context), Extension priority) | ** __Data: __ application | * New (?) in Asterisk 1.4 | ** __Set:__ Can now also write to dialplan functions like CDR() | -** __AlwaysDelete:__ Yes/No - If the file's modification time is in the future, the call file will not be deleted | -** __Archive:__ Yes/No - Move to subdir "outgoing_done" with "Status: value", where value can be Completed, Expired or Failed. | +** __AlwaysDelete:__ Yes/No - call file | +** __Archive:__ Yes/No - "outgoing_done" "Status: value", where value can be Completed, Expired or Failed. | | app | | !! Call File | | - call file that we can make does nothing more than dial a number, and play a sound file. | + call file | | hello-world.call | ^ |
|
|
@@ -55,23 +55,25 @@ |
Application: Playback | Data: hello-world | ^ | + : Data | + | call file ( the asterisk user: | | ^ | mv hello-world.call /var/spool/asterisk/outgoing/ | ^ | | -How does this work? Asterisk does the following when reading the above call file: | + Asterisk call file | | -* Dial the number 18882223333 out of the trunkname SIP trunk. | -* Once the call has been answered, play the sound file /var/lib/asterisk/sounds/hello-world (this sound file is included by default) | -* Hang up the call. | +* SIP 18882223333 trunkname | +* /var/lib/asterisk/sounds/hello-world ( ) | +* | | -As you can see, this is a very minimal call file example. | + call file | | !!The 'failed' extension | -If the call is not answered, __and__ the ((Asterisk standard extensions|standard extension)) __failed__ with priority 1 exists in the same context, control will jump there (feature introduced in either Asterisk 1.2 or 1.4. NOTE: This works in asterisk 1.2.14) | -** ''Note 1:'' This only works if you made the call with context, extension, and priority defined, and didn't use the application, data form. | + , __ __ ((Asterisk standard extensions|standard extension)) __failed__ priority 1 (context) , ( Asterisk 1.2 or 1.4. NOTE: This works in asterisk 1.2.14) | +** ''Note 1:'' : context, extension, priority defined, application | ** ''Note 2:'' This is a good place to update the CDR __UserField__ with a value of the phone number that was being dialed using the __SetCDRUserfield()__ application. Asterisk (as of 1.2.10) does not make the dialed channel (eg. IAX2/15551234567) available anywhere, so you have to pass it to yourself using __Set:__ field of the .call file. (Along with anything else you want pass to the channel in this same variable). | ** ''Note 3:'' The ${REASON} channel variable receives a value that represents the reason why the call failed. See more on ((Asterisk Reason variable|Asterisk Reason variable)). | |
|
|
@@ -92,17 +94,17 @@ |
* Especially Asterisk 1.0 and 1.2 behave differently for what concerns a) passing on variables to channels and b) global variables | * Consider using ((Asterisk cmd DBGet|DBGet)) and ((Asterisk cmd DBGet|DBPut)) if you experience trouble passing variables | | -!!Creating and Moving Call Files | +!! Call Files | | -Because Asterisk can grab these files at any time (e.g. when the file is only 1 / 2 written), ~~red:do not create the file directly in the /var/spool/asterisk/outgoing directory~~. Do something like this: | + Asterisk Call File ( : ), ~~red: /var/spool/asterisk/outgoing ~~. : | | -* Create the call file in a different directory - e.g. /var/spool/asterisk/tmp/callfile-18882223333-01252010-104400.call | -* If Asterisk is running as a different user than you are creating the call file with (eg: If Asterisk runs as 'asterisk', but you are creating the call file as 'root',) then you will need to change the file's ownership permissions before sending it to the Asterisk spooling directory: __chown asterisk:asterisk /var/spool/asterisk/tmp/callfile-18882223333-01252010-104400.call__ | +* call file - /var/spool/asterisk/tmp/callfile-18882223333-01252010-104400.call | +* Asterisk user user ( : Asterisk 'asterisk' call file 'root' ) Asterisk : __chown asterisk:asterisk /var/spool/asterisk/tmp/callfile-18882223333-01252010-104400.call__ | * __mv /var/spool/asterisk/tmp/callfile-18882223333-01252010-104400.call /var/spool/asterisk/outgoing/__ | | This works because the Unix move operation (mv command) merely moves the "inode" -- the pointer to the file -- making the entire file appear all at once and eliminates the possibility that Asterisk could read and act upon a partially written file. (Note that this is only true if the source and destination are on the same file system; otherwise, it does the equivalent of a "cp"; see below.) | | -__Note:__ ~~red:Using the copy command (cp) is not a safe method for adding a file to the outbound directory since other programs can read the new file in the midst of the copy operation when the file is only partially written. If you want to use CP you should copy the file in your call file directory under permissions which don't allow asterisk to read or remove it, then chown the file. This will save you from having to create an extra backup of the file.~~ | +__Note:__ ~~red: copy (cp) copy CP asterisk copy ~~ | | !!VB Scripts for creating your call files from a simple text file and then moving the files to asterisk spool directory using pscp. | |
|
|
User | Comment | Time | Version |
---|
dominic16y | | 2015-01-13 07:33 | 8 |
dominic16y | | 2015-01-13 07:31 | 7 |
dominic16y | | 2015-01-13 06:45 | 6 |
dominic16y | | 2015-01-13 06:32 | 5 |