virendra bhati
2011-Apr-27 11:22 UTC
[asterisk-users] how to know status of asterisk from php
Hi How to know status of Asterisk,Mysql. PRI lines and other services from PHP scripts ? ---- Thanks and regards Virendra Bhati +91-9172341457 -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20110427/bd4e9bb1/attachment.htm>
Juan David Diaz
2011-Apr-27 15:13 UTC
[asterisk-users] how to know status of asterisk from php
Hi: http://php.net/manual/en/function.system.php Then, the commands you shoul run: /usr/sbin/asterisk -rnx"pri show spans" /etc/init.d/asterisk status /etc/init.d/mysql status . . . . and so on!! good luck! Regards. Juan. Linux User #441131 On Wed, Apr 27, 2011 at 6:22 AM, virendra bhati <virbhati at gmail.com> wrote:> Hi > > How to know status of Asterisk,Mysql. PRI lines and other services from PHP > scripts ? > > ---- > Thanks and regards > > Virendra Bhati > +91-9172341457 > > > -- > _____________________________________________________________________ > -- 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 >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20110427/9ff01e22/attachment.htm>
Hi, you can use the PHPAgi project http://phpagi.sourceforge.net/ Otherwise, if you want a more high-level approach you can use the MXML interface, you will communicate with HTTP GET request and obtaing XML response directly from Asterisk. Enabling the http manager interface you will get enabled some manager commands on the port 8088 Ie, you can Login with: http://your-asterisk-ip:8088/mxml?action=login&username=$this->user&secret=$this->pass Some example commands: http://your-asterisk-ip:8088/mxml?action=queuestatus http://your-asterisk-ip:8088/mxml?action=SipPeers http://your-asterisk-ip:8088/mxml?action=status http://your-asterisk-ip:8088/mxml?action=DBput&family=$family&key=$key&Val=$val http://your-asterisk-ip:8088/mxml?action=QueueAdd&queue=$queue&interface=$interface http://your-asterisk-ip:8088/mxml?action=QueueRemove&queue=$queue&interface=$interface http://your-asterisk-ip:8088/mxml?action=QueuePause&queue=$queue&interface=$interface&Paused=1 http://your-asterisk-ip:8088/mxml?action=QueuePause&queue=$queue&interface=$interface&Paused=0 And so on.... On Wed, Apr 27, 2011 at 1:22 PM, virendra bhati <virbhati at gmail.com> wrote:> Hi > > How to know status of Asterisk,Mysql. PRI lines and other services from PHP > scripts ? > > ---- > Thanks and regards > > ?Virendra Bhati > +91-9172341457 > > > -- > _____________________________________________________________________ > -- 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 >-- /*************/ nik600 http://www.kumbe.it