Re: [asterisk-users] how to know status of asterisk from php

2011-04-28 Thread virendra bhati
Hi, As per you suggestion I write small php scripts but didn't get result. Below is the php script and output of programs too. *PHP Script:-* ?php $priline = system('/usr/sbin/asterisk -rnx pri show spans',$pri); $asterisk = system(/etc/init.d/asterisk status, $asterisks); $mysql =

Re: [asterisk-users] how to know status of asterisk from php

2011-04-28 Thread Tiago Geada
The error is pretty straight forward. It is telling you that no Asterisk service is running in that machine On 28 April 2011 07:19, virendra bhati virbh...@gmail.com wrote: Hi, As per you suggestion I write small php scripts but didn't get result. Below is the php script and output of

Re: [asterisk-users] how to know status of asterisk from php

2011-04-28 Thread virendra bhati
Hi, Asterisk server is running on this machine then I tested and I got this message after run the script. On Thu, Apr 28, 2011 at 1:20 PM, Tiago Geada tiago.ge...@gmail.com wrote: The error is pretty straight forward. It is telling you that no Asterisk service is running in that machine On

Re: [asterisk-users] how to know status of asterisk from php

2011-04-28 Thread Matt Riddell
On 28/04/11 8:00 PM, virendra bhati wrote: Hi, Asterisk server is running on this machine then I tested and I got this message after run the script. What user are you running the script as? It looks like you're running it as a web server when Asterisk is running as root? Try running the

Re: [asterisk-users] how to know status of asterisk from php

2011-04-28 Thread virendra bhati
Hi, I am running this script from wabsite and want to make it just like FreePBX show status information of Asterisk, mysql etc. *Asterisk is running as root* at my end. When I start script from command prompt then I am getting error message.. [root@cent68 mtnl]# php temp.php PHP Parse error:

Re: [asterisk-users] how to know status of asterisk from php

2011-04-28 Thread Steve Edwards
Un-top-posting... On 28 April 2011 07:19, virendra bhati virbh...@gmail.com wrote: As per you suggestion I write small php scripts but didn't get result. Below is the php script and output of programs too. $priline = system('/usr/sbin/asterisk -rnx pri show spans',$pri); Unable to

Re: [asterisk-users] how to know status of asterisk from php

2011-04-28 Thread Juan David Diaz
Unable to connect to remote asterisk (does /var/run/asterisk.ctl exist?) priline=Unable to connect to remote asterisk (does /var/run/asterisk.ctl exist?) I think, you should start asterisk before executing asterisk commands regards Juan. Linux User #441131 On Thu, Apr 28, 2011 at 1:19 AM,

Re: [asterisk-users] how to know status of asterisk from php

2011-04-28 Thread Matt Riddell
On 28/04/11 10:53 PM, virendra bhati wrote: Hi, I am running this script from wabsite and want to make it just like FreePBX show status information of Asterisk, mysql etc. *Asterisk is running as root* at my end. When I start script from command prompt then I am getting error message..

[asterisk-users] how to know status of asterisk from php

2011-04-27 Thread virendra bhati
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

Re: [asterisk-users] how to know status of asterisk from php

2011-04-27 Thread Juan David Diaz
Hi: http://php.net/manual/en/function.system.php Then, the commands you shoul run: /usr/sbin/asterisk -rnxpri 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

Re: [asterisk-users] how to know status of asterisk from php

2011-04-27 Thread nik600
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