B.123. System()

Executes a shell command.
System(command)
Uses the C system() function to execute a command on the system shell (sh or its equivalents).
This is very similar to TrySystem() except that it returns -1 if it is unable to run the system command where as TrySystem() always returns 0.
Sets the channel variable SYSTEMSTATUS to SUCCESS, FAILURE or APPERROR (this is undocumented; the command was executed but returned an exit code other than zero).
exten => s,1,System(echo '${DATETIME} - ${CALLERID} - ${CHANNEL}' >> /var/log/asterisk/anrufe)

Note

An alternative is Backticks() application or the function BACKTICKS() from the app_backticks module.[75]This returns the output of the command.

Note

Internal help for this application in Asterisk 1.4:
  -= Info about application 'System' =- 

[Synopsis]
Execute a system command

[Description]
  System(command): Executes a command  by  using  system(). If the command
fails, the console should report a fallthrough. 
Result of execution is returned in the SYSTEMSTATUS channel variable:
   FAILURE  Could not execute the specified command
   SUCCESS  Specified command successfully executed

Old behaviour:
If the command itself executes but is in error, and if there exists
a priority n + 101, where 'n' is the priority of the current instance,
then  the  channel  will  be  setup to continue at that priority level.
Note that this jump functionality has been deprecated and will only occur
if the global priority jumping option is enabled in extensions.conf.
diff output to internal help in Asterisk 1.2:
- none -