extension status using AMI

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



Hi,
 
I'm using AMI to get the extension status but always get -1 i.e. extension not found.
 
#!/usr/bin/php -q
<?php
include_once ("phpagi-2.14/phpagi.php");
include_once ("/phpagi-2.14/phpagi-asmanager.php");
$agi = new AGI();
$as = new AGI_AsteriskManager();
$exten = $agi->request['agi_extension'];
$as->connect("localhost", "user", "passwd");
$status = $as->ExtensionState($exten,'context',1);
$status1 = $status['Status'];
$agi->verbose("Extension status is ".$status1);
?>
 
Always return Extension status is -1
 
Thanks,
Kamlesh

--
_____________________________________________________________________
-- 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

[Gnu Gatekeeper]     [IETF Sipping]     [Info Cyrus]     [ALSA User]     [Fedora Linux Users]     [DCCP]     [Gimp]     [100% Free Online Dating]     [Yosemite News]     [Arts & Crafts]     [Yosemite Photos]     [Deep Creek Hot Springs]     [Yosemite Campsites]     [ISDN Cause Codes]


Add to Google Powered by Linux