PHP Asterisk Manager Interface ( AMI ) supports synchronous command ( action )/ responses and asynchronous events using the pattern observer-listener. Supports commands with responses with multiple events. Very suitable for development of operator consoles and / or asterisk / channels / peers monitoring through SOA, etc
$response = $pamiClient->send(new CommandAction('database show blacklist', ''));
you'll get a read timeout in ClientImpl.php on line 422.
The reason is that in PAMI\Message\Response\ResponseMessage.php in line 137 the response of asterisk to the "database show ...." contains the string "Message: Command output follows" and there is considered as a list while it's only some raw output.
The message is therefore not considered completed and "getRelated()" won't return anything and therefore send() will time out.
This seems to be a bug.
I thin it's to greedy to scan the message for the word "follow" since this could be in any kind of message.
If you run:
$response = $pamiClient->send(new CommandAction('database show blacklist', ''));
you'll get a read timeout in ClientImpl.php on line 422.
The reason is that in PAMI\Message\Response\ResponseMessage.php in line 137 the response of asterisk to the "database show ...." contains the string "Message: Command output follows" and there is considered as a list while it's only some raw output. The message is therefore not considered completed and "getRelated()" won't return anything and therefore send() will time out.
This seems to be a bug. I thin it's to greedy to scan the message for the word "follow" since this could be in any kind of message.