System()
System(Befehl
)
system()
einen Befehl auf
der Shell sh
aus.TrySystem()
-Anwendung sehr
ähnlich, abgesehen davon, dass sie -1 zurückliefert, falls sie den
Systembefehl nicht ausführen kann, wohingegen die
TrySystem()
-Anwendung stets 0 zurückliefert.SYSTEMSTATUS
auf
SUCCESS
(erfolgreich ausgeführt), FAILURE
(konnte
nicht ausgeführt werden) oder (undokumentiert) auf APPERROR
(Befehl ausgeführt, aber mit Exit-Code ungleich 0).exten => s,1,System(echo '${DATETIME} - ${CALLERID} - ${CHANNEL}' >> /var/log/asterisk/anrufe)
————————| 1.2 |————————| 1.4 |————————| 1.6 |————————
-= 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.
--- in Asterisk 1.4
+++ in Asterisk 1.6
@@ -9,10 +9,3 @@
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.