PAMI icon indicating copy to clipboard operation
PAMI copied to clipboard

Error Reading

Open VijeshDatt opened this issue 3 years ago • 3 comments

Not really sure what is causing this issue:

` PAMI\Client\Exception\ClientException

Error reading

at C:\xampp\htdocs\source\vendor\chan-sccp\pami\src\PAMI\Client\Impl\ClientImpl.php:292 288▕ // Read something. 289▕ //$read = @fread($this->socket, 65535); 290▕ $read = @fread($this->socket, 8192); 291▕ if ($read === false || (empty($read) && @feof($this->socket))) { ➜ 292▕ throw new ClientException('Error reading'); 293▕ } 294▕ $this->currentProcessingMessage .= $read; 295▕ // If we have a complete message, then return it. Save the rest for 296▕ // later.

1 C:\xampp\htdocs\source\vendor\chan-sccp\pami\src\PAMI\Client\Impl\ClientImpl.php:316 PAMI\Client\Impl\ClientImpl::getMessages()

2 C:\xampp\htdocs\source\app\Console\Commands\SyncAsteriskNSW.php:129 PAMI\Client\Impl\ClientImpl::process()`

I don't know if this is because of a PHP update? Previous version was PHP 7.4 which worked fine. Now that I'm on PHP 8.1.2 with Laravel 9, keep getting this error when trying to connect.

Please help

VijeshDatt avatar Feb 16 '22 03:02 VijeshDatt

I will have to run a couple of tests to see what is going on there.

dkgroot avatar Feb 24 '22 06:02 dkgroot

Hey @dkgroot, Just to give you a small heads up. Using this package over the base PAMI has one more bug, it's slower at reading/writing.

To give some context, I am running the PAMI listeners against 3 Ast servers, each server gives me a message every 10 milliseconds. The base PAMI package works flawlessly with this setup but when using your package, the messages are delayed, as though a function is taking forever to load, however I tried debugging and couldn't figure out which method/function it was, maybe you can verify?

VijeshDatt avatar Mar 23 '22 00:03 VijeshDatt

Was there ever a resolution to this? I am running into the same issue and cannot find a means around it.

colinwebdev avatar Jul 19 '24 22:07 colinwebdev