[asterisk-users] Using PHP to reload extensions
Moises Silva
moises.silva at gmail.com
Wed Oct 3 21:10:58 CDT 2007
If you are running the script from a web server, the script gets
executed with the web server process permissions, hence, probably does
not have access to /var/run/asterisk.ctl.
You can give permissions to your web server, or better yet, dont
execute the command using shell_exec, better open a socket connection
to the Asterisk manager and execute Action: Command
Command: extensions reload
Regards
On 10/3/07, Michael Munger <michael at highpoweredhelp.com> wrote:
>
>
>
>
> I am trying to use PHP to reload the extensions in an Asterisk installation.
> I keep getting this error:
>
> Unable to connect to remote asterisk (does /var/run/asterisk.ctl exist?)
> when I run the script by visiting the URL; however, if I run the script from
> the command line, it runs just fine (works perfect, actually).
>
> I think it is permissions related. Does anyone have any ideas?
>
> <php
> $output = shell_exec('asterisk -rx"extensions reload"');
> echo $output;
> ?>
>
>
>
> Yours,
>
> Michael Munger, dCAP
>
> 404-438-2128
>
> michael at highpoweredhelp.com
>
>
> _______________________________________________
> --Bandwidth and Colocation Provided by http://www.api-digital.com--
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>
> http://lists.digium.com/mailman/listinfo/asterisk-users
>
--
"Within C++, there is a much smaller and cleaner language struggling
to get out."
More information about the asterisk-users
mailing list