Hi Virendra, <br>That&#39;s great<div><br><div>could you please share the sample for sip.conf and extensions.conf?</div><div><br><br><div class="gmail_quote">On Sat, Sep 3, 2011 at 10:09 AM, virendra bhati <span dir="ltr">&lt;<a href="mailto:virbhati@gmail.com">virbhati@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div dir="ltr">Hi,<br><br>I know that by using vi editor we can edit all the Linux files but I want to use Php. So that from web page anyone can make some account into asterisk server.<br>
<br>But thanks for your reply. And i have completed that task yesterday after sending e-mail. <br><div><div></div><div class="h5">
<br><div class="gmail_quote">On Sat, Sep 3, 2011 at 12:53 AM, C F <span dir="ltr">&lt;<a href="mailto:shmaltz@gmail.com" target="_blank">shmaltz@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204, 204, 204);padding-left:1ex">

Why php? Isn&#39;t vi the only way?<br>
<div><div></div><div><br>
On Fri, Sep 2, 2011 at 7:28 AM, virendra bhati &lt;<a href="mailto:virbhati@gmail.com" target="_blank">virbhati@gmail.com</a>&gt; wrote:<br>
&gt; Hi list,<br>
&gt;<br>
&gt; I want ot do basic work (add-edit-delete) into asterisk configuration files,<br>
&gt; like sip.conf, manager.conf,musiconhold.conf etc.<br>
&gt;<br>
&gt; Please guide me how to configure all these files from from AMI connection. I<br>
&gt; am able to login into AMI from Login action but I want to do more task in to<br>
&gt; it.<br>
&gt;<br>
&gt; AMI login:-<br>
&gt;<br>
&gt; login.php<br>
&gt;<br>
&gt; &lt;?php<br>
&gt; $socket = fsockopen(&quot;127.0.0.1&quot;,&quot;5038&quot;, $errno, $errstr, 30);<br>
&gt; fputs($socket, &quot;Action: Login\r\n&quot;);<br>
&gt; fputs($socket, &quot;UserName: root\r\n&quot;);<br>
&gt; fputs($socket, &quot;Secret: energy\r\n\r\n&quot;);<br>
&gt; ?&gt;<br>
&gt; AMI command:-<br>
&gt;<br>
&gt; Below commands are for musiconhold.conf. I want to add new MOH context into<br>
&gt; it.<br>
&gt; &lt;?php<br>
&gt; include(&quot;login.php&quot;);<br>
&gt;   fputs($socket, &quot;Action: UpdateConfig\r\n&quot;);<br>
&gt;   fputs($socket, &quot;Filename: musiconhold.conf\r\n&quot;);<br>
&gt;   fputs($socket, &quot;Srcfilename: musiconhold.conf\r\n&quot;);<br>
&gt;   fputs($socket, &quot;Dstfilename: musiconhold.conf\r\n&quot;);<br>
&gt;   fputs($socket, &quot;Action-000000: newcat\r\n&quot;);<br>
&gt;   fputs($socket, &quot;Cat-000000: bhavik\r\n&quot;);<br>
&gt;   fputs($socket, &quot;mode: files\r\n&quot;);<br>
&gt;   fputs($socket, &quot;directory: /var/lib/asterisk/moh\r\n&quot;);<br>
&gt;   fputs($socket, &quot;Reload: yes\r\n&quot;);<br>
&gt;   fputs($socket, &quot;ActionID: 9873497149817\r\n&quot;);<br>
&gt;   fputs($socket, &quot;Action: Logoff\r\n\r\n&quot;);<br>
&gt;<br>
&gt; ?&gt;<br>
&gt;<br>
&gt; After doing all no success :((<br>
&gt;<br>
&gt;<br>
&gt; -----<br>
&gt; Thanks and regards<br>
&gt;<br>
&gt;  Virendra Bhati<br>
&gt; <a href="tel:%2B91-9172341457" value="+919172341457" target="_blank">+91-9172341457</a><br>
&gt; Software Engineer<br>
&gt;<br>
&gt;<br>
</div></div>&gt; --<br>
&gt; _____________________________________________________________________<br>
&gt; -- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com" target="_blank">http://www.api-digital.com</a> --<br>
&gt; New to Asterisk? Join us for a live introductory webinar every Thurs:<br>
&gt;               <a href="http://www.asterisk.org/hello" target="_blank">http://www.asterisk.org/hello</a><br>
&gt;<br>
&gt; asterisk-users mailing list<br>
&gt; To UNSUBSCRIBE or update options visit:<br>
&gt;   <a href="http://lists.digium.com/mailman/listinfo/asterisk-users" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-users</a><br>
&gt;<br>
<br>
--<br>
_____________________________________________________________________<br>
-- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com" target="_blank">http://www.api-digital.com</a> --<br>
New to Asterisk? Join us for a live introductory webinar every Thurs:<br>
               <a href="http://www.asterisk.org/hello" target="_blank">http://www.asterisk.org/hello</a><br>
<br>
asterisk-users mailing list<br>
To UNSUBSCRIBE or update options visit:<br>
   <a href="http://lists.digium.com/mailman/listinfo/asterisk-users" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-users</a><br>
</blockquote></div><br><br clear="all"><br></div></div>-- <br><div class="im"><div dir="ltr"><br><br><br>-----<br>Thanks and regards<br><br> Virendra Bhati<br><a href="tel:%2B91-9172341457" value="+919172341457" target="_blank">+91-9172341457</a><br>
Software Engineer<br></div><br>
</div></div>
<br>--<br>
_____________________________________________________________________<br>
-- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com" target="_blank">http://www.api-digital.com</a> --<br>
New to Asterisk? Join us for a live introductory webinar every Thurs:<br>
               <a href="http://www.asterisk.org/hello" target="_blank">http://www.asterisk.org/hello</a><br>
<br>
asterisk-users mailing list<br>
To UNSUBSCRIBE or update options visit:<br>
   <a href="http://lists.digium.com/mailman/listinfo/asterisk-users" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-users</a><br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div dir="ltr">
Regards,<br>Zohair Raza<div><br></div><div><a href="http://www.zuhair.info" target="_blank">www.zuhair.info</a><br><div><p><span><b><span style="font-size:10pt;font-family:Verdana;color:blue"><a href="http://pk.linkedin.com/in/zuhairraza" target="_blank">http://pk.linkedin.com/in/zuhairraza</a></span></b></span><span><b><span style="font-size:10pt;font-family:Verdana;color:rgb(136, 136, 136)">  </span></b></span><b><span style="font-size:10pt;font-family:Verdana" lang="DE"></span></b></p>
 <br></div></div></div><br>
</div></div>