<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>
<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">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 class="h5"><br>
On Fri, Sep 2, 2011 at 7:28 AM, virendra bhati <<a href="mailto:virbhati@gmail.com">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>
> +91-9172341457<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>-- <br><div dir="ltr"><br><br><br>-----<br>Thanks and regards<br><br> Virendra Bhati<br>+91-9172341457<br>Software Engineer<br></div><br>
</div>