<div class="gmail_quote"><span style="font-family:&#39;Times New Roman&#39;;font-size:medium"><pre>Hi,</pre><pre>1) It would be nice to find out the root reason that forces you to restart the Asterisk. I do run Aheeva with decently high uptimes.</pre>


<pre>2) Both &quot;a&quot; and &quot;b&quot; methods of Jose P. Espinal are functional, but if I&#39;m having a failure, I up to grab the putty and investigate what&#39;s going on there :) How often are you having them?</pre>


<pre>3) what&#39;s the another service related to Aheeva, that requires to be restarted?</pre><pre><br></pre><pre><blockquote class="gmail_quote" style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0.8ex;border-left-width:1px;border-left-color:rgb(204, 204, 204);border-left-style:solid;padding-left:1ex">


Hi there,</blockquote><blockquote><br></blockquote><blockquote>a. You could (maybe) use PHP and send some command via POST, and (after </blockquote><blockquote>secure/validating the command) use &#39;exec()&#39; function in php, or </blockquote>


<blockquote>&#39;system()&#39; function.</blockquote><blockquote><br></blockquote><blockquote>Note: that would require to have a webserver with php installed on it.</blockquote><blockquote>And allowing the user under which the webserver runs, to restart </blockquote>


<blockquote>asterisk via sudoers file.</blockquote><blockquote><br></blockquote><blockquote>b. You could use a shellscript that sends the command via SSH.</blockquote><blockquote><br></blockquote><blockquote>In order to avoid password prompt, you could generate a RSA (or DSA) key </blockquote>


<blockquote>pair on the machine that will send the command, and copy the rsa_key.pub </blockquote><blockquote>content on your asterisk box &#39;authorized_keys&#39;.</blockquote><blockquote><br></blockquote><blockquote>That would allow you to execute the command remotely via SSH without </blockquote>


<blockquote>having to insert the password manually.</blockquote><blockquote><br></blockquote><blockquote>Note: you could consider using a very limited user on the asterisk box, </blockquote><blockquote>and with sudoers file allowing it just to restart Asterisk.</blockquote>


<blockquote><br></blockquote><blockquote><br></blockquote><blockquote>Regards,</blockquote><blockquote><br></blockquote><blockquote>Amine Mrichcha wrote:</blockquote><blockquote>&gt; Hi All,</blockquote><blockquote>&gt; </blockquote>


<blockquote>&gt; I do have asterisk installed for a call center and I would like to know </blockquote><blockquote>&gt; if it is possible to create a scipt and execute it from a PC connected </blockquote><blockquote>&gt; to the Network without accessing the server. This script should restart </blockquote>


<blockquote>&gt; asterisk and another service related to aheeva.</blockquote><blockquote>&gt; </blockquote><blockquote>&gt; The problem now is that each time I have to access using PUTY to the </blockquote><blockquote>&gt; server to start and run services manually.</blockquote>


<blockquote>&gt; </blockquote><blockquote>&gt; Service asterisk restart</blockquote><blockquote>&gt; </blockquote><blockquote>&gt; Any help would be appreciated, sorry if it is a newbie question.</blockquote><blockquote>

&gt; </blockquote>
<blockquote>&gt; Regards,</blockquote><blockquote>&gt; </blockquote><blockquote>&gt; Am</blockquote><blockquote>&gt; </blockquote><blockquote><br></blockquote><blockquote>-- </blockquote><blockquote>Jose P. Espinal</blockquote>


<blockquote><a href="http://www.eslackware.com/" target="_blank">http://www.eSlackware.com</a></blockquote><blockquote>IRC: Khratos @ #asterisk / -doc / -bugs</blockquote></pre></span><blockquote><br></blockquote><blockquote>

<br></blockquote></div><br clear="all"><br>-- <br>Mvh,<br>Aurimas Skirgaila<br>