[asterisk-users] Running a script after Dial() ?

Ben Dinnerville ben at voicelogic.com.au
Thu Feb 4 18:13:25 CST 2010


Why dont you use the MixMonitor application which allows for a system 
command to be passed in as an argument that is executed once the 
recording is finished??? -

MixMonitor(<file>.<ext>[|<options>[|<command>]])

<command> will be executed when the recording is over. Any strings 
matching ^{X} will be unescaped to ${X} and all variables will be 
evaluated at the time the application is called. Where <command> is a 
system (Linux shell) command, see Asterisk cmd System for example values.
The variable MIXMONITOR_FILENAME will contain the name of the file used 
for recordings.
Note do NOT include the dialplan command System(blah), just blah.
If you don't specify a full path of the sound file, the file will be 
stored in the "monitor" subdir of the path specified with astspooldir in 
asterisk.conf (so default will be /var/spool/asterisk/monitor).
Note that no environment variables are given to <command> — you must 
pass these on via command-line arguments.

The audio file is closed and processing of <command> is started *after* 
the 'h' extension priorities have been run.


Cheers,

Ben




More information about the asterisk-users mailing list