Skip to main content

mod_dptools: system

About

Execute an operating system command and wait for the result (blocking).

Click here to expand Table of Contents

Usage

system <command>

Because this command blocks further execution of the dialplan until it completes, do not execute long-running commands this way. An alternative is the 'bgsystem' dialplan app to run the command in the background.

Example

<action application="system" data="myapp.sh"/>

Get the information back as a channel variable!

<action application="set" data="OUT=${system foo.sh}"/>

If you need to remove a trailing new line character, you can use this:

<action application="set" data="OUT=${regex(${system foo.sh}|(.+)|%1)}"/>

See Also

Comments:

Does <param name="threaded-system-exec" value="true"/> in switch.conf.xml change how this `system` dialplan application is executed? Posted by tomasb at Feb 08, 2018 19:23