[asterisk-users] Restarting Asterisk using a script - Thanks to all -
Jose P. Espinal
jpe at slackware-es.com
Wed Mar 24 11:22:04 CDT 2010
Hi there,
a. You could (maybe) use PHP and send some command via POST, and (after
secure/validating the command) use 'exec()' function in php, or
'system()' function.
Note: that would require to have a webserver with php installed on it.
And allowing the user under which the webserver runs, to restart
asterisk via sudoers file.
b. You could use a shellscript that sends the command via SSH.
In order to avoid password prompt, you could generate a RSA (or DSA) key
pair on the machine that will send the command, and copy the rsa_key.pub
content on your asterisk box 'authorized_keys'.
That would allow you to execute the command remotely via SSH without
having to insert the password manually.
Note: you could consider using a very limited user on the asterisk box,
and with sudoers file allowing it just to restart Asterisk.
Regards,
Amine Mrichcha wrote:
> Hi All,
>
> I do have asterisk installed for a call center and I would like to know
> if it is possible to create a scipt and execute it from a PC connected
> to the Network without accessing the server. This script should restart
> asterisk and another service related to aheeva.
>
> The problem now is that each time I have to access using PUTY to the
> server to start and run services manually.
>
> Service asterisk restart
>
> Any help would be appreciated, sorry if it is a newbie question.
>
> Regards,
>
> Am
>
--
Jose P. Espinal
http://www.eSlackware.com
IRC: Khratos @ #asterisk / -doc / -bugs
More information about the asterisk-users
mailing list