Hi Virendra, <br>That'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"><<a href="mailto:virbhati@gmail.com">virbhati@gmail.com</a>></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"><<a href="mailto:shmaltz@gmail.com" target="_blank">shmaltz@gmail.com</a>></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't vi the only way?<br>
<div><div></div><div><br>
On Fri, Sep 2, 2011 at 7:28 AM, virendra bhati <<a href="mailto:virbhati@gmail.com" target="_blank">virbhati@gmail.com</a>> wrote:<br>
> Hi list,<br>
><br>
> I want ot do basic work (add-edit-delete) into asterisk configuration files,<br>
> like sip.conf, manager.conf,musiconhold.conf etc.<br>
><br>
> Please guide me how to configure all these files from from AMI connection. I<br>
> am able to login into AMI from Login action but I want to do more task in to<br>
> it.<br>
><br>
> AMI login:-<br>
><br>
> login.php<br>
><br>
> <?php<br>
> $socket = fsockopen("127.0.0.1","5038", $errno, $errstr, 30);<br>
> fputs($socket, "Action: Login\r\n");<br>
> fputs($socket, "UserName: root\r\n");<br>
> fputs($socket, "Secret: energy\r\n\r\n");<br>
> ?><br>
> AMI command:-<br>
><br>
> Below commands are for musiconhold.conf. I want to add new MOH context into<br>
> it.<br>
> <?php<br>
> include("login.php");<br>
> fputs($socket, "Action: UpdateConfig\r\n");<br>
> fputs($socket, "Filename: musiconhold.conf\r\n");<br>
> fputs($socket, "Srcfilename: musiconhold.conf\r\n");<br>
> fputs($socket, "Dstfilename: musiconhold.conf\r\n");<br>
> fputs($socket, "Action-000000: newcat\r\n");<br>
> fputs($socket, "Cat-000000: bhavik\r\n");<br>
> fputs($socket, "mode: files\r\n");<br>
> fputs($socket, "directory: /var/lib/asterisk/moh\r\n");<br>
> fputs($socket, "Reload: yes\r\n");<br>
> fputs($socket, "ActionID: 9873497149817\r\n");<br>
> fputs($socket, "Action: Logoff\r\n\r\n");<br>
><br>
> ?><br>
><br>
> After doing all no success :((<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>
><br>
><br>
</div></div>> --<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>
><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>