You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On a moderate usage of PAMI we can see errors like this:
PAMI\Client\Exception\ClientException: "Error reading''true"
at ~/vendor_composer/marcelog/pami/src/mg/PAMI/Client/Impl/ClientImpl.php line 234
On the Asterisk side there will be errors:
ERROR[22439] utils.c: fwrite() returned error: Broken pipe
ERROR[22439] utils.c: fwrite() returned error: Broken pipe
I found an email with step-by-step guide how to solve this:
> AMI is a *two-way* protocol. You mustn't just fire in a bunch of commands
> and close the socket!
>
> The reason Asterisk reports the fwrite() error is because you have closed
> the socket before it had a chance to send you the responses.
>
> What you need to do is this:
>
> 1. Connect to the AMI port.
> 2. Read the one-line greeting message that Asterisk sends you. It will tell
> you the version of the protocol (which might be of interest if you
> wanted
> to be compatible with different versions of Asterisk).
> 3. Send the Login action with username, secret and terminating blank line.
> 4. Read the response lines from Asterisk until it gives you a blank line.
> 5. Send whatever command you want it to do, and go back to step 4.
> 6. When you have done the commands you want, send the Logoff action.
> 7. *** READ THE RESPONSE TO THE LOGOFF
> 8. Close the socket.
So, the issue is with Logoff method. I want to propose to add automatic sending of Logoff packet during the $pamiClient->close() call like with Login action in the $pamiClient->open(). This will prevent server from strange errors.
The text was updated successfully, but these errors were encountered:
On a moderate usage of PAMI we can see errors like this:
On the Asterisk side there will be errors:
I found an email with step-by-step guide how to solve this:
So, the issue is with
Logoff
method. I want to propose to add automatic sending ofLogoff
packet during the$pamiClient->close()
call like withLogin
action in the$pamiClient->open()
. This will prevent server from strange errors.The text was updated successfully, but these errors were encountered: