[asterisk-users] asterisk start with php

Steve Edwards asterisk.org at sedwards.com
Fri Apr 2 11:37:30 CDT 2010


On Fri, 2 Apr 2010, salaheddine elharit wrote:

> thank you for your response but i need this solution as soon as possible
>  
> to restart the asterisk service via a agent poste
>  
> if ther is any solution please

Are you asking for clues or are you asking somebody to write it for you?

General outline (off the top of my head) would be to add an entry to 
/etc/sudoers to allow the user executing the httpd process to execute 
/etc/init.d/asterisk (and maybe /etc/init.d/{zaptel,dahdi) and then add a 
CGI to the web server that executes something like:

system('sudo -u <user-running-asterisk-process> /etc/init.d/asterisk restart');

If you are asking someone to write the PHP code, most coders respond well
to an offer of compensation -- $$$, beer, etc.

-- 
Thanks in advance,
-------------------------------------------------------------------------
Steve Edwards       sedwards at sedwards.com      Voice: +1-760-468-3867 PST
Newline                                              Fax: +1-760-731-3000


More information about the asterisk-users mailing list