[Asterisk-Users] Re: Execute command in shell
Marc Fargas
asterisk at telenieko.com
Fri Feb 6 03:33:44 MST 2004
It drives me to a new question... how can I concatenate three strings on
extensions.org ?
That is, the command, and the two args; The arguments are the source e164
and destination e164 numbers of the current call.
Something like "/bin/false " + $SOURCE164 + " " + $DEST164
-----Mensaje original-----
De: asterisk-users-admin at lists.digium.com
[mailto:asterisk-users-admin at lists.digium.com] En nombre de James H. Cloos
Jr.
Enviado el: viernes, 06 de febrero de 2004 9:58
Para: asterisk-users at lists.digium.com
Asunto: [Asterisk-Users] Re: Execute command in shell
>>>>> "Marc" == Marc Fargas <asterisk at telenieko.com> writes:
Marc> I've seen its possible to use the System applications, but what
Marc> about passing arguments to the command ?
A quick look at app_system.c shows that it just passes the string
unaltered to system(3). So, running "man 3 system" will show exactly
what system(3) does:
system() executes a command specified in string by calling
/bin/sh -c string, and returns after the command has been completed.
As such, System(command arg1 arg2 etc) should do what you want.
-JimC
PS No, I didn't know that before I looked at the src....
PPS Except for what was in the system(3) manpage....
_______________________________________________
Asterisk-Users mailing list
Asterisk-Users at lists.digium.com
http://lists.digium.com/mailman/listinfo/asterisk-users
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
More information about the asterisk-users
mailing list