[asterisk-users] extension status using AMI

Kamlesh Kumar kamlesh_kmr at hotmail.com
Thu May 24 12:51:45 CDT 2012





Hi, I'm using AMI to get the extension status but always get -1 i.e. extension not found. #!/usr/bin/php -q
<?phpinclude_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
 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20120524/dbb38010/attachment.htm>


More information about the asterisk-users mailing list