[asterisk-users] Unable to run asterisk CLI commands from php

Sam Hawkin gvrtest at gmail.com
Fri May 8 23:47:27 CDT 2009


Hi All,

I am trying to run the asterisk CLI commands from php.
Some thing like "asterisk -rx reload".
But it is not working, where as when I try to run
linux "ls" command it works fine.

below is sample php code which I am trying to run.

$command = "sudo asterisk -rx reload";

$value1 = system($command,$retval1);
$value2 = exec($command,$retval2);

echo $value1;
echo $value2;

can any one suggest what might be the problem and possible solution to it.

Any help is highly appreciated.

Thanks.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20090509/616722f3/attachment.htm 


More information about the asterisk-users mailing list