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 <[email protected]> wrote: > 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 <[email protected]> wrote: > >> 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 = system("/etc/init.d/mysql status",$mysqls); >> echo "priline=>".$priline; >> echo "<br>"; >> echo "pri=>".$pri; >> echo "<br>"; >> echo "asterisk=>".$asterisk; >> echo "<br>"; >> echo "asterisks=>".$asterisks; >> echo "<br>"; >> echo "mysql=>".$mysql; >> echo "<br>"; >> echo "mysqls=>".$mysqls; >> echo "<br>"; >> ?> >> >> *Output:-* >> >> 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?) >> pri=>1 >> asterisk=> >> asterisks=>127 >> mysql=> >> mysqls=>127 >> >> >> >> On Wed, Apr 27, 2011 at 8:43 PM, Juan David Diaz <[email protected]>wrote: >> >>> 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 <[email protected]>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 >>>> >>> >>> >>> -- >>> _____________________________________________________________________ >>> -- 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 >> >> >> -- >> _____________________________________________________________________ >> -- 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
-- _____________________________________________________________________ -- 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
