Hi, 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.
But thanks for your reply. And i have completed that task yesterday after sending e-mail. On Sat, Sep 3, 2011 at 12:53 AM, C F <shma...@gmail.com> wrote: > Why php? Isn't vi the only way? > > On Fri, Sep 2, 2011 at 7:28 AM, virendra bhati <virbh...@gmail.com> wrote: > > Hi list, > > > > I want ot do basic work (add-edit-delete) into asterisk configuration > files, > > like sip.conf, manager.conf,musiconhold.conf etc. > > > > Please guide me how to configure all these files from from AMI > connection. I > > am able to login into AMI from Login action but I want to do more task in > to > > it. > > > > AMI login:- > > > > login.php > > > > <?php > > $socket = fsockopen("127.0.0.1","5038", $errno, $errstr, 30); > > fputs($socket, "Action: Login\r\n"); > > fputs($socket, "UserName: root\r\n"); > > fputs($socket, "Secret: energy\r\n\r\n"); > > ?> > > AMI command:- > > > > Below commands are for musiconhold.conf. I want to add new MOH context > into > > it. > > <?php > > include("login.php"); > > fputs($socket, "Action: UpdateConfig\r\n"); > > fputs($socket, "Filename: musiconhold.conf\r\n"); > > fputs($socket, "Srcfilename: musiconhold.conf\r\n"); > > fputs($socket, "Dstfilename: musiconhold.conf\r\n"); > > fputs($socket, "Action-000000: newcat\r\n"); > > fputs($socket, "Cat-000000: bhavik\r\n"); > > fputs($socket, "mode: files\r\n"); > > fputs($socket, "directory: /var/lib/asterisk/moh\r\n"); > > fputs($socket, "Reload: yes\r\n"); > > fputs($socket, "ActionID: 9873497149817\r\n"); > > fputs($socket, "Action: Logoff\r\n\r\n"); > > > > ?> > > > > After doing all no success :(( > > > > > > ----- > > Thanks and regards > > > > Virendra Bhati > > +91-9172341457 > > Software Engineer > > > > > > -- > > _____________________________________________________________________ > > -- Bandwidth and Colocation Provided by http://www.api-digital.com -- > > New to Asterisk? Join us for a live introductory webinar every Thurs: > > http://www.asterisk.org/hello > > > > asterisk-users mailing list > > To UNSUBSCRIBE or update options visit: > > http://lists.digium.com/mailman/listinfo/asterisk-users > > > > -- > _____________________________________________________________________ > -- Bandwidth and Colocation Provided by http://www.api-digital.com -- > New to Asterisk? Join us for a live introductory webinar every Thurs: > http://www.asterisk.org/hello > > asterisk-users mailing list > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users > -- ----- Thanks and regards Virendra Bhati +91-9172341457 Software Engineer
-- _____________________________________________________________________ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users