But PJSIPShowEndpoints and PJSIPShowEndpoint both work.
My ami.php file for testing:
<?php
// Load FreePBX bootstrap environment
require_once('/etc/freepbx.conf');
// Load AMI
global $astman;
// $test = $astman->ConfbridgeListRooms(); // works
// $test = $astman->ConfbridgeList("198"); // works
// $test = $astman->PJSIPShowAors(); // does not work
// $test = $astman->PJSIPShowContacts(); // does not work
// $test = $astman->PJSIPShowEndpoints(); // works
// $test = $astman->PJSIPShowEndpoint("103"); // works
$test = $astman->ListCommands($actionid=NULL); //works
echo "DUMP AMI RESULT BEGIN<br />\r\n<pre>\r\n";
echo var_dump($test);
echo "\r\n</pre>\r\nDUMP AMI END<br />\r\n";
?>
The $astman method ListCommands invokes the Asterisk AMI command ListCommands,
58448910*CLI> manager show command ListCommands
[Syntax]
Action: ListCommands
[ActionID:] <value>
[Synopsis]
List available manager commands.
which returns acceptable asterisk AMI commands, not $astman class methods. The confusion arises because the class methods have identical names to the AMI commands. To date only a few pjsip methods have been added to the class which you can see by using this line in your script: