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.... ======== That has been copied from a previous thread called "Execute Command in Shell" that's the reply I gave from James H. Cloos Jr. [cloos at jhcloos.com] ================ NOTE that it seems that you need to specify full path to your 'sh'. Marc. -----Mensaje original----- De: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] En nombre de Alessio Focardi Enviado el: jueves, 19 de febrero de 2004 14:38 Para: [EMAIL PROTECTED] CC: [EMAIL PROTECTED] Asunto: Re: [Asterisk-Users] Executing external script Tnx ! I tried System(), but documentation is very scarce ... what can I insert in the () ? a system command like System(sh myscript.sh) does not seem to work .... Again tnx ! At 18.54 18/02/04, Philipp von Klitzing wrote: >Hi! > > > just a simple question: I'm looking for a way to execute an external > > script (php) on the server when an extension is dialed. > > > > I have looked around in google without results ... > >Use AGI, EAGI or System(): > >http://www.voip-info.org/wiki- >Asterisk+AGI?PHPSESSID=aa7ef3b3958673084a41274ea0c637aa > >http://www.voip-info.org/wiki-Asterisk+cmd+System > >Cheers, Philipp Alessio Focardi _______________________________________________ Asterisk-Users mailing list [EMAIL PROTECTED] http://lists.digium.com/mailman/listinfo/asterisk-users To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users _______________________________________________ Asterisk-Users mailing list [EMAIL PROTECTED] http://lists.digium.com/mailman/listinfo/asterisk-users To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
